/* Checks whether the specified UART flag is set or not.  */
FlagStatus UART_GetFlagStatus(UART_TypeDef *uart, u16 flag)
/* Checks whether the specified UART flag is set or not.  */
FlagStatus UART_GetFlagStatus(UART_TypeDef *uart, u16 flag)
{
    return (uart->CSR & flag) ? SET : RESET;
}