aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32F4xx/stm32_dma.h
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/platforms/STM32F4xx/stm32_dma.h')
-rw-r--r--os/hal/platforms/STM32F4xx/stm32_dma.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/os/hal/platforms/STM32F4xx/stm32_dma.h b/os/hal/platforms/STM32F4xx/stm32_dma.h
index 16dcea02d..9879dcd24 100644
--- a/os/hal/platforms/STM32F4xx/stm32_dma.h
+++ b/os/hal/platforms/STM32F4xx/stm32_dma.h
@@ -144,7 +144,7 @@
#define STM32_DMA_CR_SIZE_MASK (STM32_DMA_CR_MSIZE_MASK | \
STM32_DMA_CR_MSIZE_MASK)
#define STM32_DMA_CR_PL_MASK DMA_SxCR_PL
-#define STM32_DMA_CR_PL(n) ((n) << 16)
+#define STM32_DMA_CR_PL(n) (((n) << 16) & (STM32_DMA_CR_PL_MASK))
/** @} */
/**