|
ncloader
0.1
|
#include <slibc.h>#include <sys/types.h>#include <stdio.h>#include <errno.h>#include <stdarg.h>#include <stdlib.h>#include <stddef.h>#include <assert.h>#include <port.h>#include <list.h>#include <device.h>#include <serial.h>#include <bootm.h>#include <interrupt.h>#include <isr.h>
serial.c에 대한 include 의존 그래프데이타 구조 | |
| struct | context |
매크로 | |
| #define | DATA5 0x00 |
| #define | DATA6 0x01 |
| #define | DATA7 0x02 |
| #define | DATA8 0x03 |
| #define | STOPBITS1 0x00 |
| #define | STOPBITS2 0x01 |
| #define | NO_PARITY 0x00 |
| #define | ODD_PARITY 0x01 |
| #define | EVEN_PARITY 0x02 |
| #define | SERIAL_MAX_SPEED 115200 |
열거형 타입 | |
| 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 } |
| enum | IER { RX = 0x01, TX = 0x02, RX_STAT = 0x04, MODEM_STAT = 0x08, SLEEP_MODE = 0x10, LOW_POWER = 0x20 } |
함수 | |
| int | serial_open (int id, int ctx_id) |
| Serial 장치를 초기화 한다. 더 자세히 ... | |
| int | serial_read (int ctx_id, char *buffer, int size) |
| Serial 장치로 부터 데이터를 읽는다. 더 자세히 ... | |
| int | serial_write (int ctx_id, const char *buffer, int size) |
| Serial 장치에 데이터를 쓴다. 더 자세히 ... | |
| int | serial_ctrl (int ctx_id, int cmd, va_list ap) |
| Serial 장치를 제어한다. 더 자세히 ... | |
| int | serial_close (int ctx_id) |
| Serial 장치를 종료 시킨다. 더 자세히 ... | |
| int | serial_init (void) |
| Serial 장치를 사용할 수 있도록 초기화 하는 함수 더 자세히 ... | |
| #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 |
| enum IER |
| enum port_offset |