1.35.21.3 USARTx_WriteIsBusy Function

C

/* x = USART instance number */

/* Non-blocking mode */
bool USARTx_WriteIsBusy( void )

Summary

Returns the write request status associated with the given USART peripheral instance.

Description

This function returns the write request status associated with the given USART peripheral instance. It can be used to check the completion status of the USARTx_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

USARTx_Initialize must have been called for the associated USART instance.

Parameters

None.

Returns

true - USART is busy in processing the previous write request.

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

Example

if(USART1_WriteIsBusy() == true)
{
    //USART is currently processing the write request.
}
else
{
    // write is completed.
}

Remarks

None