5 #ifndef _NB_SER_INTERNAL 6 #define _NB_SER_INTERNAL 12 #define UART_INIT (0x0001) 14 #define UART_TX_EMPTY (0x0002) 16 #define UART_SENT_STOP (0x0004) 18 #define UART_RX_STOP (0x0008) 20 #define UART_FLOW_TX \ 24 #define UART_FLOW_RX \ 28 #define UART_FLOW_NEED_TOSTOP (0x0040) 30 #define UART_FLOW_NEED_TOSTART (0x0080) 32 #define UART_RS485_TX_MODE \ 36 #define UART_MULTI_MODE (0x0200) 38 #define UART_FLOW_TXRTSCTS \ 42 #define UART_FLOW_TX485FD \ 46 #define UART_FLOW_TX485HD \ 50 #define UART_FLOW_RXRTSCTS \ 54 #define UART_RS422_MODE (0x4000) 56 #define UART_TX_LAST_BIT \ 71 #define UART_XOFF_LIMIT (100) 72 #define UART_XON_LIMIT (200) 74 typedef int(GetNextCharFunc)(
int uartnum);
75 typedef void(PutNextCharFunc)(
int uartnum, uint8_t c);
77 int BaseGetChar(
int num);
78 void BasePutChar(
int num, uint8_t c);
82 fifo_buffer_storage m_FifoRead;
83 fifo_buffer_storage m_FifoWrite;
84 GetNextCharFunc *m_pGetCharFunc;
85 PutNextCharFunc *m_pPutCharFunc;
90 extern UartDataRec UartData[];