diff --git a/devices/apa102/apa102_test.go b/devices/apa102/apa102_test.go index e31acfc..782b63e 100644 --- a/devices/apa102/apa102_test.go +++ b/devices/apa102/apa102_test.go @@ -15,6 +15,7 @@ import ( "testing" "periph.io/x/periph/conn/spi" + "periph.io/x/periph/conn/spi/spireg" "periph.io/x/periph/conn/spi/spitest" ) @@ -558,7 +559,7 @@ func TestInit(t *testing.T) { // func Example() { - bus, err := spi.Open("") + bus, err := spireg.Open("") if err != nil { log.Fatalf("failed to open SPI: %v", err) } diff --git a/devices/bme280/bme280_test.go b/devices/bme280/bme280_test.go index b6c229d..61d4020 100644 --- a/devices/bme280/bme280_test.go +++ b/devices/bme280/bme280_test.go @@ -9,7 +9,7 @@ import ( "log" "testing" - "periph.io/x/periph/conn/i2c" + "periph.io/x/periph/conn/i2c/i2creg" "periph.io/x/periph/conn/i2c/i2ctest" "periph.io/x/periph/devices" ) @@ -140,7 +140,7 @@ func TestCalibrationInt(t *testing.T) { // func Example() { - bus, err := i2c.Open("") + bus, err := i2creg.Open("") if err != nil { log.Fatalf("failed to open I²C: %v", err) } diff --git a/devices/ds248x/ds248x_test.go b/devices/ds248x/ds248x_test.go index 42fb7a1..cd446b7 100644 --- a/devices/ds248x/ds248x_test.go +++ b/devices/ds248x/ds248x_test.go @@ -8,7 +8,7 @@ import ( "fmt" "testing" - "periph.io/x/periph/conn/i2c" + "periph.io/x/periph/conn/i2c/i2creg" "periph.io/x/periph/conn/i2c/i2ctest" ) @@ -32,7 +32,7 @@ func TestInit(t *testing.T) { func Example() { // Open the I²C bus to which the DS248x is connected. - i2cBus, err := i2c.Open("") + i2cBus, err := i2creg.Open("") if err != nil { fmt.Println(err) return @@ -72,7 +72,7 @@ func TestRecordInit(t *testing.T) { } host.Init() - i2cReal, err := i2c.Open("") + i2cReal, err := i2creg.Open("") if err != nil { t.Fatal(err) } diff --git a/devices/lirc/lirc.go b/devices/lirc/lirc.go index 845dd1c..1d2cb5c 100644 --- a/devices/lirc/lirc.go +++ b/devices/lirc/lirc.go @@ -14,7 +14,7 @@ import ( "strings" "sync" - "periph.io/x/periph/conn/gpio" + "periph.io/x/periph/conn/gpio/gpioreg" "periph.io/x/periph/conn/ir" ) @@ -220,12 +220,12 @@ func (d *driver) Init() (bool, error) { return false, nil } if in != -1 { - if err := gpio.RegisterAlias("IR_IN", in); err != nil { + if err := gpioreg.RegisterAlias("IR_IN", in); err != nil { return true, err } } if out != -1 { - if err := gpio.RegisterAlias("IR_OUT", out); err != nil { + if err := gpioreg.RegisterAlias("IR_OUT", out); err != nil { return true, err } } diff --git a/devices/ssd1306/ssd1306_test.go b/devices/ssd1306/ssd1306_test.go index 7cc2fdc..c690bc0 100644 --- a/devices/ssd1306/ssd1306_test.go +++ b/devices/ssd1306/ssd1306_test.go @@ -14,7 +14,7 @@ import ( "golang.org/x/image/font/basicfont" "golang.org/x/image/math/fixed" - "periph.io/x/periph/conn/i2c" + "periph.io/x/periph/conn/i2c/i2creg" "periph.io/x/periph/conn/i2c/i2ctest" "periph.io/x/periph/devices/ssd1306/image1bit" ) @@ -77,7 +77,7 @@ func TestDraw1D(t *testing.T) { // func Example() { - bus, err := i2c.Open("") + bus, err := i2creg.Open("") if err != nil { log.Fatalf("failed to open I²C: %v", err) } diff --git a/devices/tm1637/tm1637_test.go b/devices/tm1637/tm1637_test.go index 11c7623..cdd6db2 100644 --- a/devices/tm1637/tm1637_test.go +++ b/devices/tm1637/tm1637_test.go @@ -8,7 +8,7 @@ import ( "log" "testing" - "periph.io/x/periph/conn/gpio" + "periph.io/x/periph/conn/gpio/gpioreg" "periph.io/x/periph/conn/gpio/gpiotest" "periph.io/x/periph/host" ) @@ -30,7 +30,7 @@ func Example() { if _, err := host.Init(); err != nil { log.Fatalf("failed to initialize periph: %v", err) } - dev, err := New(gpio.ByNumber(6), gpio.ByNumber(12)) + dev, err := New(gpioreg.ByNumber(6), gpioreg.ByNumber(12)) if err != nil { log.Fatalf("failed to initialize tm1637: %v", err) }