mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-18 05:33:58 +00:00
tester: add a mock for command-oriented i2c devices
This commit is contained in:
+1
-2
@@ -48,8 +48,7 @@ func (bus *I2CBus) WriteRegister(addr uint8, r uint8, buf []byte) error {
|
||||
|
||||
// Tx implements I2C.Tx.
|
||||
func (bus *I2CBus) Tx(addr uint16, w, r []byte) error {
|
||||
// TODO: implement this
|
||||
return nil
|
||||
return bus.FindDevice(uint8(addr)).Tx(w, r)
|
||||
}
|
||||
|
||||
// FindDevice returns the device with the given address.
|
||||
|
||||
Reference in New Issue
Block a user