Function esp_idf_svc::sys::i2c_master_read_byte

source ·
pub unsafe extern "C" fn i2c_master_read_byte(
    cmd_handle: *mut c_void,
    data: *mut u8,
    ack: u32,
) -> i32
Expand description

@brief Queue a “read byte” command to the commands list. A single byte will be read on the I2C bus. 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 Pointer where the received byte will the stored. This buffer shall remain valid until the transaction is finished. @param ack 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