typedef enum { I2C_ack = 0, I2C_noack = 1 } i2c_ack_t; SIM_INTERFACE(i2c_master_v2) { void (*acknowledge)(conf_object_t *device, i2c_ack_t ack); void (*read_response)(conf_object_t *device, uint8 value); }; #define I2C_MASTER_V2_INTERFACE "i2c_master_v2"
The i2c_master_v2
interface should be implemented
by devices that intend to act as a master on an I2C link.
The function acknowledge is called in response to a
start or write call in the
i2c_slave_v2
interface of the slave device.
read_response is called as response to a
read call. More details can be found in the
documentation of the i2c_slave_v2 interface.