diff options
author | ardnew <[email protected]> | 2020-11-12 14:08:55 -0600 |
---|---|---|
committer | Ron Evans <[email protected]> | 2020-11-13 07:53:16 +0100 |
commit | 3cdc110462369500aedfc1511f7c409c49200e35 (patch) | |
tree | 5ed86e6446818d5e754be208e807c79e2ee404af | |
parent | 7cc687d41662946dc25a1924f203438f2ff70279 (diff) | |
download | tinygo-3cdc110462369500aedfc1511f7c409c49200e35.tar.gz tinygo-3cdc110462369500aedfc1511f7c409c49200e35.zip |
teensy40: use implicit const defs (PinMode/PinChange)
-rw-r--r-- | src/machine/machine_mimxrt1062.go | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/machine/machine_mimxrt1062.go b/src/machine/machine_mimxrt1062.go index 77312c423..42586c422 100644 --- a/src/machine/machine_mimxrt1062.go +++ b/src/machine/machine_mimxrt1062.go @@ -19,39 +19,39 @@ type PinMode uint8 const ( // GPIO - PinInput PinMode = 0 - PinInputPullUp PinMode = 1 - PinInputPullDown PinMode = 2 - PinOutput PinMode = 3 - PinOutputOpenDrain PinMode = 4 - PinDisable PinMode = 5 + PinInput PinMode = iota + PinInputPullUp + PinInputPullDown + PinOutput + PinOutputOpenDrain + PinDisable // ADC - PinInputAnalog PinMode = 6 + PinInputAnalog // UART - PinModeUARTTX PinMode = 7 - PinModeUARTRX PinMode = 8 + PinModeUARTTX + PinModeUARTRX // SPI - PinModeSPISDI PinMode = 9 - PinModeSPISDO PinMode = 10 - PinModeSPICLK PinMode = 11 - PinModeSPICS PinMode = 12 + PinModeSPISDI + PinModeSPISDO + PinModeSPICLK + PinModeSPICS // I2C - PinModeI2CSDA PinMode = 13 - PinModeI2CSCL PinMode = 14 + PinModeI2CSDA + PinModeI2CSCL ) type PinChange uint8 const ( - PinLow PinChange = 0 - PinHigh PinChange = 1 - PinRising PinChange = 2 - PinFalling PinChange = 3 - PinToggle PinChange = 4 + PinLow PinChange = iota + PinHigh + PinRising + PinFalling + PinToggle ) // pinJumpTable represents a function lookup table for all 128 GPIO pins. |