mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-07-26 10:38:41 +00:00
all: do not take the pointer of an I2C object
This is in preparation of PR https://github.com/tinygo-org/tinygo/pull/1693, which makes machine.I2C0 and similar objects of pointer type, so they can be freely passed around.
This commit is contained in:
committed by
deadprogram
parent
84408279de
commit
0b6bfda8cf
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
i2c = &machine.I2C0
|
||||
i2c = machine.I2C0
|
||||
sensor = adt7410.New(i2c)
|
||||
)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
func main() {
|
||||
println("GPS I2C Example")
|
||||
machine.I2C0.Configure(machine.I2CConfig{})
|
||||
ublox := gps.NewI2C(&machine.I2C0)
|
||||
ublox := gps.NewI2C(machine.I2C0)
|
||||
parser := gps.NewParser()
|
||||
var fix gps.Fix
|
||||
for {
|
||||
|
||||
Reference in New Issue
Block a user