2.47.14 FLEXCOMx_USART_ReadByte Function
C
/* x = FLEXCOM instance number */
/* Blocking mode */
int FLEXCOMx_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 FLEXCOMx_USART_ReceiverIsReady API to check if a byte is available with the receiver before calling this API.
Precondition
-
FLEXCOMx_USART_Initialize must have been called for the associated USART instance.
-
Receiver readiness must be confirmed using FLEXCOMx_USART_ReceiverIsReady.
Parameters
None
Returns
Read byte.
Example
char rxData;
if(FLEXCOM0_USART_ReceiverIsReady() == true)
{
rxData = FLEXCOM0_USART_ReadByte();
}
Remarks
None
