1.8.7.67 FLEXCOMx_TWI_ErrorGet Function

C

/* x = FLEXCOM instance number */

/* TWI master mode */

FLEXCOM_TWI_ERROR FLEXCOMx_TWI_ErrorGet(void)			

Summary

Returns the TWI error that occurred on the bus.

Description

This function returns the TWI error that occurred on the bus. The function can be called to identify the error cause.

Precondition

FLEXCOMx_TWI_Initialize must have been called for the associated FLEXCOM TWI instance.

Parameters

None.

Returns

Returns error of type FLEXCOM_TWI_ERROR, identifying the error that has occurred.

Example

if(FLEXCOM0_TWI_ErrorGet() == FLEXCOM_TWI_ERROR_NONE)
{
    //Transfer is completed successfully
}
else
{
    //Error occurred during transfer.
}

Remarks

None