aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/gpio.c
diff options
context:
space:
mode:
authorPerry Hung <iperry@alum.mit.edu>2010-03-30 20:49:00 -0400
committerPerry Hung <iperry@alum.mit.edu>2010-03-30 20:49:00 -0400
commitf2f32c52c3aa44f34448523c60520df1cad36351 (patch)
treef3e39a34c3f56ef9a44f72e3f6fc44a983e25ef7 /src/lib/gpio.c
parent61cc63c1c172d6cf255aaa0f73c827224c600997 (diff)
downloadlibrambutan-f2f32c52c3aa44f34448523c60520df1cad36351.tar.gz
librambutan-f2f32c52c3aa44f34448523c60520df1cad36351.zip
Re-enabled clocks on GPIO ports, external timers, and USARTs.
Diffstat (limited to 'src/lib/gpio.c')
-rw-r--r--src/lib/gpio.c14
1 files changed, 6 insertions, 8 deletions
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) {