diff options
Diffstat (limited to 'os/hal/platforms/STM32L1xx/stm32_dma.h')
-rw-r--r-- | os/hal/platforms/STM32L1xx/stm32_dma.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/os/hal/platforms/STM32L1xx/stm32_dma.h b/os/hal/platforms/STM32L1xx/stm32_dma.h index 597cce763..a3d94ace2 100644 --- a/os/hal/platforms/STM32L1xx/stm32_dma.h +++ b/os/hal/platforms/STM32L1xx/stm32_dma.h @@ -355,8 +355,10 @@ 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)->channel->CNDTR > 0) && \
- ((dmastp)->channel->CCR & STM32_DMA_CR_EN))
+ while ((dmastp)->channel->CNDTR > 0) \
+ ; \
+ dmaStreamDisable(dmastp); \
+}
/** @} */
/*===========================================================================*/
|