diff options
Diffstat (limited to 'os/hal/platforms/STM32L1xx')
-rw-r--r-- | os/hal/platforms/STM32L1xx/stm32_dma.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/os/hal/platforms/STM32L1xx/stm32_dma.h b/os/hal/platforms/STM32L1xx/stm32_dma.h index bf3f3f3ca..71af4a339 100644 --- a/os/hal/platforms/STM32L1xx/stm32_dma.h +++ b/os/hal/platforms/STM32L1xx/stm32_dma.h @@ -59,9 +59,15 @@ #define STM32_DMA_GETCHANNEL(n, c) 0
/**
- * @name DMA streams identifiers
- * @{
+ * @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.
*
@@ -94,6 +100,10 @@ #define STM32_DMA_IS_VALID_ID(id, mask) (((1 << (id)) & (mask)))
/**
+ * @name DMA streams identifiers
+ * @{
+ */
+/**
* @brief Returns a pointer to a stm32_dma_stream_t structure.
*
* @param[in] id the stream numeric identifier
|