aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32/stm32_dma.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-07-27 14:44:28 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-07-27 14:44:28 +0000
commit8249123228e7de9f1694905d090f91a063306bdf (patch)
tree56e9242a34fdd7c8c9768a1d96b3412fa6f4c661 /os/hal/platforms/STM32/stm32_dma.h
parent79b97b0f60aa6d99667a6bb4d402c420cb6d856e (diff)
downloadChibiOS-8249123228e7de9f1694905d090f91a063306bdf.tar.gz
ChibiOS-8249123228e7de9f1694905d090f91a063306bdf.tar.bz2
ChibiOS-8249123228e7de9f1694905d090f91a063306bdf.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2095 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/stm32_dma.h')
-rw-r--r--os/hal/platforms/STM32/stm32_dma.h12
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.