aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal')
-rw-r--r--os/hal/platforms/STM32F1xx/stm32_dma.h2
-rw-r--r--os/hal/platforms/STM32L1xx/stm32_dma.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/os/hal/platforms/STM32F1xx/stm32_dma.h b/os/hal/platforms/STM32F1xx/stm32_dma.h
index 67cdab540..a4cae4ea6 100644
--- a/os/hal/platforms/STM32F1xx/stm32_dma.h
+++ b/os/hal/platforms/STM32F1xx/stm32_dma.h
@@ -363,7 +363,7 @@ typedef void (*stm32_dmaisr_t)(void *p, uint32_t flags);
*
* @param[in] dmastp pointer to a stm32_dma_stream_t structure
*/
-#define dmaWaitCompletion(dmastp) \
+#define dmaWaitCompletion(dmastp) { \
while ((dmastp)->channel->CNDTR > 0) \
; \
dmaStreamDisable(dmastp); \
diff --git a/os/hal/platforms/STM32L1xx/stm32_dma.h b/os/hal/platforms/STM32L1xx/stm32_dma.h
index 71db4ba65..bf3f3f3ca 100644
--- a/os/hal/platforms/STM32L1xx/stm32_dma.h
+++ b/os/hal/platforms/STM32L1xx/stm32_dma.h
@@ -354,7 +354,7 @@ typedef void (*stm32_dmaisr_t)(void *p, uint32_t flags);
*
* @param[in] dmastp pointer to a stm32_dma_stream_t structure
*/
-#define dmaWaitCompletion(dmastp) \
+#define dmaWaitCompletion(dmastp) { \
while ((dmastp)->channel->CNDTR > 0) \
; \
dmaStreamDisable(dmastp); \