Examples updated to use new rcc_periph_clock_enable function
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user