aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-01-15 19:28:09 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-01-15 19:28:09 +0000
commit184897394eee0209a66daecaa5677879aad32b0b (patch)
tree7b8eb299b8acda2ce93e08b11c63059680f85c72 /os/hal/platforms
parenteb9622aa4a5fae5ac3937d8263c8c0b15d7a12a2 (diff)
downloadChibiOS-184897394eee0209a66daecaa5677879aad32b0b.tar.gz
ChibiOS-184897394eee0209a66daecaa5677879aad32b0b.tar.bz2
ChibiOS-184897394eee0209a66daecaa5677879aad32b0b.zip
Fixed warning with Keil compiler.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3815 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms')
-rw-r--r--os/hal/platforms/STM32F2xx/stm32_dma.h2
-rw-r--r--os/hal/platforms/STM32F4xx/stm32_dma.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/os/hal/platforms/STM32F2xx/stm32_dma.h b/os/hal/platforms/STM32F2xx/stm32_dma.h
index b17b3aa61..8f03a64a7 100644
--- a/os/hal/platforms/STM32F2xx/stm32_dma.h
+++ b/os/hal/platforms/STM32F2xx/stm32_dma.h
@@ -54,7 +54,7 @@
* nibble
* @return Returns the channel associated to the stream.
*/
-#define STM32_DMA_GETCHANNEL(id, c) ((c) >> (((id) & 7) * 4))
+#define STM32_DMA_GETCHANNEL(id, c) (((c) >> (((id) & 7) * 4)) & 7)
/**
* @brief Returns an unique numeric identifier for a DMA stream.
diff --git a/os/hal/platforms/STM32F4xx/stm32_dma.h b/os/hal/platforms/STM32F4xx/stm32_dma.h
index 5c0430e7d..967934a78 100644
--- a/os/hal/platforms/STM32F4xx/stm32_dma.h
+++ b/os/hal/platforms/STM32F4xx/stm32_dma.h
@@ -54,7 +54,7 @@
* nibble
* @return Returns the channel associated to the stream.
*/
-#define STM32_DMA_GETCHANNEL(id, c) ((c) >> (((id) & 7) * 4))
+#define STM32_DMA_GETCHANNEL(id, c) (((c) >> (((id) & 7) * 4)) & 7)
/**
* @brief Returns an unique numeric identifier for a DMA stream.