tca9548a fix channel selection (#3417)

This commit is contained in:
Martin 2022-05-10 07:17:55 +02:00 committed by GitHub
parent d685fdf54a
commit 86b52df839
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,7 @@ i2c::ErrorCode TCA9548AComponent::switch_to_channel(uint8_t channel) {
return i2c::ERROR_OK;
uint8_t channel_val = 1 << channel;
auto err = this->write_register(0x70, &channel_val, 1);
auto err = this->write(&channel_val, 1);
if (err == i2c::ERROR_OK) {
current_channel_ = channel;
}