diff --git a/devices/apa102/apa102_test.go b/devices/apa102/apa102_test.go index a902e97..e31acfc 100644 --- a/devices/apa102/apa102_test.go +++ b/devices/apa102/apa102_test.go @@ -558,7 +558,7 @@ func TestInit(t *testing.T) { // func Example() { - bus, err := spi.OpenByName("") + bus, err := spi.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 a4a3419..b6c229d 100644 --- a/devices/bme280/bme280_test.go +++ b/devices/bme280/bme280_test.go @@ -140,7 +140,7 @@ func TestCalibrationInt(t *testing.T) { // func Example() { - bus, err := i2c.OpenByName("") + bus, err := i2c.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 9c30040..42fb7a1 100644 --- a/devices/ds248x/ds248x_test.go +++ b/devices/ds248x/ds248x_test.go @@ -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.OpenByName("") + i2cBus, err := i2c.Open("") if err != nil { fmt.Println(err) return @@ -72,7 +72,7 @@ func TestRecordInit(t *testing.T) { } host.Init() - i2cReal, err := i2c.OpenByName("") + i2cReal, err := i2c.Open("") if err != nil { t.Fatal(err) } diff --git a/devices/ssd1306/ssd1306_test.go b/devices/ssd1306/ssd1306_test.go index 5a11f14..7cc2fdc 100644 --- a/devices/ssd1306/ssd1306_test.go +++ b/devices/ssd1306/ssd1306_test.go @@ -77,7 +77,7 @@ func TestDraw1D(t *testing.T) { // func Example() { - bus, err := i2c.OpenByName("") + bus, err := i2c.Open("") if err != nil { log.Fatalf("failed to open I²C: %v", err) }