1.10.23.17 UARTx_ReadIsBusy Function

C

/* x = UART instance number */

/* Non-blocking mode */

bool UARTx_ReadIsBusy( void )

Summary

Returns the read request status associated with the given UART peripheral instance

Description

This function returns the read request status associated with the given UART peripheral instance. It can be used to check the completion status of the UARTx_Read() function when the library is configured for interrupt (non-blocking) mode. In that, the function can be used as an alternative to using a callback function to check for completion.

Precondition

UARTx_Initialize must have been called for the associated UART instance.

Parameters

None.

Returns

true - UART is busy in processing the previous read request

false - UART is free and ready to accept the new read request

Example

if(UART1_ReadIsBusy() == true)
{
    //UART is currently processing the previous read request.
    //Wait to submit new request.
}

Remarks

None