/* Returns 1 if some data has been received and can be read from an USART; otherwise returns 0.  */
unsigned char USART_IsDataAvailable(AT91S_USART *usart)
/* Returns 1 if some data has been received and can be read from an USART; otherwise returns 0.  */
unsigned char USART_IsDataAvailable(AT91S_USART *usart)
{
    if ((usart->US_CSR & AT91C_US_RXRDY) != 0) {
        return 1;
    }
    else {
        return 0;
    }
}