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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user