14 #include <sys/ioctl.h> 17 void BSP_uart_init(
int uart,
int baud,
int hwFlow);
18 void BSP_uart_set_baud(
int uart,
int baud);
19 void BSP_uart_intr_ctrl(
int uart,
int cmd);
20 void BSP_uart_throttle(
int uart);
21 void BSP_uart_unthrottle(
int uart);
22 int BSP_uart_polled_status(
int uart);
23 void BSP_uart_polled_write(
int uart,
int val);
24 int BSP_uart_polled_read(
int uart);
25 void BSP_uart_termios_set(
int uart,
void *ttyp);
26 ssize_t BSP_uart_termios_write_com(
int minor,
const char *buf,
size_t len);
27 int BSP_uart_termios_read_com (
int minor);
28 void BSP_uart_termios_isr_com1(
void *unused);
29 void BSP_uart_termios_isr_com2(
void *unused);
30 void BSP_uart_dbgisr_com1(
void);
31 void BSP_uart_dbgisr_com2(
void);
32 int BSP_uart_install_isr(
int uart, rtems_irq_hdl handler);
33 int BSP_uart_remove_isr(
int uart, rtems_irq_hdl handler);
34 ssize_t BSP_uart_termios_write_polled(
int minor,
const char *buf,
size_t len);
38 extern unsigned BSP_poll_char_via_serial(
void);
39 extern void BSP_output_char_via_serial(
const char val);
40 extern int BSPConsolePort;
41 extern int BSPBaseBaud;
48 typedef void (*BSP_UartBreakCbProc)(
50 unsigned uartRBRLSRStatus,
51 void *termiosPrivatePtr,
56 BSP_UartBreakCbProc handler;
60 #define BIOCGETBREAKCB _IOR('b',1,sizeof(BSP_UartBreakCbRec)) 61 #define BIOCSETBREAKCB _IOW('b',2,sizeof(BSP_UartBreakCbRec)) 68 #define BSP_UART_INTR_CTRL_DISABLE (0) 69 #define BSP_UART_INTR_CTRL_GDB (0xaa) 70 #define BSP_UART_INTR_CTRL_ENABLE (0xbb) 71 #define BSP_UART_INTR_CTRL_TERMIOS (0xcc) 74 #define BSP_UART_STATUS_ERROR (-1) 75 #define BSP_UART_STATUS_NOCHAR (0) 76 #define BSP_UART_STATUS_CHAR (1) 77 #define BSP_UART_STATUS_BREAK (2) 80 #define BSP_UART_COM1 (0) 81 #define BSP_UART_COM2 (1) 109 #define MODEM_STATUS 0 110 #define NO_MORE_INTR 1 111 #define TRANSMITTER_HODING_REGISTER_EMPTY 2 112 #define RECEIVER_DATA_AVAIL 4 113 #define RECEIVER_ERROR 6 114 #define CHARACTER_TIMEOUT_INDICATION 12 119 #define RECEIVE_ENABLE 0x1 120 #define TRANSMIT_ENABLE 0x2 121 #define RECEIVER_LINE_ST_ENABLE 0x4 122 #define MODEM_ENABLE 0x8 123 #define INTERRUPT_DISABLE 0x0 178 #define FIFO_CTRL 0x01 180 #define XMIT_RESET 0x02 181 #define RCV_RESET 0x04 184 #define RECEIVE_FIFO_TRIGGER1 0x00 185 #define RECEIVE_FIFO_TRIGGER4 0x40 186 #define RECEIVE_FIFO_TRIGGER8 0x80 187 #define RECEIVE_FIFO_TRIGGER12 0xc0 188 #define TRIG_LEVEL 0xc0
Parameter block for ioctl.
Definition: libio.h:1355