From 12a41dc791d9d8078fbd405d5cd1bec69e1dc506 Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Thu, 20 Oct 2022 14:39:34 +1300 Subject: [PATCH] Add basic GPIO support for rp2040 PIO --- src/machine/machine_rp2040_gpio.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/machine/machine_rp2040_gpio.go b/src/machine/machine_rp2040_gpio.go index 674e100a..04871bd2 100644 --- a/src/machine/machine_rp2040_gpio.go +++ b/src/machine/machine_rp2040_gpio.go @@ -86,6 +86,8 @@ const ( PinPWM PinI2C PinSPI + PinPIO0 + PinPIO1 ) func (p Pin) PortMaskSet() (*uint32, uint32) { @@ -203,6 +205,10 @@ func (p Pin) Configure(config PinConfig) { p.setSlew(false) case PinSPI: p.setFunc(fnSPI) + case PinPIO0: + p.setFunc(fnPIO0) + case PinPIO1: + p.setFunc(fnPIO1) } }