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

@@ -30,9 +30,9 @@ int _write(int file, char *ptr, int len);
static void clock_setup(void)
{
/* Enable clocks on all the peripherals we are going to use. */
rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_USART1EN);
rcc_peripheral_enable_clock(&RCC_AHB1ENR,
RCC_AHB1ENR_IOPCEN | RCC_AHB1ENR_IOPAEN);
rcc_periph_clock_enable(RCC_USART1);
rcc_periph_clock_enable(RCC_GPIOC);
rcc_periph_clock_enable(RCC_GPIOA);
}
static void usart_setup(void)