1.27.25.13 TWIHSx_ErrorGet Function

C

/* x = TWIHS instance number */

/* TWIHS master mode */
TWIHS_ERROR TWIHSx_ErrorGet(void)

Summary

Returns the TWIHS error that occurred on the bus.

Description

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

Precondition

TWIHSx_Initialize must have been called for the associated TWIHS instance.

Parameters

None.

Returns

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

Example

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

Remarks

None