Function esp_idf_hal::sys::i2c_master_write_byte
source · pub unsafe extern "C" fn i2c_master_write_byte(
cmd_handle: *mut c_void,
data: u8,
ack_en: bool,
) -> i32
Expand description
@brief Queue a “write byte” command to the commands list.
A single byte will be sent on the I2C port. This function shall only be
called in I2C master mode.
Call i2c_master_cmd_begin()
to send all queued commands
@param cmd_handle I2C commands list @param data Byte to send on the port @param ack_en Enable ACK signal
@return
- ESP_OK Success
- ESP_ERR_INVALID_ARG Parameter error
- ESP_ERR_NO_MEM The static buffer used to create cmd_handler
is too small
- ESP_FAIL No more memory left on the heap