pub unsafe extern "C" fn i2c_write_bytes(
dev: i2c_t,
addr: u16,
data: *const c_void,
len: size_t,
flags: u8,
) -> c_int
Expand description
@brief Convenience function for writing several bytes onto the bus
@pre i2c_acquire must be called before accessing the bus
@param[in] dev I2C peripheral device @param[in] addr 7-bit or 10-bit device address (right-aligned) @param[in] data array holding the bytes to write to the device @param[in] len the number of bytes to write @param[in] flags optional flags (see @ref i2c_flags_t)
@return 0 When success @return -EIO When slave device doesn’t ACK the byte @return -ENXIO When no devices respond on the address sent on the bus @return -ETIMEDOUT When timeout occurs before device’s response @return -EINVAL When an invalid argument is given @return -EOPNOTSUPP When MCU driver doesn’t support the flag operation @return -EAGAIN When a lost bus arbitration occurs