diff options
Diffstat (limited to 'os/hal/platforms/STM32/stm32_dma.h')
-rw-r--r-- | os/hal/platforms/STM32/stm32_dma.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32/stm32_dma.h b/os/hal/platforms/STM32/stm32_dma.h index 94e863d31..567b3ef0b 100644 --- a/os/hal/platforms/STM32/stm32_dma.h +++ b/os/hal/platforms/STM32/stm32_dma.h @@ -147,6 +147,18 @@ typedef struct { }
/**
+ * @brief DMA channel enable.
+ * @note Channels are numbered from 0 to 6, use the appropriate macro
+ * as parameter.
+ *
+ * @param[in] dmap pointer to a stm32_dma_t structure
+ * @param[in] ch channel number
+ */
+#define dmaEnableChannel(dmap, ch) { \
+ (dmap)->channels[ch].CCR |= 1; \
+}
+
+/**
* @brief DMA channel disable.
* @note Channels are numbered from 0 to 6, use the appropriate macro
* as parameter.
|