diff --git a/drivers/spi/spi.go b/drivers/spi/spi.go index 4423e1bac..57d53f7f6 100644 --- a/drivers/spi/spi.go +++ b/drivers/spi/spi.go @@ -1,7 +1,6 @@ package spi import ( - "periph.io/x/periph/conn/physic" xspi "periph.io/x/periph/conn/spi" xsysfs "periph.io/x/periph/host/sysfs" ) @@ -80,7 +79,7 @@ func GetSpiConnection(busNum, chipNum, mode, bits int, maxSpeed int64) (Connecti if err != nil { return nil, err } - c, err := p.Connect(physic.Frequency(maxSpeed), xspi.Mode(mode), bits) + c, err := p.Connect(maxSpeed, xspi.Mode(mode), bits) if err != nil { return nil, err } diff --git a/platforms/dexter/gopigo3/driver_test.go b/platforms/dexter/gopigo3/driver_test.go index 7558b873c..d827ad108 100644 --- a/platforms/dexter/gopigo3/driver_test.go +++ b/platforms/dexter/gopigo3/driver_test.go @@ -216,7 +216,7 @@ func TestOffsetMotorEncoder(t *testing.T) { func TestSetPWMDuty(t *testing.T) { d := initTestDriver() - err := d.SetPWMDuty(AD_1_1, 80) + err := d.SetPWMDuty(AD_1_1_G, 80) if err != nil { t.Error(err) } @@ -224,7 +224,7 @@ func TestSetPWMDuty(t *testing.T) { func TestSetPWMfreq(t *testing.T) { d := initTestDriver() - err := d.SetPWMFreq(AD_1_2, 100) + err := d.SetPWMFreq(AD_1_2_G, 100) if err != nil { t.Error(err) }