|
nckernel
0.1
|
#include <slibc.h>#include <sys/types.h>#include <sys/io.h>#include <stdio.h>#include <errno.h>#include <stdarg.h>#include <stdlib.h>#include <stddef.h>#include <assert.h>#include <list.h>#include <object.h>#include <vfs.h>#include <device.h>#include <serial.h>#include <interrupt.h>#include <isr.h>#include <debug.h>
Go to the source code of this file.
Data Structures | |
| struct | context |
Macros | |
| #define | DATA5 0x00 |
| #define | DATA6 0x01 |
| #define | DATA7 0x02 |
| #define | DATA8 0x03 |
| #define | EVEN_PARITY 0x02 |
| #define | NO_PARITY 0x00 |
| #define | ODD_PARITY 0x01 |
| #define | SERIAL_MAX_SPEED 115200 |
| #define | STOPBITS1 0x00 |
| #define | STOPBITS2 0x01 |
Enumerations | |
| enum | IER { RX = 0x01, TX = 0x02, RX_STAT = 0x04, MODEM_STAT = 0x08, SLEEP_MODE = 0x10, LOW_POWER = 0x20 } |
| enum | port_offset { DATA = 0x00, INTR_ENABLE = 0x01, BAUD_LO = 0x00, BAUD_HI = 0x01, FIFO = 0x02, LINE_CTRL = 0x03, MODEM_CTRL = 0x04, LINE_STATUS = 0x05, MODEM_STATUS = 0x06, SCRATCH = 0x07 } |
Functions | |
| int | serial_close (struct ninfo *ninfo, struct nctx *ctx) |
| int | serial_init (void) |
| Serial 장치를 사용할 수 있도록 초기화 하는 함수 More... | |
| int | serial_ioctl (struct ninfo *ninfo, struct nctx *ctx, int request, va_list va) |
| int | serial_open (struct ninfo *ninfo, struct nctx *ctx) |
| int | serial_read (struct ninfo *ninfo, struct nctx *ctx, void *buf, size_t size) |
| int | serial_write (struct ninfo *ninfo, struct nctx *ctx, const void *buf, size_t size) |
| enum IER |
| enum port_offset |
Definition at line 213 of file serial.c.
References ninfo_dev::device, free(), IRQ_NR_SERIAL_EVEN, IRQ_NR_SERIAL_ODD, MINOR, NULL, nctx::priv, ninfo::priv, and unregister_irq().

Definition at line 168 of file serial.c.
References context::baudrate, context::data, EINVAL, context::parity, nctx::priv, SERIAL_CMD_BAUDRATE, SERIAL_CMD_DATA, SERIAL_CMD_ENTER_SETUP, SERIAL_CMD_LEAVE_SETUP, SERIAL_CMD_PARITY, SERIAL_CMD_STOP, context::setup, context::stop, va_arg, and context::validate.
Definition at line 107 of file serial.c.
References ninfo_dev::device, ENODEV, ENOMEM, free(), IRQ_NR_SERIAL_EVEN, IRQ_NR_SERIAL_ODD, malloc(), MINOR, NORMAL_PRIORITY, NULL, nctx::offset, nctx::priv, ninfo::priv, and register_irq().

Definition at line 141 of file serial.c.
References EBUSY, nctx::priv, and context::setup.
Definition at line 154 of file serial.c.
References EBUSY, nctx::priv, and context::setup.
1.8.4