unsigned char USART_IsDataAvailable(AT91S_USART *usart) { if ((usart->US_CSR & AT91C_US_RXRDY) != 0) { return 1; } else { return 0; } }