diff options
Diffstat (limited to 'os/hal/platforms/STM32L1xx/stm32_dma.h')
-rw-r--r-- | os/hal/platforms/STM32L1xx/stm32_dma.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/os/hal/platforms/STM32L1xx/stm32_dma.h b/os/hal/platforms/STM32L1xx/stm32_dma.h index 6afadfcc1..a12f60fcb 100644 --- a/os/hal/platforms/STM32L1xx/stm32_dma.h +++ b/os/hal/platforms/STM32L1xx/stm32_dma.h @@ -290,6 +290,8 @@ typedef void (*stm32_dmaisr_t)(void *p, uint32_t flags); /**
* @brief DMA stream disable.
+ * @details The function disables the specified stream and then clears any
+ * pending interrupt.
* @note This function can be invoked in both ISR or thread context.
* @pre The stream must have been allocated using @p dmaStreamAllocate().
* @post After use the stream can be released using @p dmaStreamRelease().
@@ -299,7 +301,8 @@ typedef void (*stm32_dmaisr_t)(void *p, uint32_t flags); * @special
*/
#define dmaStreamDisable(dmastp) { \
- (dmastp)->channel->CCR &= ~STM32_DMA_CR_EN; \
+ (dmastp)->stream->CR &= ~STM32_DMA_CR_EN; \
+ dmaStreamClearInterrupt(dmastp); \
}
/**
|