all: refactor all current drivers to use new machine.Pin interface

Signed-off-by: Ron Evans <ron@hybridgroup.com>
This commit is contained in:
Ron Evans
2019-05-26 17:01:47 +02:00
parent 2c0bde0dad
commit 3f946868e1
19 changed files with 134 additions and 159 deletions
+5 -5
View File
@@ -22,9 +22,9 @@ const pass = "YOURPASS"
// change these to connect to a different UART or pins for the ESP8266/ESP32
var (
uart = machine.UART1
tx uint8 = machine.D10
rx uint8 = machine.D11
uart = machine.UART1
tx = machine.D10
rx = machine.D11
console = machine.UART0
@@ -38,8 +38,8 @@ func main() {
adaptor = espat.New(uart)
adaptor.Configure()
readyled := machine.GPIO{machine.LED}
readyled.Configure(machine.GPIOConfig{Mode: machine.GPIO_OUTPUT})
readyled := machine.LED
readyled.Configure(machine.PinConfig{Mode: machine.PinOutput})
readyled.High()
// first check if connected