1.1.11.27 I2CSMBx_HostErrorGet Function

C

/* x = I2C SMBUS peripheral instance number */

/* I2C SMBUS Host mode */
I2C_SMB_HOST_ERROR I2CSMBx_HostErrorGet(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_HOST_ERROR, identifying the error that has occurred.

Example

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

Remarks

None