aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32F1xx
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-01-08 21:20:41 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-01-08 21:20:41 +0000
commit4817e5d8143b362981684de9225bcc0805d2bb0d (patch)
tree4600c015fb7f36ab0d13628544cee87f7158364d /os/hal/platforms/STM32F1xx
parent340385485a74f35e167ab2016bc8d57e7434bf27 (diff)
downloadChibiOS-4817e5d8143b362981684de9225bcc0805d2bb0d.tar.gz
ChibiOS-4817e5d8143b362981684de9225bcc0805d2bb0d.tar.bz2
ChibiOS-4817e5d8143b362981684de9225bcc0805d2bb0d.zip
DMA. Fixed possible overflow in DMA priority.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3772 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32F1xx')
-rw-r--r--os/hal/platforms/STM32F1xx/stm32_dma.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/os/hal/platforms/STM32F1xx/stm32_dma.h b/os/hal/platforms/STM32F1xx/stm32_dma.h
index 7e230d851..deaac593d 100644
--- a/os/hal/platforms/STM32F1xx/stm32_dma.h
+++ b/os/hal/platforms/STM32F1xx/stm32_dma.h
@@ -146,7 +146,7 @@
#define STM32_DMA_CR_SIZE_MASK (STM32_DMA_CR_MSIZE_MASK | \
STM32_DMA_CR_MSIZE_MASK)
#define STM32_DMA_CR_PL_MASK DMA_CCR1_PL
-#define STM32_DMA_CR_PL(n) ((n) << 12)
+#define STM32_DMA_CR_PL(n) (((n) << 12) & (STM32_DMA_CR_PL_MASK))
/** @} */
/**