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
Expand description

@brief Send all the queued commands on the I2C bus, in master mode. The task will be blocked until all the commands have been sent out. The I2C port is protected by mutex, so this function is thread-safe. This function shall only be called in I2C master mode.

@param i2c_num I2C port number @param cmd_handle I2C commands list @param ticks_to_wait Maximum ticks to wait before issuing a timeout.

@return - ESP_OK Success - ESP_ERR_INVALID_ARG Parameter error - ESP_FAIL Sending command error, slave hasn’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.