1.1.11.50 I2C_SMB_TARGET_CALLBACK Typedef
C
/* I2C SMBUS Target mode */ typedef bool (*I2C_SMB_TARGET_CALLBACK) (I2C_SMB_TARGET_TRANSFER_EVENT event, uintptr_t contextHandle);
Summary
Defines the data type and function signature for the I2C SMBUS Target mode callback function.
Description
This data type defines the function signature for the I2C SMBUS Target mode callback function. The I2C peripheral will call back the client's function with this signature to report I2C SMBUS Target mode events.
Precondition
I2CSMBx_Initialize must have been called for the given I2C peripheral instance and I2CSMBx_TargetCallbackRegister must have been called to set the function to be called.
Parameters
Param | Description |
---|---|
event | Indicates the data transfer event for which the callback function has been called. |
contextHandle | Allows the caller to provide a context value (usually a pointer to the callers context for multi-instance clients). |
Returns
None
Example
bool i2cSMB0TargetEventHandler (I2C_SMB_TARGET_TRANSFER_EVENT event, uintptr_t contextHandle)
{
// Handle callback
}
// Register Callback function which is defined above
I2CSMB0_TargetCallbackRegister(i2cSMB0TargetEventHandler, (uintptr_t)NULL);
Remarks
None