aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-03-01 19:28:33 -0500
committerMarti Bolivar <mbolivar@leaflabs.com>2011-03-01 19:28:33 -0500
commit04b7db07d15bd4fac7de1256bc69ec532f5148ba (patch)
tree38b6f9c28a1b2ffaa941c761233cb2681a406743 /libmaple
parent2b2ad43e690ea70c323e0617878be337e8487148 (diff)
downloadlibrambutan-04b7db07d15bd4fac7de1256bc69ec532f5148ba.tar.gz
librambutan-04b7db07d15bd4fac7de1256bc69ec532f5148ba.zip
Trivial gpio_init() bugfix
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);