From f2f32c52c3aa44f34448523c60520df1cad36351 Mon Sep 17 00:00:00 2001 From: Perry Hung Date: Tue, 30 Mar 2010 20:49:00 -0400 Subject: Re-enabled clocks on GPIO ports, external timers, and USARTs. --- src/lib/gpio.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/lib/gpio.c') diff --git a/src/lib/gpio.c b/src/lib/gpio.c index 0335a51..39341af 100644 --- a/src/lib/gpio.c +++ b/src/lib/gpio.c @@ -24,17 +24,15 @@ */ #include "libmaple.h" -#include "stm32f10x_rcc.h" +#include "rcc.h" #include "gpio.h" void gpio_init(void) { - /* Turn on clocks for GPIO */ -// RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | -// RCC_APB2Periph_GPIOB | -// RCC_APB2Periph_GPIOC | -// RCC_APB2Periph_GPIOD | -// RCC_APB2Periph_AFIO, -// ENABLE); + rcc_enable_clk_gpioa(); + rcc_enable_clk_gpiob(); + rcc_enable_clk_gpioc(); + rcc_enable_clk_gpiod(); + rcc_enable_clk_afio(); } void gpio_set_mode(GPIO_Port* port, uint8 gpio_pin, uint8 mode) { -- cgit v1.2.3