1.8.7.67 1.25.6.67 1.26.5.67 1.27.5.67 1.28.6.67 1.36.7.65 1.41.5.67 1.42.3.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