1.19.21.21 UARTx_ReadByte Function
C
/* x = UART instance number */
/* Blocking mode */
int UARTx_ReadByte( void )
Summary
Submits request to read a byte of data to the given UART peripheral
Description
This function submits request to read a byte of data to the given UART peripheral. This Function is available only in blocking mode. Application must call the UARTx_ReceiverIsReady API to check if a byte is available with the receiver before calling this API.
Precondition
-
UARTx_Initialize must have been called for the associated UART instance.
-
Receiver readiness must be confirmed using UARTx_ReceiverIsReady.
Parameters
None
Returns
Read byte.
Example
char rxData; if(UART1_ReceiverIsReady() == true) { rxData = UART1_ReadByte(); }
Remarks
None