28 void BSP_uart_init(
int uart,
unsigned long baud,
unsigned long databits,
unsigned long parity,
unsigned long stopbits,
int hwFlow);
29 void BSP_uart_set_attributes(
int uart,
unsigned long baud,
unsigned long databits,
unsigned long parity,
unsigned long stopbits);
30 void BSP_uart_set_baud(
int uart,
unsigned long baud);
31 void BSP_uart_intr_ctrl(
int uart,
int cmd);
32 void BSP_uart_throttle(
int uart);
33 void BSP_uart_unthrottle(
int uart);
34 int BSP_uart_polled_status(
int uart);
35 void BSP_uart_polled_write(
int uart,
int val);
36 int BSP_uart_polled_read(
int uart);
37 void BSP_uart_termios_set(
int uart,
void *ttyp);
38 int BSP_uart_termios_read_com1(
int uart);
39 int BSP_uart_termios_read_com2(
int uart);
40 ssize_t BSP_uart_termios_write_com1(
int minor,
const char *buf,
size_t len);
41 ssize_t BSP_uart_termios_write_com2(
int minor,
const char *buf,
size_t len);
42 void BSP_uart_termios_isr_com1(
void *);
43 void BSP_uart_termios_isr_com2(
void *);
44 void BSP_uart_dbgisr_com1(
void);
45 void BSP_uart_dbgisr_com2(
void);
46 extern int BSP_poll_char_via_serial(
void);
47 extern void BSP_output_char_via_serial(
char val);
48 extern int BSPConsolePort;
49 extern int BSPBaseBaud;
56 #define BSP_UART_INTR_CTRL_DISABLE (0) 57 #define BSP_UART_INTR_CTRL_GDB (0xaa) 58 #define BSP_UART_INTR_CTRL_ENABLE (0xbb) 59 #define BSP_UART_INTR_CTRL_TERMIOS (0xcc) 62 #define BSP_UART_STATUS_ERROR (-1) 63 #define BSP_UART_STATUS_NOCHAR (0) 64 #define BSP_UART_STATUS_CHAR (1) 65 #define BSP_UART_STATUS_BREAK (2) 68 #define BSP_UART_COM1 (0) 69 #define BSP_UART_COM2 (1) 75 #define COM1_BASE_IO 0x3F8 76 #define COM2_BASE_IO 0x2F8 104 #define MODEM_STATUS 0 105 #define NO_MORE_INTR 1 106 #define TRANSMITTER_HODING_REGISTER_EMPTY 2 107 #define RECEIVER_DATA_AVAIL 4 108 #define RECEIVER_ERROR 6 109 #define CHARACTER_TIMEOUT_INDICATION 12 114 #define RECEIVE_ENABLE 0x1 115 #define TRANSMIT_ENABLE 0x2 116 #define RECEIVER_LINE_ST_ENABLE 0x4 117 #define MODEM_ENABLE 0x8 118 #define INTERRUPT_DISABLE 0x0 173 #define FIFO_CTRL 0x01 175 #define XMIT_RESET 0x02 176 #define RCV_RESET 0x04 179 #define RECEIVE_FIFO_TRIGGER1 0x0 180 #define RECEIVE_FIFO_TRIGGER4 0x40 181 #define RECEIVE_FIFO_TRIGGER8 0x80 182 #define RECEIVE_FIFO_TRIGGER12 0xc0 183 #define TRIG_LEVEL 0xc0