__HAL_UART_CLEAR_FLAG macro
Clears the specified UART pending flag.
#define __HAL_UART_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->SR = ~(__FLAG__)) Arguments
__HANDLE__
specifies the UART Handle. UART Handle selects the USARTx or UARTy peripheral (USART,UART availability and x,y values depending on device).
__FLAG__
specifies the flag to check. This parameter can be any combination of the following values: @arg UART_FLAG_CTS: CTS Change flag (not available for UART4 and UART5). @arg UART_FLAG_LBD: LIN Break detection flag. @arg UART_FLAG_TC: Transmission Complete flag. @arg UART_FLAG_RXNE: Receive data register not empty flag.
Return value
None
Notes
PE (Parity error), FE (Framing error), NE (Noise error), ORE (Overrun error) and IDLE (Idle line detected) flags are cleared by software sequence: a read operation to USART_SR register followed by a read operation to USART_DR register. RXNE flag can be also cleared by a read to the USART_DR register. TC flag can be also cleared by software sequence: a read operation to USART_SR register followed by a write operation to USART_DR register. TXE flag is cleared only by a write to the USART_DR register.