diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2015-08-15 09:12:30 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2015-08-15 09:12:30 +0000 |
commit | e1332d571cd73e0d834830746472e8d93b62eec2 (patch) | |
tree | 8d228aee3c6f2466e646a1af91401988c66e0ca2 /os | |
parent | f52c062a19563a76960eef4b535327909b6059b9 (diff) | |
download | ChibiOS-e1332d571cd73e0d834830746472e8d93b62eec2.tar.gz ChibiOS-e1332d571cd73e0d834830746472e8d93b62eec2.tar.bz2 ChibiOS-e1332d571cd73e0d834830746472e8d93b62eec2.zip |
Fixed bug #630.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8217 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r-- | os/hal/ports/STM32/LLD/SPIv1/i2s_lld.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/os/hal/ports/STM32/LLD/SPIv1/i2s_lld.c b/os/hal/ports/STM32/LLD/SPIv1/i2s_lld.c index 821688d51..6be5df7bd 100644 --- a/os/hal/ports/STM32/LLD/SPIv1/i2s_lld.c +++ b/os/hal/ports/STM32/LLD/SPIv1/i2s_lld.c @@ -342,15 +342,6 @@ void i2s_lld_start(I2SDriver *i2sp) { #endif
}
#endif
-
- if (NULL != i2sp->dmarx) {
- dmaStreamSetMode(i2sp->dmarx, i2sp->rxdmamode);
- dmaStreamSetPeripheral(i2sp->dmarx, &i2sp->spi->DR);
- }
- if (NULL != i2sp->dmatx) {
- dmaStreamSetMode(i2sp->dmatx, i2sp->txdmamode);
- dmaStreamSetPeripheral(i2sp->dmatx, &i2sp->spi->DR);
- }
}
/* I2S (re)configuration.*/
@@ -412,6 +403,8 @@ void i2s_lld_start_exchange(I2SDriver *i2sp) { /* RX DMA setup.*/
if (NULL != i2sp->dmarx) {
+ dmaStreamSetMode(i2sp->dmarx, i2sp->rxdmamode);
+ dmaStreamSetPeripheral(i2sp->dmarx, &i2sp->spi->DR);
dmaStreamSetMemory0(i2sp->dmarx, i2sp->config->rx_buffer);
dmaStreamSetTransactionSize(i2sp->dmarx, size);
dmaStreamEnable(i2sp->dmarx);
@@ -419,6 +412,8 @@ void i2s_lld_start_exchange(I2SDriver *i2sp) { /* TX DMA setup.*/
if (NULL != i2sp->dmatx) {
+ dmaStreamSetMode(i2sp->dmatx, i2sp->txdmamode);
+ dmaStreamSetPeripheral(i2sp->dmatx, &i2sp->spi->DR);
dmaStreamSetMemory0(i2sp->dmatx, i2sp->config->tx_buffer);
dmaStreamSetTransactionSize(i2sp->dmatx, size);
dmaStreamEnable(i2sp->dmatx);
|