Examples updated to use new rcc_periph_clock_enable function

This commit is contained in:
Frantisek Burian
2014-01-09 10:44:38 +01:00
parent 3f68a5ceef
commit 5bb4d47aae
103 changed files with 333 additions and 355 deletions

View File

@@ -26,7 +26,7 @@
static void gpio_setup(void)
{
/* Enable GPIOB clock. */
rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPBEN);
rcc_periph_clock_enable(RCC_GPIOB);
/* Set GPIO6/7 (in GPIO port B) to 'output push-pull' for the LEDs. */
gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_2_MHZ,
@@ -57,7 +57,7 @@ int main(void)
gpio_clear(GPIOB, GPIO7); /* LED1 on */
gpio_set(GPIOB, GPIO6); /* LED2 off */
rcc_peripheral_enable_clock(&RCC_APB1ENR, RCC_APB1ENR_TIM2EN);
rcc_periph_clock_enable(RCC_TIM2);
/*
* The goal is to let the LED2 glow for a second and then be