Examples updated to use new rcc_periph_clock_enable function
This commit is contained in:
@@ -34,7 +34,7 @@ static void clock_setup(void)
|
||||
static void gpio_setup(void)
|
||||
{
|
||||
/* Enable GPIOC clock. */
|
||||
rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPCEN);
|
||||
rcc_periph_clock_enable(RCC_GPIOC);
|
||||
|
||||
/* Set GPIO12 (in GPIO port C) to 'output push-pull'. */
|
||||
gpio_set_mode(GPIOC, GPIO_MODE_OUTPUT_50_MHZ,
|
||||
@@ -44,10 +44,10 @@ static void gpio_setup(void)
|
||||
static void exti_setup(void)
|
||||
{
|
||||
/* Enable GPIOA clock. */
|
||||
rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPAEN);
|
||||
rcc_periph_clock_enable(RCC_GPIOA);
|
||||
|
||||
/* Enable AFIO clock. */
|
||||
rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_AFIOEN);
|
||||
rcc_periph_clock_enable(RCC_AFIO);
|
||||
|
||||
/* Enable EXTI0 interrupt. */
|
||||
nvic_enable_irq(NVIC_EXTI0_IRQ);
|
||||
|
||||
Reference in New Issue
Block a user