aboutsummaryrefslogtreecommitdiffstats
path: root/src/stm32f4/gpio.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-07-28 14:40:41 -0400
committerKevinOConnor <kevin@koconnor.net>2019-08-05 11:25:40 -0400
commit7efc53ff59111061908405dae889a38cc6e60dbb (patch)
treed9034e66fb34629203fb278b381af8af8ebf980c /src/stm32f4/gpio.c
parent485164b8b3fcb973a8766264e1c1e9e190ea80af (diff)
downloadkutter-7efc53ff59111061908405dae889a38cc6e60dbb.tar.gz
kutter-7efc53ff59111061908405dae889a38cc6e60dbb.tar.xz
kutter-7efc53ff59111061908405dae889a38cc6e60dbb.zip
stm32f4: Add support for STM32F103
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/stm32f4/gpio.c')
-rw-r--r--src/stm32f4/gpio.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/stm32f4/gpio.c b/src/stm32f4/gpio.c
index 77a00c0f..9fbbdaec 100644
--- a/src/stm32f4/gpio.c
+++ b/src/stm32f4/gpio.c
@@ -16,15 +16,20 @@ 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);
DECL_ENUMERATION_RANGE("pin", "PE0", GPIO('E', 0), 32);
+#ifdef GPIOH
DECL_ENUMERATION_RANGE("pin", "PF0", GPIO('F', 0), 32);
DECL_ENUMERATION_RANGE("pin", "PG0", GPIO('G', 0), 32);
DECL_ENUMERATION_RANGE("pin", "PH0", GPIO('H', 0), 32);
+#endif
#ifdef GPIOI
DECL_ENUMERATION_RANGE("pin", "PI0", GPIO('I', 0), 32);
#endif
GPIO_TypeDef * const digital_regs[] = {
- GPIOA, GPIOB, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH,
+ GPIOA, GPIOB, GPIOC, GPIOD, GPIOE,
+#ifdef GPIOH
+ GPIOF, GPIOG, GPIOH,
+#endif
#ifdef GPIOI
GPIOI,
#endif