1.34.26.3 UARTx_WriteIsBusy Function

C

/* x = UART instance number */

/* Non-blocking mode */

bool UARTx_WriteIsBusy( void )

Summary

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

Description

This function returns the write request status associated with the given UART peripheral instance. It can be used to check the completion status of the UARTx_Write() function when the library is configured for non-blocking (interrupt) 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 write request.

false - UART is free and ready to accept a new write request.

Example

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

Remarks

None