From 04b7db07d15bd4fac7de1256bc69ec532f5148ba Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Tue, 1 Mar 2011 19:28:33 -0500 Subject: Trivial gpio_init() bugfix --- libmaple/gpio.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'libmaple') 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); -- cgit v1.2.3