mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-15 04:13:40 +00:00
fix uses of legacy i2c WriteRegister calls
This commit is contained in:
@@ -159,7 +159,7 @@ func (r *i2cRegister) write(bus drivers.I2C, deviceAddress uint8, value uint16)
|
||||
}
|
||||
|
||||
// Write the register from the buffer over I2C
|
||||
err := bus.WriteRegister(deviceAddress, r.host.address, buf)
|
||||
err := legacy.WriteRegister(bus, deviceAddress, r.host.address, buf)
|
||||
// after successful I2C write, cache this value if the host register (if also readable)
|
||||
// Note we cache the entire buffer without applying shift/mask
|
||||
if nil == err && r.host.attributes®_read != 0 {
|
||||
|
||||
Reference in New Issue
Block a user