2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 19:28:26 +08:00

i2c: duplicate TCA9548 control byte

This commit is contained in:
Donald Sebastian Leung 2020-07-03 15:55:11 +08:00 committed by Sébastien Bourdeauducq
parent 3f0cf6e683
commit f265976df6

View File

@ -183,8 +183,11 @@ mod imp {
if !write(busno, address << 1)? {
return Err("PCA9548 failed to ack write address")
}
if !write(busno, channels)? {
return Err("PCA9548 failed to ack control word")
// Duplicate control byte: one for SCL, one for SDA
for _ in 0..2 {
if !write(busno, channels)? {
return Err("PCA9548 failed to ack control word")
}
}
stop(busno)?;
Ok(())