1.35.17.7 TWIx_ErrorGet Function

C

/* x = TWI instance number */

/* TWI master mode */
TWI_ERROR TWIx_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

TWIx_Initialize must have been called for the associated TWI instance.

Parameters

None.

Returns

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

Example

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

Remarks

None