mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 11:56:25 +01:00
Fix IDFI2CBus::writev ignoring stop parameter (#4840)
Co-authored-by: Alexander Dimitrov <admin@sharkydog.info>
This commit is contained in:
parent
ff8a73c2d1
commit
48e4cb5ae2
@ -202,11 +202,13 @@ ErrorCode IDFI2CBus::writev(uint8_t address, WriteBuffer *buffers, size_t cnt, b
|
|||||||
return ERROR_UNKNOWN;
|
return ERROR_UNKNOWN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
err = i2c_master_stop(cmd);
|
if (stop) {
|
||||||
if (err != ESP_OK) {
|
err = i2c_master_stop(cmd);
|
||||||
ESP_LOGVV(TAG, "TX to %02X master stop failed: %s", address, esp_err_to_name(err));
|
if (err != ESP_OK) {
|
||||||
i2c_cmd_link_delete(cmd);
|
ESP_LOGVV(TAG, "TX to %02X master stop failed: %s", address, esp_err_to_name(err));
|
||||||
return ERROR_UNKNOWN;
|
i2c_cmd_link_delete(cmd);
|
||||||
|
return ERROR_UNKNOWN;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
err = i2c_master_cmd_begin(port_, cmd, 20 / portTICK_PERIOD_MS);
|
err = i2c_master_cmd_begin(port_, cmd, 20 / portTICK_PERIOD_MS);
|
||||||
i2c_cmd_link_delete(cmd);
|
i2c_cmd_link_delete(cmd);
|
||||||
|
Loading…
Reference in New Issue
Block a user