diff --git a/easystepper/easystepper_tinygo.go b/easystepper/easystepper_tinygo.go index ae1a7cf..0f65c68 100644 --- a/easystepper/easystepper_tinygo.go +++ b/easystepper/easystepper_tinygo.go @@ -7,8 +7,8 @@ import ( "machine" "time" - "tinygo.org/x/drivers" "tinygo.org/x/drivers/internal/legacy" + "tinygo.org/x/drivers/internal/pin" ) // New returns a new single easystepper driver given a DeviceConfig @@ -17,7 +17,7 @@ func New(config DeviceConfig) (*Device, error) { return nil, errors.New("config.StepCount and config.RPM must be > 0") } return &Device{ - pins: [4]drivers.PinOutput{config.Pin1.Set, config.Pin2.Set, config.Pin3.Set, config.Pin4.Set}, + pins: [4]pin.OutputFunc{config.Pin1.Set, config.Pin2.Set, config.Pin3.Set, config.Pin4.Set}, stepDelay: time.Second * 60 / time.Duration((config.StepCount * config.RPM)), stepMode: config.Mode, config: func() {