34 #define ESP_DEBUG_ON 1
35 #define ESP_DEBUG(fmt, ...) \
39 os_printf("<<-ESP-DEBUG->> File: %20s" \
41 " | LINE:[%5d] > " fmt "\n", \
42 __FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__); \
47 #define UART_TX_BUFFER_SIZE 256 //Ring buffer length of tx buffer
48 #define UART_RX_BUFFER_SIZE 256 //Ring buffer length of rx buffer
50 #define UART_BUFF_EN 1 //use uart buffer , FOR UART0
51 #define UART_SELFTEST 1 //set 1:enable the loop test demo for uart buffer, FOR UART0
53 #define UART_HW_RTS 0 //set 1: enable uart hw flow control RTS, PIN MTDO, FOR UART0
54 #define UART_HW_CTS 0 //set1: enable uart hw flow contrl CTS , PIN MTCK, FOR UART0
171 #define UART_FIFO_LEN 128 //define the tx fifo length
172 #define UART_TX_EMPTY_THRESH_VAL 0x10
222 #define FUNC_UART0_CTS 4
224 #define FUNC_U1TXD_BK 2
225 #define UART_LINE_INV_MASK (0x3f<<19)
UartFlowCtrl flow_ctrl
Definition: driver/uart.h:158
Definition: driver/uart.h:152
UartBitsNum4Char
Definition: driver/uart.h:59
uint8 * pInPos
Definition: driver/uart.h:178
uint32 Space
Definition: driver/uart.h:192
void uart0_sendStr(const char *str)
Definition: uart.c:231
RcvMsgBuffState BuffState
Definition: driver/uart.h:136
Definition: driver/uart.h:104
Definition: driver/uart.h:125
UART_HwFlowCtrl
Definition: driver/uart.h:117
uint32 UartRxBuffSize
Definition: driver/uart.h:187
RcvMsgBuffState
Definition: driver/uart.h:124
Definition: driver/uart.h:88
Definition: driver/uart.h:67
struct UartBuffer * nextBuff
Definition: driver/uart.h:183
UART_LineLevelInverse
Definition: driver/uart.h:83
Definition: driver/uart.h:87
void UART_SetPrintPort(uint8 uart_no)
Definition: uart.c:795
void UART_SetParity(uint8 uart_no, UartParityMode Parity_mode)
Definition: uart.c:701
Definition: driver/uart.h:186
UartStopBitsNum
Definition: driver/uart.h:66
uint8 * pWritePos
Definition: driver/uart.h:189
RcvMsgState rcv_state
Definition: driver/uart.h:161
Definition: driver/uart.h:149
#define UART_RXD_INV
Definition: driver/uart_register.h:106
UartFlowCtrl
Definition: driver/uart.h:111
LOCAL void tx_fifo_insert(struct UartBuffer *pTxBuff, uint8 data_len, uint8 uart_no)
Definition: driver/uart.h:75
Definition: driver/uart.h:103
void UART_SetFlowCtrl(uint8 uart_no, UART_HwFlowCtrl flow_ctrl, uint8 rx_thresh)
Definition: uart.c:717
Definition: driver/uart.h:196
Definition: driver/uart.h:147
void UART_SetIntrEna(uint8 uart_no, uint32 ena_mask)
Definition: uart.c:788
STATUS uart_tx_one_char(uint8 uart, uint8 TxChar)
Definition: uart.c:128
Definition: driver/uart.h:127
void uart1_tx_buffer(uint8 *buf, uint16 len)
Definition: uart.c:214
UartBautRate baut_rate
Definition: driver/uart.h:153
Definition: driver/uart.h:175
Definition: driver/uart.h:63
unsigned short uint16
Definition: c_types.h:48
void UART_ClearIntrStatus(uint8 uart_no, uint32 clr_mask)
Definition: uart.c:782
void UART_SetBaudrate(uint8 uart_no, uint32 baud_rate)
Definition: uart.c:711
void tx_buff_enq(char *pdata, uint16 data_len)
Definition: driver/uart.h:99
STATUS RxBuffState
Definition: driver/uart.h:191
Definition: driver/uart.h:130
Definition: driver/uart.h:79
Definition: driver/uart.h:69
void UART_WaitTxFifoEmpty(uint8 uart_no, uint32 time_out_us)
Definition: uart.c:735
void UART_SetWordLength(uint8 uart_no, UartBitsNum4Char len)
Definition: uart.c:682
STATUS BuffState
Definition: driver/uart.h:180
Definition: driver/uart.h:118
UartParityMode parity
Definition: driver/uart.h:156
Definition: driver/uart.h:146
void UART_SetStopBits(uint8 uart_no, UartStopBitsNum bit_num)
Definition: uart.c:688
Definition: driver/uart.h:93
uint16 Space
Definition: driver/uart.h:181
Definition: driver/uart.h:139
TrxMsgBuff trx_buff
Definition: driver/uart.h:160
Definition: driver/uart.h:197
Definition: driver/uart.h:62
void UART_ResetFifo(uint8 uart_no)
Definition: uart.c:775
void uart_rx_intr_enable(uint8 uart_no)
Definition: uart.c:658
uint8 * pOutPos
Definition: driver/uart.h:179
uint8 * pUartRxBuff
Definition: driver/uart.h:188
Definition: driver/uart.h:98
void uart_buf_free(struct UartBuffer *pBuff)
uint8 * pTrxBuff
Definition: driver/uart.h:141
Definition: driver/uart.h:96
void UART_SetLineInverse(uint8 uart_no, UART_LineLevelInverse inverse_mask)
Definition: uart.c:694
Definition: driver/uart.h:101
LOCAL void Uart_Buf_Cpy(struct UartBuffer *pCur, char *pdata, uint16 data_len)
void tx_start_uart_buffer(uint8 uart_no)
TCPState
Definition: driver/uart.h:195
Definition: driver/uart.h:73
Definition: driver/uart.h:113
STATUS uart_tx_one_char_no_wait(uint8 uart, uint8 TxChar)
Definition: uart.c:402
unsigned char uint8
Definition: c_types.h:43
struct UartBuffer * Uart_Buf_Init()
#define UART_CTS_INV
Definition: driver/uart_register.h:105
UartExistParity
Definition: driver/uart.h:78
uint8 TrigLvl
Definition: driver/uart.h:135
uint8 * pReadPos
Definition: driver/uart.h:190
UartBautRate
Definition: driver/uart.h:92
Definition: driver/uart.h:145
Definition: driver/uart.h:126
uint8 * pUartBuff
Definition: driver/uart.h:177
STATUS
Definition: c_types.h:77
UartBitsNum4Char data_bits
Definition: driver/uart.h:154
Definition: driver/uart.h:114
Definition: driver/uart.h:105
UartExistParity exist_parity
Definition: driver/uart.h:155
Definition: driver/uart.h:112
Definition: driver/uart.h:84
Definition: driver/uart.h:61
void uart_rx_intr_disable(uint8 uart_no)
Definition: uart.c:649
Definition: driver/uart.h:85
unsigned int uint32
Definition: c_types.h:52
Definition: driver/uart.h:106
bool UART_CheckOutputFinished(uint8 uart_no, uint32 time_out_us)
Definition: uart.c:750
Definition: driver/uart.h:102
Definition: driver/uart.h:74
uint8 TcpControl
Definition: driver/uart.h:182
Definition: driver/uart.h:60
UartStopBitsNum stop_bits
Definition: driver/uart.h:157
Definition: driver/uart.h:108
Definition: driver/uart.h:100
Definition: driver/uart.h:107
int received
Definition: driver/uart.h:162
uint8 * pRcvMsgBuff
Definition: driver/uart.h:132
void uart0_tx_buffer(uint8 *buf, uint16 len)
Definition: uart.c:197
Definition: driver/uart.h:95
Definition: driver/uart.h:68
int buff_uart_no
Definition: driver/uart.h:163
RcvMsgBuff rcv_buff
Definition: driver/uart.h:159
Definition: driver/uart.h:120
Definition: driver/uart.h:97
Definition: driver/uart.h:86
RcvMsgState
Definition: driver/uart.h:144
uint32 RcvBuffSize
Definition: driver/uart.h:131
void uart_init(UartBautRate uart0_br, UartBautRate uart1_br)
Definition: uart.c:353
void uart1_sendStr_no_wait(const char *str)
Definition: uart.c:427
uint16 rx_buff_deq(char *pdata, uint16 data_len)
#define UART_TXD_INV
Definition: driver/uart_register.h:103
#define LOCAL
Definition: c_types.h:70
uint8 * pReadPos
Definition: driver/uart.h:134
Definition: driver/uart.h:148
Definition: driver/uart.h:121
uint8 * pWritePos
Definition: driver/uart.h:133
uint32 UartBuffSize
Definition: driver/uart.h:176
Definition: driver/uart.h:119
Definition: driver/uart.h:94
UartParityMode
Definition: driver/uart.h:72
Definition: driver/uart.h:80
uint32 TrxBuffSize
Definition: driver/uart.h:140
#define UART_RTS_INV
Definition: driver/uart_register.h:102