32 #define UART_TX_BUFFER_SIZE 256 //Ring buffer length of tx buffer
33 #define UART_RX_BUFFER_SIZE 256 //Ring buffer length of rx buffer
35 #define UART_BUFF_EN 1 //use uart buffer , FOR UART0
36 #define UART_SELFTEST 1 //set 1:enable the loop test demo for uart buffer, FOR UART0
38 #define UART_HW_RTS 0 //set 1: enable uart hw flow control RTS, PIN MTDO, FOR UART0
39 #define UART_HW_CTS 0 //set1: enable uart hw flow contrl CTS , PIN MTCK, FOR UART0
160 #define UART_FIFO_LEN 128 //define the tx fifo length
161 #define UART_TX_EMPTY_THRESH_VAL 0x10
210 #define FUNC_UART0_CTS 4
212 #define FUNC_U1TXD_BK 2
213 #define UART_LINE_INV_MASK (0x3f<<19)
UartExistParity
Definition: include/driver/uart.h:67
Definition: include/driver/uart.h:137
void uart0_sendStr(const char *str)
Definition: uart.c:231
UartBautRate
Definition: include/driver/uart.h:81
Definition: driver/uart.h:152
Definition: include/driver/uart.h:138
UART_HwFlowCtrl
Definition: include/driver/uart.h:106
UartBitsNum4Char
Definition: driver/uart.h:59
uint8 * pInPos
Definition: driver/uart.h:178
uint32 Space
Definition: driver/uart.h:192
Definition: include/driver/uart.h:49
Definition: include/driver/uart.h:109
UART_HwFlowCtrl
Definition: driver/uart.h:117
uint32 UartRxBuffSize
Definition: driver/uart.h:187
Definition: include/driver/uart.h:103
TCPState
Definition: include/driver/uart.h:184
RcvMsgBuffState
Definition: driver/uart.h:124
Definition: include/driver/uart.h:92
void uart_init(UartBautRate uart0_br, UartBautRate uart1_br)
Definition: uart.c:353
void uart0_tx_buffer(uint8 *buf, uint16 len)
Definition: uart.c:197
struct UartBuffer * nextBuff
Definition: driver/uart.h:183
UART_LineLevelInverse
Definition: driver/uart.h:83
void uart_buf_free(struct UartBuffer *pBuff)
Definition: driver/uart.h:186
void tx_start_uart_buffer(uint8 uart_no)
Definition: include/driver/uart.h:95
UartStopBitsNum
Definition: driver/uart.h:66
uint8 * pWritePos
Definition: driver/uart.h:189
#define UART_RXD_INV
Definition: driver/uart_register.h:106
UART_LineLevelInverse
Definition: include/driver/uart.h:72
UartFlowCtrl
Definition: driver/uart.h:111
Definition: include/driver/uart.h:185
void uart1_sendStr_no_wait(const char *str)
Definition: uart.c:427
Definition: include/driver/uart.h:52
STATUS uart_tx_one_char(uint8 uart, uint8 TxChar)
Definition: uart.c:128
void UART_WaitTxFifoEmpty(uint8 uart_no, uint32 time_out_us)
Definition: uart.c:735
void UART_SetBaudrate(uint8 uart_no, uint32 baud_rate)
Definition: uart.c:711
Definition: include/driver/uart.h:84
Definition: driver/uart.h:175
Definition: include/driver/uart.h:83
unsigned short uint16
Definition: c_types.h:48
void UART_SetPrintPort(uint8 uart_no)
Definition: uart.c:795
void UART_SetStopBits(uint8 uart_no, UartStopBitsNum bit_num)
Definition: uart.c:688
Definition: include/driver/uart.h:56
void uart_rx_intr_disable(uint8 uart_no)
Definition: uart.c:649
Definition: include/driver/uart.h:136
STATUS RxBuffState
Definition: driver/uart.h:191
Definition: driver/uart.h:130
Definition: include/driver/uart.h:76
Definition: include/driver/uart.h:74
STATUS BuffState
Definition: driver/uart.h:180
Definition: include/driver/uart.h:73
Definition: include/driver/uart.h:186
Definition: include/driver/uart.h:135
RcvMsgState
Definition: include/driver/uart.h:133
Definition: include/driver/uart.h:77
Definition: include/driver/uart.h:107
uint16 Space
Definition: driver/uart.h:181
Definition: driver/uart.h:139
void UART_SetFlowCtrl(uint8 uart_no, UART_HwFlowCtrl flow_ctrl, uint8 rx_thresh)
Definition: uart.c:717
Definition: include/driver/uart.h:97
LOCAL void tx_fifo_insert(struct UartBuffer *pTxBuff, uint8 data_len, uint8 uart_no)
void UART_SetParity(uint8 uart_no, UartParityMode Parity_mode)
Definition: uart.c:701
uint8 * pOutPos
Definition: driver/uart.h:179
uint8 * pUartRxBuff
Definition: driver/uart.h:188
Definition: include/driver/uart.h:89
Definition: include/driver/uart.h:82
Definition: include/driver/uart.h:91
Definition: include/driver/uart.h:86
Definition: include/driver/uart.h:134
void UART_SetWordLength(uint8 uart_no, UartBitsNum4Char len)
Definition: uart.c:682
Definition: include/driver/uart.h:94
Definition: include/driver/uart.h:101
Definition: include/driver/uart.h:88
Definition: include/driver/uart.h:68
unsigned char uint8
Definition: c_types.h:43
#define UART_CTS_INV
Definition: driver/uart_register.h:105
UartExistParity
Definition: driver/uart.h:78
uint8 * pReadPos
Definition: driver/uart.h:190
UartBautRate
Definition: driver/uart.h:92
UartBitsNum4Char
Definition: include/driver/uart.h:48
Definition: include/driver/uart.h:64
uint8 * pUartBuff
Definition: driver/uart.h:177
STATUS
Definition: c_types.h:77
Definition: include/driver/uart.h:115
struct UartBuffer * Uart_Buf_Init()
UartStopBitsNum
Definition: include/driver/uart.h:55
bool UART_CheckOutputFinished(uint8 uart_no, uint32 time_out_us)
Definition: uart.c:750
Definition: include/driver/uart.h:110
STATUS uart_tx_one_char_no_wait(uint8 uart, uint8 TxChar)
Definition: uart.c:402
void UART_ResetFifo(uint8 uart_no)
Definition: uart.c:775
unsigned int uint32
Definition: c_types.h:52
LOCAL void Uart_Buf_Cpy(struct UartBuffer *pCur, char *pdata, uint16 data_len)
uint8 TcpControl
Definition: driver/uart.h:182
void UART_SetLineInverse(uint8 uart_no, UART_LineLevelInverse inverse_mask)
Definition: uart.c:694
Definition: include/driver/uart.h:93
Definition: include/driver/uart.h:102
RcvMsgBuffState
Definition: include/driver/uart.h:113
Definition: include/driver/uart.h:116
Definition: include/driver/uart.h:62
Definition: include/driver/uart.h:108
uint16 rx_buff_deq(char *pdata, uint16 data_len)
Definition: include/driver/uart.h:63
Definition: include/driver/uart.h:75
UartFlowCtrl
Definition: include/driver/uart.h:100
void UART_ClearIntrStatus(uint8 uart_no, uint32 clr_mask)
Definition: uart.c:782
Definition: include/driver/uart.h:50
RcvMsgState
Definition: driver/uart.h:144
Definition: include/driver/uart.h:69
Definition: include/driver/uart.h:85
#define UART_TXD_INV
Definition: driver/uart_register.h:103
#define LOCAL
Definition: c_types.h:70
Definition: include/driver/uart.h:90
Definition: include/driver/uart.h:96
Definition: include/driver/uart.h:58
void UART_SetIntrEna(uint8 uart_no, uint32 ena_mask)
Definition: uart.c:788
uint32 UartBuffSize
Definition: driver/uart.h:176
Definition: include/driver/uart.h:114
Definition: include/driver/uart.h:87
UartParityMode
Definition: include/driver/uart.h:61
Definition: include/driver/uart.h:51
Definition: include/driver/uart.h:57
void tx_buff_enq(char *pdata, uint16 data_len)
UartParityMode
Definition: driver/uart.h:72
void uart_rx_intr_enable(uint8 uart_no)
Definition: uart.c:658
#define UART_RTS_INV
Definition: driver/uart_register.h:102