From 184897394eee0209a66daecaa5677879aad32b0b Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 15 Jan 2012 19:28:09 +0000 Subject: Fixed warning with Keil compiler. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3815 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32F2xx/stm32_dma.h | 2 +- os/hal/platforms/STM32F4xx/stm32_dma.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'os/hal/platforms') 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. -- cgit v1.2.3