mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-18 05:33:58 +00:00
add correct Tx implementation for mock I2C interfaces
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package mcp23017
|
||||
|
||||
import "tinygo.org/x/drivers"
|
||||
|
||||
// All is a convenience value that represents all pins high (or all mask bits one).
|
||||
var All = PinSlice{0xffff}
|
||||
|
||||
@@ -12,7 +14,7 @@ type Devices []*Device
|
||||
// NewI2CDevices returns a Devices slice holding the Device values
|
||||
// for all the given addresses on the given bus.
|
||||
// When more than one bus is in use, create the slice yourself.
|
||||
func NewI2CDevices(bus I2C, addrs ...uint8) (Devices, error) {
|
||||
func NewI2CDevices(bus drivers.I2C, addrs ...uint8) (Devices, error) {
|
||||
devs := make(Devices, len(addrs))
|
||||
for i, addr := range addrs {
|
||||
dev, err := NewI2C(bus, addr)
|
||||
|
||||
Reference in New Issue
Block a user