/* Returns 1 if a byte has been received and can be read on the given TWI peripheral; otherwise, returns 0. This function resets the status register of the TWI.  */
unsigned char TWI_ByteReceived(AT91S_TWI *pTwi)
/* Returns 1 if a byte has been received and can be read on the given TWI peripheral; otherwise, returns 0. This function resets the status register of the TWI.  */
unsigned char TWI_ByteReceived(AT91S_TWI *pTwi)
{
    return ((pTwi->TWI_SR & AT91C_TWI_RXRDY) == AT91C_TWI_RXRDY);
}