aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple
diff options
context:
space:
mode:
Diffstat (limited to 'libmaple')
-rw-r--r--libmaple/gpio.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libmaple/gpio.c b/libmaple/gpio.c
index 71e5230..0ebc130 100644
--- a/libmaple/gpio.c
+++ b/libmaple/gpio.c
@@ -34,9 +34,13 @@ void gpio_init(void) {
rcc_clk_enable(RCC_GPIOA);
rcc_clk_enable(RCC_GPIOB);
rcc_clk_enable(RCC_GPIOC);
-#if NR_GPIO_PORTS >= 4 /* Maple, but not Maple Mini */
+#if NR_GPIO_PORTS >= 4
+ /* Maple, but not Maple Mini (D0 and D1 are used for OSC on Mini,
+ and those are the only Port D pins). */
rcc_clk_enable(RCC_GPIOD);
-#elif NR_GPIO_PORTS >= 7 /* Maple Native (high density only) */
+#endif
+#if NR_GPIO_PORTS >= 7
+ /* Maple Native (high density only) */
rcc_clk_enable(RCC_GPIOE);
rcc_clk_enable(RCC_GPIOF);
rcc_clk_enable(RCC_GPIOG);