aboutsummaryrefslogtreecommitdiffstats
path: root/os/io
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-11-18 22:45:27 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-11-18 22:45:27 +0000
commita943eaecc7cd56c2a49521bf702b0524bb834aa1 (patch)
treefdcdf70cfd84aac9f4d68dae6a38b3210c1d6e74 /os/io
parent1dd5442c8c6c3b7d77133825abf147501de36093 (diff)
downloadChibiOS-a943eaecc7cd56c2a49521bf702b0524bb834aa1.tar.gz
ChibiOS-a943eaecc7cd56c2a49521bf702b0524bb834aa1.tar.bz2
ChibiOS-a943eaecc7cd56c2a49521bf702b0524bb834aa1.zip
Fixed minor problem with NVIC support.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1314 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/io')
-rw-r--r--os/io/platforms/STM32/spi_lld.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/os/io/platforms/STM32/spi_lld.c b/os/io/platforms/STM32/spi_lld.c
index 99285d0e2..598e0fd5b 100644
--- a/os/io/platforms/STM32/spi_lld.c
+++ b/os/io/platforms/STM32/spi_lld.c
@@ -207,17 +207,17 @@ void spi_lld_start(SPIDriver *spip) {
if (spip->spd_state == SPI_STOP) {
#if USE_STM32_SPI1
if (&SPID1 == spip) {
+ dmaEnable(DMA1_ID);
NVICEnableVector(DMA1_Channel2_IRQn, STM32_SPI1_IRQ_PRIORITY);
NVICEnableVector(DMA1_Channel3_IRQn, STM32_SPI1_IRQ_PRIORITY);
- dmaEnable(DMA1_ID);
RCC->APB2ENR |= RCC_APB2ENR_SPI1EN;
}
#endif
#if USE_STM32_SPI2
if (&SPID2 == spip) {
+ dmaEnable(DMA1_ID);
NVICEnableVector(DMA1_Channel4_IRQn, STM32_SPI2_IRQ_PRIORITY);
NVICEnableVector(DMA1_Channel5_IRQn, STM32_SPI2_IRQ_PRIORITY);
- dmaEnable(DMA1_ID);
RCC->APB1ENR |= RCC_APB1ENR_SPI2EN;
}
#endif