aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/STM32F0xx/stm32_dma.h
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-05-30 10:42:39 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-05-30 10:42:39 +0000
commitffac18dcd19bad0a40a3c6b0bf803cf613234a94 (patch)
treeb560f88bf2cd9cd9584f733b910f648444fc71fe /os/hal/ports/STM32/STM32F0xx/stm32_dma.h
parentb648630b9396b3a25832508cfdea6897de6208e8 (diff)
downloadChibiOS-ffac18dcd19bad0a40a3c6b0bf803cf613234a94.tar.gz
ChibiOS-ffac18dcd19bad0a40a3c6b0bf803cf613234a94.tar.bz2
ChibiOS-ffac18dcd19bad0a40a3c6b0bf803cf613234a94.zip
Added support for extra DMA channels in STM32F072.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7997 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32/STM32F0xx/stm32_dma.h')
-rw-r--r--os/hal/ports/STM32/STM32F0xx/stm32_dma.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/os/hal/ports/STM32/STM32F0xx/stm32_dma.h b/os/hal/ports/STM32/STM32F0xx/stm32_dma.h
index d963b4650..067d655e8 100644
--- a/os/hal/ports/STM32/STM32F0xx/stm32_dma.h
+++ b/os/hal/ports/STM32/STM32F0xx/stm32_dma.h
@@ -33,12 +33,6 @@
/*===========================================================================*/
/**
- * @brief Total number of DMA streams.
- * @note This is the total number of streams among all the DMA units.
- */
-#define STM32_DMA_STREAMS 5
-
-/**
* @brief Mask of the ISR bits passed to the DMA callback functions.
*/
#define STM32_DMA_ISR_MASK 0x0F
@@ -113,6 +107,10 @@
#define STM32_DMA1_STREAM3 STM32_DMA_STREAM(2)
#define STM32_DMA1_STREAM4 STM32_DMA_STREAM(3)
#define STM32_DMA1_STREAM5 STM32_DMA_STREAM(4)
+#if (STM32_DMA_STREAMS > 5) || defined(__DOXYGEN__)
+#define STM32_DMA1_STREAM6 STM32_DMA_STREAM(5)
+#define STM32_DMA1_STREAM7 STM32_DMA_STREAM(6)
+#endif
/** @} */
/**
@@ -172,6 +170,18 @@
/* Derived constants and error checks. */
/*===========================================================================*/
+#if !defined(STM32_ADVANCED_DMA)
+#error "missing STM32_ADVANCED_DMA definition in registry"
+#endif
+
+#if !defined(STM32_DMA_STREAMS)
+#error "missing STM32_DMA_STREAMS definition in registry"
+#endif
+
+#if STM32_ADVANCED_DMA == TRUE
+#error "DMAv1 driver does not support STM32_ADVANCED_DMA"
+#endif
+
/*===========================================================================*/
/* Driver data structures and types. */
/*===========================================================================*/