aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32/spi_lld.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-07-22 20:26:22 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-07-22 20:26:22 +0000
commit0ce4d551dfd5c15c6908c78c7cd48000454f726d (patch)
treecb187402dd12b3b6ffb33f6a792591281d3987d0 /os/hal/platforms/STM32/spi_lld.c
parent99badd54946920ee69966f6a92d4b4134e4ba9a5 (diff)
downloadChibiOS-0ce4d551dfd5c15c6908c78c7cd48000454f726d.tar.gz
ChibiOS-0ce4d551dfd5c15c6908c78c7cd48000454f726d.tar.bz2
ChibiOS-0ce4d551dfd5c15c6908c78c7cd48000454f726d.zip
Optimization to the STM32 SPI driver.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2081 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/spi_lld.c')
-rw-r--r--os/hal/platforms/STM32/spi_lld.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/os/hal/platforms/STM32/spi_lld.c b/os/hal/platforms/STM32/spi_lld.c
index 265669ee1..0dc47a81e 100644
--- a/os/hal/platforms/STM32/spi_lld.c
+++ b/os/hal/platforms/STM32/spi_lld.c
@@ -294,15 +294,15 @@ void spi_lld_start(SPIDriver *spip) {
RCC->APB1ENR |= RCC_APB1ENR_SPI3EN;
}
#endif
+
+ /* DMA setup.*/
+ spip->spd_dmarx->CPAR = (uint32_t)&spip->spd_spi->DR;
+ spip->spd_dmatx->CPAR = (uint32_t)&spip->spd_spi->DR;
}
/* SPI setup.*/
spip->spd_spi->CR1 = spip->spd_config->spc_cr1 | SPI_CR1_MSTR;
spip->spd_spi->CR2 = SPI_CR2_SSOE | SPI_CR2_RXDMAEN | SPI_CR2_TXDMAEN;
-
- /* DMA setup.*/
- spip->spd_dmarx->CPAR = (uint32_t)&spip->spd_spi->DR;
- spip->spd_dmatx->CPAR = (uint32_t)&spip->spd_spi->DR;
}
/**