Fixed harmless arithmetical overflow in the STM32_DMA_GETCHANNEL() macro.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3759 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
ceabd20101
commit
75bf0b4b57
|
@ -54,7 +54,7 @@
|
||||||
* nibble
|
* nibble
|
||||||
* @return Returns the channel associated to the stream.
|
* @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) & 15) >> (((id) & 7) * 4))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns an unique numeric identifier for a DMA stream.
|
* @brief Returns an unique numeric identifier for a DMA stream.
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
* nibble
|
* nibble
|
||||||
* @return Returns the channel associated to the stream.
|
* @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) & 15) >> (((id) & 7) * 4))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns an unique numeric identifier for a DMA stream.
|
* @brief Returns an unique numeric identifier for a DMA stream.
|
||||||
|
|
Loading…
Reference in New Issue