aboutsummaryrefslogtreecommitdiffstats
path: root/src/stm32/gpio.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-09-16 11:45:36 -0400
committerKevin O'Connor <kevin@koconnor.net>2019-10-23 21:19:03 -0400
commit2c535106ee5bbbcc019cb0820d1a5fcf0639eb9e (patch)
treea3a3cbf9f03ab5ed0b2d63600ed205561796ee27 /src/stm32/gpio.c
parent7e090a996a85016b2e72fa5d426ba95fe8bdc703 (diff)
downloadkutter-2c535106ee5bbbcc019cb0820d1a5fcf0639eb9e.tar.gz
kutter-2c535106ee5bbbcc019cb0820d1a5fcf0639eb9e.tar.xz
kutter-2c535106ee5bbbcc019cb0820d1a5fcf0639eb9e.zip
stm32: Initial support for stm32f070
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/stm32/gpio.c')
-rw-r--r--src/stm32/gpio.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/stm32/gpio.c b/src/stm32/gpio.c
index de56e168..aab7dd87 100644
--- a/src/stm32/gpio.c
+++ b/src/stm32/gpio.c
@@ -15,9 +15,13 @@ 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);
+#ifdef GPIOE
DECL_ENUMERATION_RANGE("pin", "PE0", GPIO('E', 0), 16);
-#ifdef GPIOH
+#endif
+#ifdef GPIOF
DECL_ENUMERATION_RANGE("pin", "PF0", GPIO('F', 0), 16);
+#endif
+#ifdef GPIOH
DECL_ENUMERATION_RANGE("pin", "PG0", GPIO('G', 0), 16);
DECL_ENUMERATION_RANGE("pin", "PH0", GPIO('H', 0), 16);
#endif
@@ -26,9 +30,15 @@ DECL_ENUMERATION_RANGE("pin", "PI0", GPIO('I', 0), 16);
#endif
GPIO_TypeDef * const digital_regs[] = {
- ['A' - 'A'] = GPIOA, GPIOB, GPIOC, GPIOD, GPIOE,
+ ['A' - 'A'] = GPIOA, GPIOB, GPIOC, GPIOD,
+#ifdef GPIOE
+ ['E' - 'A'] = GPIOE,
+#endif
+#ifdef GPIOF
+ ['F' - 'A'] = GPIOF,
+#endif
#ifdef GPIOH
- ['F' - 'A'] = GPIOF, GPIOG, GPIOH,
+ ['G' - 'A'] = GPIOG, GPIOH,
#endif
#ifdef GPIOI
['I' - 'A'] = GPIOI,