__HAL_UART_GET_FLAG macro
Checks whether the specified UART flag is set or not.
#define __HAL_UART_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->Instance->SR & (__FLAG__)) == (__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 one 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_TXE: Transmit data register empty flag @arg UART_FLAG_TC: Transmission Complete flag @arg UART_FLAG_RXNE: Receive data register not empty flag @arg UART_FLAG_IDLE: Idle Line detection flag @arg UART_FLAG_ORE: Overrun Error flag @arg UART_FLAG_NE: Noise Error flag @arg UART_FLAG_FE: Framing Error flag @arg UART_FLAG_PE: Parity Error flag
Return value
The new state of __FLAG__ (TRUE or FALSE).
Examples
__HAL_UART_GET_FLAG is referenced by
2 libraries and example projects.