aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD/DMAv2/stm32_dma.h
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-12-16 14:59:57 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-12-16 14:59:57 +0000
commit4c76bcedf53a76c634f7729d882195845f938c12 (patch)
tree2ee83d30fc0b41e6d6166a6ffa7c805fc09ca306 /os/hal/ports/STM32/LLD/DMAv2/stm32_dma.h
parent3e15ae6226fda173581fc6e1d3ef50d31e9e14a1 (diff)
downloadChibiOS-4c76bcedf53a76c634f7729d882195845f938c12.tar.gz
ChibiOS-4c76bcedf53a76c634f7729d882195845f938c12.tar.bz2
ChibiOS-4c76bcedf53a76c634f7729d882195845f938c12.zip
SDMMC1 now compilable on STM32L4.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8611 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32/LLD/DMAv2/stm32_dma.h')
-rw-r--r--os/hal/ports/STM32/LLD/DMAv2/stm32_dma.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/os/hal/ports/STM32/LLD/DMAv2/stm32_dma.h b/os/hal/ports/STM32/LLD/DMAv2/stm32_dma.h
index 7f7b5a1dc..d2053ad0e 100644
--- a/os/hal/ports/STM32/LLD/DMAv2/stm32_dma.h
+++ b/os/hal/ports/STM32/LLD/DMAv2/stm32_dma.h
@@ -30,8 +30,15 @@
/*===========================================================================*/
/**
+ * @brief DMA capability.
+ * @details if @p TRUE then the DMA is able of burst transfers, FIFOs,
+ * scatter gather and other advanced features.
+ */
+#define STM32_DMA_ADVANCED TRUE
+
+/**
* @brief Total number of DMA streams.
- * @note This is the total number of streams among all the DMA units.
+ * @details This is the total number of streams among all the DMA units.
*/
#define STM32_DMA_STREAMS 16U
@@ -635,9 +642,11 @@ typedef void (*stm32_dmaisr_t)(void *p, uint32_t flags);
* @param[in] dmastp pointer to a stm32_dma_stream_t structure
*/
#define dmaWaitCompletion(dmastp) { \
- while ((dmastp)->stream->NDTR > 0U) \
+ (dmastp)->stream->CR &= ~(STM32_DMA_CR_TCIE | STM32_DMA_CR_HTIE | \
+ STM32_DMA_CR_TEIE | STM32_DMA_CR_DMEIE); \
+ while ((dmastp)->stream->CR & STM32_DMA_CR_EN) \
; \
- dmaStreamDisable(dmastp); \
+ dmaStreamClearInterrupt(dmastp); \
}
/** @} */