Cleaned up the jobygps examples.

This commit is contained in:
Fergus Noble
2012-01-25 23:11:46 -08:00
committed by Uwe Hermann
parent ac29b654a9
commit d071a9ffde
3 changed files with 21 additions and 56 deletions

View File

@@ -28,13 +28,12 @@
void clock_setup(void)
{
#warning "This code has to call some kind of rcc clock setup function!!!"
RCC_APB1ENR |= RCC_APB1ENR_SPI2EN;
RCC_APB2ENR |= RCC_APB2ENR_USART1EN;
RCC_AHB1ENR |=
RCC_AHB1ENR_IOPCEN | RCC_AHB1ENR_IOPAEN | RCC_AHB1ENR_IOPBEN;
/* Enable clocks on all the peripherals we are going to use. */
rcc_peripheral_enable_clock(&RCC_APB1ENR, RCC_APB1ENR_SPI2EN);
rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_USART1EN);
rcc_peripheral_enable_clock(&RCC_AHB1ENR, RCC_AHB1ENR_IOPCEN | \
RCC_AHB1ENR_IOPAEN | \
RCC_AHB1ENR_IOPBEN);
}
void spi_setup(void)