diff options
author | Erik Gilling <konkers@konkers.net> | 2016-03-02 22:35:28 -0800 |
---|---|---|
committer | Erik Gilling <konkers@konkers.net> | 2016-03-02 22:35:49 -0800 |
commit | bd71cd8e8cd8df18e6dbe13719a0e3456fead021 (patch) | |
tree | b7848b9e2e6209efa635a438e5b44febfb0dde44 /platform | |
parent | f260959150679b32c07a492e24b5a14b15d2fcb0 (diff) | |
download | common-bd71cd8e8cd8df18e6dbe13719a0e3456fead021.tar.gz |
[stm32f0xx] Remove remaining references to STM32F0xx_StdPeriph_Driver.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/stm32f0xx/debug.c | 2 | ||||
-rw-r--r-- | platform/stm32f0xx/spi.c | 8 | ||||
-rw-r--r-- | platform/stm32f0xx/timer.c | 2 |
3 files changed, 3 insertions, 9 deletions
diff --git a/platform/stm32f0xx/debug.c b/platform/stm32f0xx/debug.c index a9135005..81f9b92e 100644 --- a/platform/stm32f0xx/debug.c +++ b/platform/stm32f0xx/debug.c @@ -29,8 +29,6 @@ #include <arch/ops.h> #include <dev/uart.h> #include <target/debugconfig.h> -#include <stm32f0xx_rcc.h> -#include <stm32f0xx_usart.h> #include <arch/arm/cm.h> void stm32_debug_early_init(void) diff --git a/platform/stm32f0xx/spi.c b/platform/stm32f0xx/spi.c index 73b3ce5a..df04e1fa 100644 --- a/platform/stm32f0xx/spi.c +++ b/platform/stm32f0xx/spi.c @@ -28,6 +28,7 @@ #include <kernel/event.h> #include <kernel/mutex.h> #include <platform/dma.h> +#include <platform/rcc.h> #define SPI_SR_FRLVL_VAL(reg) ((reg) >> 9 & 0x3) #define SPI_SR_FTLVL_VAL(reg) ((reg) >> 11 & 0x3) @@ -54,12 +55,9 @@ void spi_init(spi_data_size_t data_size, mutex_init(&spi_mutex); - RCC_APB2PeriphClockCmd(RCC_APB2Periph_SPI1, ENABLE); - - regs->CR1 = cpol | cpha | bit_order | prescaler - | SPI_Direction_2Lines_FullDuplex - | SPI_NSS_Soft; + stm32_rcc_set_enable(STM32_RCC_CLK_SPI1, true); + regs->CR1 = cpol | cpha | bit_order | prescaler | SPI_CR1_SSM; temp_reg = regs->CR2; temp_reg &= ~(SPI_CR2_DS | SPI_CR2_FRXTH); diff --git a/platform/stm32f0xx/timer.c b/platform/stm32f0xx/timer.c index a7ad97e8..b6f526d1 100644 --- a/platform/stm32f0xx/timer.c +++ b/platform/stm32f0xx/timer.c @@ -27,8 +27,6 @@ #include <kernel/thread.h> #include <platform.h> #include <platform/timer.h> -#include <stm32f0xx_rcc.h> -#include <stm32f0xx_tim.h> #include <arch/arm/cm.h> #define LOCAL_TRACE 0 |