[][src]Function esp_idf_sys::i2c_master_cmd_begin

pub unsafe extern "C" fn i2c_master_cmd_begin(
    i2c_num: i2c_port_t,
    cmd_handle: i2c_cmd_handle_t,
    ticks_to_wait: TickType_t
) -> esp_err_t

@brief I2C master send queued commands. This function will trigger sending all queued commands. The task will be blocked until all the commands have been sent out. The I2C APIs are not thread-safe, if you want to use one I2C port in different tasks, you need to take care of the multi-thread issue. @note Only call this function in I2C master mode

@param i2c_num I2C port number @param cmd_handle I2C command handler @param ticks_to_wait maximum wait ticks.

@return - ESP_OK Success - ESP_ERR_INVALID_ARG Parameter error - ESP_FAIL Sending command error, slave doesn't ACK the transfer. - ESP_ERR_INVALID_STATE I2C driver not installed or not in master mode. - ESP_ERR_TIMEOUT Operation timeout because the bus is busy.