CTL_STATUS_t ctl_i2c_write(CTL_I2C_BUS_t *self,
                           unsigned address,
                           const void *tx,
                           size_t len);

ctl_i2c_write locks the I2C bus self using ctl_i2c_lock_bus and proceeds to write the object pointed to by tx with size len bytes to the device with 8-bit slave address address.

ctl_i2c_write waits unconditionally for the write and read to complete, unlocks the bus using ctl_i2c_unlock_bus, and returns a standard status code.

For exact I2C transaction details, see CTL_I2C_REQUEST_t.

See Also