aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32F2xx/stm32_dma.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-05-24 18:31:34 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-05-24 18:31:34 +0000
commit7a6a1679a413987ffa47f2f9892e241f3448f5f0 (patch)
tree88c38d7e249eeedc7b51979486262a0c7619bc0e /os/hal/platforms/STM32F2xx/stm32_dma.h
parent293eddc33f8957f1bb896ef074bb56bf2ec2f895 (diff)
downloadChibiOS-7a6a1679a413987ffa47f2f9892e241f3448f5f0.tar.gz
ChibiOS-7a6a1679a413987ffa47f2f9892e241f3448f5f0.tar.bz2
ChibiOS-7a6a1679a413987ffa47f2f9892e241f3448f5f0.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4232 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32F2xx/stm32_dma.h')
-rw-r--r--os/hal/platforms/STM32F2xx/stm32_dma.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32F2xx/stm32_dma.h b/os/hal/platforms/STM32F2xx/stm32_dma.h
index 53097c297..d9434acd5 100644
--- a/os/hal/platforms/STM32F2xx/stm32_dma.h
+++ b/os/hal/platforms/STM32F2xx/stm32_dma.h
@@ -57,6 +57,16 @@
#define STM32_DMA_GETCHANNEL(id, c) (((c) >> (((id) & 7) * 4)) & 7)
/**
+ * @brief Checks if a DMA priority is within the valid range.
+ * @param[in] prio DMA priority
+ *
+ * @retval The check result.
+ * @retval FALSE invalid DMA priority.
+ * @retval TRUE correct DMA priority.
+ */
+#define STM32_DMA_IS_VALID_PRIORITY(prio) (((prio) >= 0) && ((prio) <= 3))
+
+/**
* @brief Returns an unique numeric identifier for a DMA stream.
*
* @param[in] dma the DMA unit number