apply @gen2thomas suggestions

This commit is contained in:
Patricio Whittingslow
2025-09-16 09:26:00 -03:00
committed by deadprogram
parent 5d1bc2fc36
commit c815f2560e
13 changed files with 77 additions and 67 deletions
+10
View File
@@ -2,8 +2,18 @@ package drivers
// PinOutput is hardware abstraction for a pin which outputs a
// digital signal (high or low voltage).
//
// // Code conversion demo: from machine.Pin to drivers.PinOutput
// led := machine.LED
// led.Configure(machine.PinConfig{Mode: machine.PinOutput})
// var pin drivers.PinOutput = led.Set // Going from a machine.Pin to a drivers.PinOutput
type PinOutput func(level bool)
// PinInput is hardware abstraction for a pin which receives a
// digital signal and reads it (high or low voltage).
//
// // Code conversion demo: from machine.Pin to drivers.PinInput
// input := machine.LED
// input.Configure(machine.PinConfig{Mode: machine.PinInputPulldown}) // or use machine.PinInputPullup or machine.PinInput
// var pin drivers.PinInput = input.Get // Going from a machine.Pin to a drivers.PinInput
type PinInput func() (level bool)