pub unsafe extern "C" fn i2c_slave_read_buffer(
    i2c_num: i2c_port_t,
    data: *mut u8,
    max_size: usize,
    ticks_to_wait: TickType_t
) -> c_int
Expand description

@brief Read bytes from I2C internal buffer. When the I2C bus receives data, the ISR will copy them from the hardware RX FIFO to the internal ringbuffer. Calling this function will then copy bytes from the internal ringbuffer to the data user buffer. @note This function shall only be called in I2C slave mode.

@param i2c_num I2C port number @param data Buffer to fill with ringbuffer’s bytes @param max_size Maximum bytes to read @param ticks_to_wait Maximum waiting ticks

@return - ESP_FAIL(-1) Parameter error - Others(>=0) The number of data bytes read from I2C slave buffer.