aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32/spi_lld.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-09-16 17:38:22 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-09-16 17:38:22 +0000
commit3a94137eb38857d9780a5ef65be30736804dea46 (patch)
tree3f2742af90d08db7c09a6ba9d0304a49225000fd /os/hal/platforms/STM32/spi_lld.c
parent46538d795be83d1d54b132e7d57213cb6d975c51 (diff)
downloadChibiOS-3a94137eb38857d9780a5ef65be30736804dea46.tar.gz
ChibiOS-3a94137eb38857d9780a5ef65be30736804dea46.tar.bz2
ChibiOS-3a94137eb38857d9780a5ef65be30736804dea46.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3320 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/spi_lld.c')
-rw-r--r--os/hal/platforms/STM32/spi_lld.c12
1 files changed, 6 insertions, 6 deletions
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
}