Function esp_idf_svc::hal::sys::i2c_slave_write_ram
source ยท pub unsafe extern "C" fn i2c_slave_write_ram(
i2c_slave: *mut i2c_slave_dev_t,
ram_address: u8,
data: *const u8,
size: usize,
) -> i32
Expand description
@brief Write bytes to I2C internal ram. This can be only used when access_ram_en
in configuration structure set to true.
@param[in] i2c_slave I2C slave device handle that created by i2c_new_slave_device
.
@param[in] ram_address The offset of RAM (Cannot larger than I2C RAM memory)
@param[in] data Buffer to fill.
@param[in] size Received size from RAM.
@return
- ESP_OK: I2C slave transmit success.
- ESP_ERR_INVALID_ARG: I2C slave transmit parameter invalid.
- ESP_ERR_INVALID_SIZE: Write size is larger than
- ESP_ERR_NOT_SUPPORTED: This function should be work in non-fifo mode, but I2C_SLAVE_FIFO mode is configured