mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-05-23 18:18:36 +08:00
feat(driver): Use astyle to format the code
This commit is contained in:
@ -122,149 +122,149 @@ typedef struct {
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
/**
|
||||
* @brief Wait uart tx fifo empty, do not use it if tx flow control enabled.
|
||||
*
|
||||
*
|
||||
* @param UART_Port uart_no:UART0 or UART1
|
||||
*
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
void UART_WaitTxFifoEmpty(UART_Port uart_no); //do not use if tx flow control enabled
|
||||
|
||||
/**
|
||||
/**
|
||||
* @brief Clear uart tx fifo and rx fifo.
|
||||
*
|
||||
*
|
||||
* @param UART_Port uart_no : UART0 or UART1
|
||||
*
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
void UART_ResetFifo(UART_Port uart_no);
|
||||
|
||||
/**
|
||||
/**
|
||||
* @brief Clear uart interrupt flags.
|
||||
*
|
||||
*
|
||||
* @param UART_Port uart_no : UART0 or UART1
|
||||
* @param uint32 clr_mask : To clear the interrupt bits
|
||||
*
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
void UART_ClearIntrStatus(UART_Port uart_no, uint32 clr_mask);
|
||||
|
||||
/**
|
||||
/**
|
||||
* @brief Enable uart interrupts .
|
||||
*
|
||||
*
|
||||
* @param UART_Port uart_no : UART0 or UART1
|
||||
* @param uint32 ena_mask : To enable the interrupt bits
|
||||
*
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
void UART_SetIntrEna(UART_Port uart_no, uint32 ena_mask);
|
||||
|
||||
/**
|
||||
/**
|
||||
* @brief Register an application-specific interrupt handler for Uarts interrupts.
|
||||
*
|
||||
*
|
||||
* @param void *fn : interrupt handler for Uart interrupts.
|
||||
* @param void *arg : interrupt handler's arg.
|
||||
*
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
void UART_intr_handler_register(void *fn, void *arg);
|
||||
void UART_intr_handler_register(void* fn, void* arg);
|
||||
|
||||
/**
|
||||
/**
|
||||
* @brief Config from which serial output printf function.
|
||||
*
|
||||
*
|
||||
* @param UART_Port uart_no : UART0 or UART1
|
||||
*
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
void UART_SetPrintPort(UART_Port uart_no);
|
||||
|
||||
/**
|
||||
/**
|
||||
* @brief Config Common parameters of serial ports.
|
||||
*
|
||||
*
|
||||
* @param UART_Port uart_no : UART0 or UART1
|
||||
* @param UART_ConfigTypeDef *pUARTConfig : parameters structure
|
||||
*
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
void UART_ParamConfig(UART_Port uart_no, UART_ConfigTypeDef *pUARTConfig);
|
||||
void UART_ParamConfig(UART_Port uart_no, UART_ConfigTypeDef* pUARTConfig);
|
||||
|
||||
/**
|
||||
/**
|
||||
* @brief Config types of uarts.
|
||||
*
|
||||
*
|
||||
* @param UART_Port uart_no : UART0 or UART1
|
||||
* @param UART_IntrConfTypeDef *pUARTIntrConf : parameters structure
|
||||
*
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
void UART_IntrConfig(UART_Port uart_no, UART_IntrConfTypeDef *pUARTIntrConf);
|
||||
void UART_IntrConfig(UART_Port uart_no, UART_IntrConfTypeDef* pUARTIntrConf);
|
||||
|
||||
/**
|
||||
/**
|
||||
* @brief Config the length of the uart communication data bits.
|
||||
*
|
||||
*
|
||||
* @param UART_Port uart_no : UART0 or UART1
|
||||
* @param UART_WordLength len : the length of the uart communication data bits
|
||||
*
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
void UART_SetWordLength(UART_Port uart_no, UART_WordLength len);
|
||||
|
||||
/**
|
||||
/**
|
||||
* @brief Config the length of the uart communication stop bits.
|
||||
*
|
||||
*
|
||||
* @param UART_Port uart_no : UART0 or UART1
|
||||
* @param UART_StopBits bit_num : the length uart communication stop bits
|
||||
*
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
void UART_SetStopBits(UART_Port uart_no, UART_StopBits bit_num);
|
||||
|
||||
/**
|
||||
/**
|
||||
* @brief Configure whether to open the parity.
|
||||
*
|
||||
*
|
||||
* @param UART_Port uart_no : UART0 or UART1
|
||||
* @param UART_ParityMode Parity_mode : the enum of uart parity configuration
|
||||
*
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
void UART_SetParity(UART_Port uart_no, UART_ParityMode Parity_mode) ;
|
||||
|
||||
/**
|
||||
/**
|
||||
* @brief Configure the Baud rate.
|
||||
*
|
||||
*
|
||||
* @param UART_Port uart_no : UART0 or UART1
|
||||
* @param uint32 baud_rate : the Baud rate
|
||||
*
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
void UART_SetBaudrate(UART_Port uart_no, uint32 baud_rate);
|
||||
|
||||
/**
|
||||
/**
|
||||
* @brief Configure Hardware flow control.
|
||||
*
|
||||
*
|
||||
* @param UART_Port uart_no : UART0 or UART1
|
||||
* @param UART_HwFlowCtrl flow_ctrl : Hardware flow control mode
|
||||
* @param uint8 rx_thresh : threshold of Hardware flow control
|
||||
*
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
void UART_SetFlowCtrl(UART_Port uart_no, UART_HwFlowCtrl flow_ctrl, uint8 rx_thresh);
|
||||
|
||||
/**
|
||||
/**
|
||||
* @brief Configure trigging signal of uarts.
|
||||
*
|
||||
*
|
||||
* @param UART_Port uart_no : UART0 or UART1
|
||||
* @param UART_LineLevelInverse inverse_mask : Choose need to flip the IO
|
||||
*
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
void UART_SetLineInverse(UART_Port uart_no, UART_LineLevelInverse inverse_mask) ;
|
||||
|
||||
/**
|
||||
/**
|
||||
* @brief An example illustrates how to configure the serial port.
|
||||
*
|
||||
*
|
||||
* @param null
|
||||
*
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
void uart_init_new(void);
|
||||
|
Reference in New Issue
Block a user