Restored original dmaStreamDisable() macro.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8268 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
64689ec9b4
commit
97856f5894
|
@ -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); \
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue