Restored original dmaStreamDisable() macro.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8268 35acf78f-673a-0410-8e92-d51de3d6d3f4
master
gdisirio 2015-09-02 08:14:28 +00:00
parent 64689ec9b4
commit 97856f5894
1 changed files with 4 additions and 3 deletions

View File

@ -576,10 +576,11 @@ typedef void (*stm32_dmaisr_t)(void *p, uint32_t flags);
* @special
*/
#define dmaStreamDisable(dmastp) { \
(dmastp)->stream->CR &= ~STM32_DMA_CR_EN; \
while (((dmastp)->stream->CR & STM32_DMA_CR_EN) != 0U) \
(dmastp)->stream->CR &= ~(STM32_DMA_CR_TCIE | STM32_DMA_CR_HTIE | \
STM32_DMA_CR_TEIE | STM32_DMA_CR_DMEIE | \
STM32_DMA_CR_EN); \
while (((dmastp)->stream->CR & STM32_DMA_CR_EN) != 0) \
; \
(dmastp)->stream->CR = STM32_DMA_CR_RESET_VALUE; \
dmaStreamClearInterrupt(dmastp); \
}