/* Checks whether the specified USART flag is set or not.  */
FlagStatus USART_GetFlagStatus(USART_Module *USARTx, uint16_t USART_FLAG)
/* Checks whether the specified USART flag is set or not.  */
FlagStatus USART_GetFlagStatus(USART_Module *USARTx, uint16_t USART_FLAG)
{
    FlagStatus bitstatus = RESET;
    assert_param(IS_USART_ALL_PERIPH(USARTx));
    assert_param(IS_USART_FLAG(USART_FLAG));
    if (USART_FLAG == USART_FLAG_CTSF)
    {
        assert_param(IS_USART_123_PERIPH(USARTx));
    }
    if ((USARTx->STS & USART_FLAG) != (uint16_t)RESET)
    {
        bitstatus = SET;
    }
    else
    {
        bitstatus = RESET;
    }
    return bitstatus;
}