1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-27 21:23:48 +00:00

Add parameter to control i2c stop signal at endTransmission (#3370)

This commit is contained in:
Keilin Bickar
2022-04-10 16:38:29 -04:00
committed by GitHub
parent 5e79a1f500
commit a9e653724c
8 changed files with 29 additions and 19 deletions

View File

@@ -12,11 +12,11 @@ i2c::ErrorCode TCA9548AChannel::readv(uint8_t address, i2c::ReadBuffer *buffers,
return err;
return parent_->bus_->readv(address, buffers, cnt);
}
i2c::ErrorCode TCA9548AChannel::writev(uint8_t address, i2c::WriteBuffer *buffers, size_t cnt) {
i2c::ErrorCode TCA9548AChannel::writev(uint8_t address, i2c::WriteBuffer *buffers, size_t cnt, bool stop) {
auto err = parent_->switch_to_channel(channel_);
if (err != i2c::ERROR_OK)
return err;
return parent_->bus_->writev(address, buffers, cnt);
return parent_->bus_->writev(address, buffers, cnt, stop);
}
void TCA9548AComponent::setup() {