1.34.27.22 1.35.21.22 USARTx_ReadAbort Function

C

/* x = USART instance number */

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

Summary

Aborts the ongoing read request

Description

This API lets the application abort an ongoing read request. If needed, the application can call the USARTx_ReadCountGet API to know the number of bytes successfully read before issuing the USARTx_ReadAbort API.

Precondition

USARTx_Initialize must have been called for the associated USART instance and a read request is already submitted.

Parameters

None

Returns

true - operation is successful

false - error during execution

Example

bool timeout;

if (timeout == true)
{
    // Kill the ongoing read read request
    USART1_ReadAbort();
}

Remarks

None