1.8.7.21 1.25.6.21 1.26.5.21 1.27.5.21 1.28.6.21 1.36.7.21 1.41.5.21 1.42.3.21 FLEXCOMx_USART_ReadAbort Function

C

/* x = FLEXCOM instance number */

/* Non-blocking mode */

bool FLEXCOMx_USART_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 FLEXCOMx_USART_ReadCountGet API to know the number of bytes successfully read before issuing the FLEXCOMx_USART_ReadAbort API.

Precondition

FLEXCOMx_USART_Initialize must have been called for the associated FLEXCOM_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
    FLEXCOM0_USART_ReadAbort();
}

Remarks

None