1.2.21.20 1.3.25.20 1.4.21.20 1.5.25.20 1.6.22.20 1.7.23.20 1.9.19.20 1.29.23.20 1.30.18.20 1.31.18.20 1.32.26.20 1.33.16.20 1.37.18.20 1.38.21.20 1.39.18.20 1.40.20.20 SERCOMx_USART_ReadByte Function

C

/* x = SERCOM instance number */

/* Blocking mode */

int SERCOMx_USART_ReadByte( void )

Summary

Submits request to read a byte of data to the given USART peripheral

Description

This function submits request to read a byte of data to the given USART peripheral. This Function is available only in blocking mode. Application must call the SERCOMx_USART_ReceiverIsReady API to check if a byte is available with the receiver before calling this API.

Precondition

SERCOMx_USART_Initialize must have been called for the associated USART instance.

Parameters

None

Returns

Read byte.

Example

//Example to use in non-interrupt
char rxData;

if(SERCOM0_USART_ReceiverIsReady() == true)
{
    rxData = SERCOM0_USART_ReadByte();
}

Remarks

None