From 3a94137eb38857d9780a5ef65be30736804dea46 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 16 Sep 2011 17:38:22 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3320 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32/spi_lld.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'os/hal/platforms/STM32/spi_lld.c') diff --git a/os/hal/platforms/STM32/spi_lld.c b/os/hal/platforms/STM32/spi_lld.c index 9302b0102..7041ef854 100644 --- a/os/hal/platforms/STM32/spi_lld.c +++ b/os/hal/platforms/STM32/spi_lld.c @@ -192,7 +192,7 @@ void spi_lld_start(SPIDriver *spip) { (stm32_dmaisr_t)spi_lld_serve_tx_interrupt, (void *)spip); chDbgAssert(!b, "spi_lld_start(), #2", "stream already allocated"); - RCC->APB2ENR |= RCC_APB2ENR_SPI1EN; + rccEnableSPI1(FALSE); } #endif #if STM32_SPI_USE_SPI2 @@ -208,7 +208,7 @@ void spi_lld_start(SPIDriver *spip) { (stm32_dmaisr_t)spi_lld_serve_tx_interrupt, (void *)spip); chDbgAssert(!b, "spi_lld_start(), #4", "stream already allocated"); - RCC->APB1ENR |= RCC_APB1ENR_SPI2EN; + rccEnableSPI2(FALSE); } #endif #if STM32_SPI_USE_SPI3 @@ -224,7 +224,7 @@ void spi_lld_start(SPIDriver *spip) { (stm32_dmaisr_t)spi_lld_serve_tx_interrupt, (void *)spip); chDbgAssert(!b, "spi_lld_start(), #6", "stream already allocated"); - RCC->APB1ENR |= RCC_APB1ENR_SPI3EN; + rccEnableSPI3(FALSE); } #endif @@ -272,21 +272,21 @@ void spi_lld_stop(SPIDriver *spip) { if (&SPID1 == spip) { dmaStreamRelease(STM32_DMA1_STREAM2); dmaStreamRelease(STM32_DMA1_STREAM3); - RCC->APB2ENR &= ~RCC_APB2ENR_SPI1EN; + rccDisableSPI1(FALSE); } #endif #if STM32_SPI_USE_SPI2 if (&SPID2 == spip) { dmaStreamRelease(STM32_DMA1_STREAM4); dmaStreamRelease(STM32_DMA1_STREAM5); - RCC->APB1ENR &= ~RCC_APB1ENR_SPI2EN; + rccDisableSPI2(FALSE); } #endif #if STM32_SPI_USE_SPI3 if (&SPID3 == spip) { dmaStreamRelease(STM32_DMA1_STREAM1); dmaStreamRelease(STM32_DMA1_STREAM2); - RCC->APB1ENR &= ~RCC_APB1ENR_SPI3EN; + rccDisableSPI3(FALSE); } #endif } -- cgit v1.2.3