diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-03-12 12:20:04 -0400 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2019-03-17 19:38:18 -0400 |
commit | 7e2c0ffa911dcbf4793b34c817747010894c2c15 (patch) | |
tree | 62cb7f395703946012a347859f12f1525fc93ee3 /src | |
parent | 8b0195f896aaabbef8d79b8b0239df67b49184c5 (diff) | |
download | kutter-7e2c0ffa911dcbf4793b34c817747010894c2c15.tar.gz kutter-7e2c0ffa911dcbf4793b34c817747010894c2c15.tar.xz kutter-7e2c0ffa911dcbf4793b34c817747010894c2c15.zip |
atsamd: Use enumerations for pin mappings
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/atsamd/gpio.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/atsamd/gpio.c b/src/atsamd/gpio.c index 2e26fa66..a83163a8 100644 --- a/src/atsamd/gpio.c +++ b/src/atsamd/gpio.c @@ -44,8 +44,14 @@ gpio_peripheral(uint32_t gpio, char ptype, int32_t pull_up) #if CONFIG_MACH_SAMD21 #define NUM_PORT 2 +DECL_ENUMERATION_RANGE("pin", "PA0", GPIO('A', 0), 32); +DECL_ENUMERATION_RANGE("pin", "PB0", GPIO('B', 0), 32); #elif CONFIG_MACH_SAMD51 #define NUM_PORT 4 +DECL_ENUMERATION_RANGE("pin", "PA0", GPIO('A', 0), 32); +DECL_ENUMERATION_RANGE("pin", "PB0", GPIO('B', 0), 32); +DECL_ENUMERATION_RANGE("pin", "PC0", GPIO('C', 0), 32); +DECL_ENUMERATION_RANGE("pin", "PD0", GPIO('D', 0), 32); #endif struct gpio_out |