diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-03-12 12:30:21 -0400 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2019-03-17 19:38:18 -0400 |
commit | 91cf497656a9ffaf2b35916bb1101fc4ac844539 (patch) | |
tree | 407b3b392492b353afcce0937f03bbb29f0e925a /src | |
parent | 8aa8feedb8b9b3b76144713c927573ed17c35167 (diff) | |
download | kutter-91cf497656a9ffaf2b35916bb1101fc4ac844539.tar.gz kutter-91cf497656a9ffaf2b35916bb1101fc4ac844539.tar.xz kutter-91cf497656a9ffaf2b35916bb1101fc4ac844539.zip |
stm32f1: Use enumerations for pin mappings
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/stm32f1/gpio.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/stm32f1/gpio.c b/src/stm32f1/gpio.c index ed950461..ced64cd1 100644 --- a/src/stm32f1/gpio.c +++ b/src/stm32f1/gpio.c @@ -17,6 +17,12 @@ * Pin mappings ****************************************************************/ +DECL_ENUMERATION_RANGE("pin", "PA0", GPIO('A', 0), 16); +DECL_ENUMERATION_RANGE("pin", "PB0", GPIO('B', 0), 16); +DECL_ENUMERATION_RANGE("pin", "PC0", GPIO('C', 0), 16); +DECL_ENUMERATION_RANGE("pin", "PD0", GPIO('D', 0), 16); +DECL_ENUMERATION_RANGE("pin", "PE0", GPIO('E', 0), 16); + GPIO_TypeDef *const digital_regs[] = { GPIOA, GPIOB, GPIOC, GPIOD, GPIOE }; |