SIM_INTERFACE(i2c_master) {
void (*bus_freed)(conf_object_t *device);
void (*read_response)(conf_object_t *device, uint8 value);
void (*ack_read_response)(conf_object_t *device);
void (*write_response)(conf_object_t *device, i2c_status_t status);
void (*start_response)(conf_object_t *device, i2c_status_t status);
};
#define I2C_MASTER_INTERFACE "i2c_master"
The i2c_master interface should be implemented
by devices that intend to act as a master on an I2C link.
The functions start_response, read_response, ack_read_response and write_response are called as a response to the corresponding request_* calls to the I2C link.
The status parameter to the start_response function can have three values:
The status parameter to the write_response function can have two values, I2C_status_success for success, or I2C_status_noack if the slave device did not ack the written byte.