mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-11 06:23:39 +00:00
machine: refactor pins to be of Pin type
This commit is contained in:
committed by
Ron Evans
parent
421ef04efb
commit
94b8214529
@@ -11,8 +11,8 @@ import (
|
||||
func main() {
|
||||
machine.InitADC()
|
||||
|
||||
led := machine.GPIO{machine.LED}
|
||||
led.Configure(machine.GPIOConfig{Mode: machine.GPIO_OUTPUT})
|
||||
led := machine.LED
|
||||
led.Configure(machine.PinConfig{Mode: machine.PinOutput})
|
||||
|
||||
sensor := machine.ADC{machine.ADC2}
|
||||
sensor.Configure()
|
||||
|
||||
Reference in New Issue
Block a user