From 8249123228e7de9f1694905d090f91a063306bdf Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 27 Jul 2010 14:44:28 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2095 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32/stm32_dma.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'os/hal/platforms/STM32/stm32_dma.h') 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 @@ -146,6 +146,18 @@ typedef struct { (dmachp)->CCR = (uint32_t)(ccr); \ } +/** + * @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 -- cgit v1.2.3