Function esp_idf_svc::hal::sys::i2c_slave_write_buffer
source · pub unsafe extern "C" fn i2c_slave_write_buffer(
i2c_num: u32,
data: *const u8,
size: i32,
ticks_to_wait: u32,
) -> i32
Expand description
@brief Write bytes to internal ringbuffer of the I2C slave data. When the TX fifo empty, the ISR will fill the hardware FIFO with the internal ringbuffer’s data. @note This function shall only be called in I2C slave mode.
@param i2c_num I2C port number
@param data Bytes to write into internal buffer
@param size Size, in bytes, of data
buffer
@param ticks_to_wait Maximum ticks to wait.
@return - ESP_FAIL (-1) Parameter error - Other (>=0) The number of data bytes pushed to the I2C slave buffer.