aboutsummaryrefslogtreecommitdiffstats
path: root/src/lpc176x/gpio.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-03-12 12:22:49 -0400
committerKevinOConnor <kevin@koconnor.net>2019-03-17 19:38:18 -0400
commit8aa8feedb8b9b3b76144713c927573ed17c35167 (patch)
tree82506a461e545ac16ba573c1069531327a2274d0 /src/lpc176x/gpio.c
parent7e2c0ffa911dcbf4793b34c817747010894c2c15 (diff)
downloadkutter-8aa8feedb8b9b3b76144713c927573ed17c35167.tar.gz
kutter-8aa8feedb8b9b3b76144713c927573ed17c35167.tar.xz
kutter-8aa8feedb8b9b3b76144713c927573ed17c35167.zip
lpc176x: Use enumerations for pin mappings
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/lpc176x/gpio.c')
-rw-r--r--src/lpc176x/gpio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lpc176x/gpio.c b/src/lpc176x/gpio.c
index 5c76ec55..b7afda74 100644
--- a/src/lpc176x/gpio.c
+++ b/src/lpc176x/gpio.c
@@ -17,6 +17,12 @@
* Pin mappings
****************************************************************/
+DECL_ENUMERATION_RANGE("pin", "P0.0", GPIO(0, 0), 32);
+DECL_ENUMERATION_RANGE("pin", "P1.0", GPIO(1, 0), 32);
+DECL_ENUMERATION_RANGE("pin", "P2.0", GPIO(2, 0), 32);
+DECL_ENUMERATION_RANGE("pin", "P3.0", GPIO(3, 0), 32);
+DECL_ENUMERATION_RANGE("pin", "P4.0", GPIO(4, 0), 32);
+
static LPC_GPIO_TypeDef * const digital_regs[] = {
LPC_GPIO0, LPC_GPIO1, LPC_GPIO2, LPC_GPIO3, LPC_GPIO4
};