aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-01-09 08:49:58 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-01-09 08:49:58 +0000
commitda38ec03db0391378811e0214bf039feea6d79f3 (patch)
tree2d6ed96ddf716aeb18583ba6ef6298ad8a47117f
parent725e8f6aa5035529011560212e1a92d8f9b2ab38 (diff)
downloadChibiOS-da38ec03db0391378811e0214bf039feea6d79f3.tar.gz
ChibiOS-da38ec03db0391378811e0214bf039feea6d79f3.tar.bz2
ChibiOS-da38ec03db0391378811e0214bf039feea6d79f3.zip
Fixed masking error.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3774 35acf78f-673a-0410-8e92-d51de3d6d3f4
-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 b5f95f0c8..d57cae4be 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) & 15) >> (((id) & 7) * 4))
+#define STM32_DMA_GETCHANNEL(id, c) ((c) >> (((id) & 7) * 4))
/**
* @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 16dcea02d..bcadf153c 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) & 15) >> (((id) & 7) * 4))
+#define STM32_DMA_GETCHANNEL(id, c) ((c) >> (((id) & 7) * 4))
/**
* @brief Returns an unique numeric identifier for a DMA stream.