ncloader  0.1
 모두 데이타 구조 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 매크로 그룹들 페이지들
serial.c 파일 참조
#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
열거형 멤버
RX 

Enable Received Data Available Interrupt

TX 

Enable Transmitter Holding Register Empty Intr

RX_STAT 
MODEM_STAT 

Enable Modem Status Interrupt

SLEEP_MODE 

Enable Sleep Mode (16750)

LOW_POWER 

Enable Low Power Mode (16750)

열거형 멤버
DATA 

Data Register (w/o DLAB)

INTR_ENABLE 

Interrupt enable register (w/o DLAB)

BAUD_LO 

Baudrate divisor low byte (w DLAB)

BAUD_HI 

Baudrate divisor hi byte (w DLAB)

FIFO 

Interrupt identification and FIFO ctrl register

LINE_CTRL 

Line control register (MSB = DLAB)

MODEM_CTRL 

Modem control register

LINE_STATUS 

Line status register

MODEM_STATUS 

Modem status register

SCRATCH 

Scratch register