32 #define ETS_UART_INTR_ENABLE() _xt_isr_unmask(1 << ETS_UART_INUM)
33 #define ETS_UART_INTR_DISABLE() _xt_isr_mask(1 << ETS_UART_INUM)
34 #define UART_INTR_MASK 0x1ff
35 #define UART_LINE_INV_MASK (0x3f<<19)
38 UART_WordLength_5b = 0x0,
39 UART_WordLength_6b = 0x1,
40 UART_WordLength_7b = 0x2,
41 UART_WordLength_8b = 0x3
45 USART_StopBits_1 = 0x1,
46 USART_StopBits_1_5 = 0x2,
47 USART_StopBits_2 = 0x3,
56 USART_Parity_None = 0x2,
57 USART_Parity_Even = 0x0,
58 USART_Parity_Odd = 0x1
73 BIT_RATE_19200 = 19200,
74 BIT_RATE_38400 = 38400,
75 BIT_RATE_57600 = 57600,
76 BIT_RATE_74880 = 74880,
77 BIT_RATE_115200 = 115200,
78 BIT_RATE_230400 = 230400,
79 BIT_RATE_460800 = 460800,
80 BIT_RATE_921600 = 921600,
81 BIT_RATE_1843200 = 1843200,
82 BIT_RATE_3686400 = 3686400,
86 USART_HardwareFlowControl_None = 0x0,
87 USART_HardwareFlowControl_RTS = 0x1,
88 USART_HardwareFlowControl_CTS = 0x2,
89 USART_HardwareFlowControl_CTS_RTS = 0x3
93 UART_None_Inverse = 0x0,
94 UART_Rxd_Inverse = UART_RXD_INV,
95 UART_CTS_Inverse = UART_CTS_INV,
96 UART_Txd_Inverse = UART_TXD_INV,
97 UART_RTS_Inverse = UART_RTS_INV,
98 } UART_LineLevelInverse;
101 UART_BautRate baud_rate;
102 UART_WordLength data_bits;
103 UART_ParityMode parity;
104 UART_StopBits stop_bits;
105 UART_HwFlowCtrl flow_ctrl;
106 uint8 UART_RxFlowThresh ;
107 uint32 UART_InverseMask;
111 uint32 UART_IntrEnMask;
112 uint8 UART_RX_TimeOutIntrThresh;
113 uint8 UART_TX_FifoEmptyIntrThresh;
114 uint8 UART_RX_FifoFullIntrThresh;
240 void UART_SetParity(UART_Port uart_no, UART_ParityMode Parity_mode) ;
261 void UART_SetFlowCtrl(UART_Port uart_no, UART_HwFlowCtrl flow_ctrl, uint8 rx_thresh);
void UART_ParamConfig(UART_Port uart_no, UART_ConfigTypeDef *pUARTConfig)
Config Common parameters of serial ports.
void UART_SetFlowCtrl(UART_Port uart_no, UART_HwFlowCtrl flow_ctrl, uint8 rx_thresh)
Configure Hardware flow control.
void UART_SetBaudrate(UART_Port uart_no, uint32 baud_rate)
Configure the Baud rate.
void uart_init_new(void)
An example illustrates how to configure the serial port.
void UART_SetIntrEna(UART_Port uart_no, uint32 ena_mask)
Enable uart interrupts .
void UART_IntrConfig(UART_Port uart_no, UART_IntrConfTypeDef *pUARTIntrConf)
Config types of uarts.
void UART_SetParity(UART_Port uart_no, UART_ParityMode Parity_mode)
Configure whether to open the parity.
void UART_ClearIntrStatus(UART_Port uart_no, uint32 clr_mask)
Clear uart interrupt flags.
void UART_SetLineInverse(UART_Port uart_no, UART_LineLevelInverse inverse_mask)
Configure trigging signal of uarts.
void UART_SetWordLength(UART_Port uart_no, UART_WordLength len)
Config the length of the uart communication data bits.
void UART_intr_handler_register(void *fn, void *arg)
Register an application-specific interrupt handler for Uarts interrupts.
void UART_WaitTxFifoEmpty(UART_Port uart_no)
Wait uart tx fifo empty, do not use it if tx flow control enabled.
void UART_SetStopBits(UART_Port uart_no, UART_StopBits bit_num)
Config the length of the uart communication stop bits.
void UART_SetPrintPort(UART_Port uart_no)
Config from which serial output printf function.
void UART_ResetFifo(UART_Port uart_no)
Clear uart tx fifo and rx fifo.