1.1.11.32 I2CSMBx_TargetErrorGet Function

C

/* x = I2C SMBUS peripheral instance number */

/* I2C SMBUS Target mode */

I2C_SMB_TARGET_ERROR I2CSMBx_TargetErrorGet(void)	

Summary

Returns the I2C error that occurred on the bus.

Description

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

Precondition

I2CSMBx_Initialize must have been called for the associated I2C instance.

Parameters

None.

Returns

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

Example

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

Remarks

None