diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-11-14 13:38:45 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-11-14 13:38:45 +0000 |
commit | 3d8808a39ebb8b6e5d90ddaf24de48f4dff2860e (patch) | |
tree | c1a66c3d5057a0e046a2af8703cf2e437d84d7ea /os/hal/platforms | |
parent | 7ab0cff418bf49fcf1671dd72667b81a85c1ac37 (diff) | |
download | ChibiOS-3d8808a39ebb8b6e5d90ddaf24de48f4dff2860e.tar.gz ChibiOS-3d8808a39ebb8b6e5d90ddaf24de48f4dff2860e.tar.bz2 ChibiOS-3d8808a39ebb8b6e5d90ddaf24de48f4dff2860e.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2364 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms')
-rw-r--r-- | os/hal/platforms/STM32/stm32_dma.c | 8 | ||||
-rw-r--r-- | os/hal/platforms/STM32/stm32_dma.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/os/hal/platforms/STM32/stm32_dma.c b/os/hal/platforms/STM32/stm32_dma.c index 0dc88e814..e25e05ad1 100644 --- a/os/hal/platforms/STM32/stm32_dma.c +++ b/os/hal/platforms/STM32/stm32_dma.c @@ -37,7 +37,7 @@ /*===========================================================================*/
static cnt_t dmacnt1;
-#if defined(STM32_HAS_DMA2)
+#if STM32_HAS_DMA2
static cnt_t dmacnt2;
#endif
@@ -65,7 +65,7 @@ void dmaInit(void) { for (i = STM32_DMA_CHANNEL_7; i >= STM32_DMA_CHANNEL_1; i--)
dmaDisableChannel(STM32_DMA1, i);
STM32_DMA1->IFCR = 0xFFFFFFFF;
-#if defined(STM32_HAS_DMA2)
+#if STM32_HAS_DMA2
dmacnt2 = 0;
for (i = STM32_DMA_CHANNEL_5; i >= STM32_DMA_CHANNEL_1; i--)
dmaDisableChannel(STM32_DMA2, i);
@@ -89,7 +89,7 @@ void dmaEnable(uint32_t dma) { DMA1->IFCR = 0x0FFFFFFF;
}
break;
-#if defined(STM32_HAS_DMA2)
+#if STM32_HAS_DMA2
case DMA2_ID:
if (dmacnt2++ == 0) {
RCC->AHBENR |= RCC_AHBENR_DMA2EN;
@@ -114,7 +114,7 @@ void dmaDisable(uint32_t dma) { if (--dmacnt1 == 0)
RCC->AHBENR &= ~RCC_AHBENR_DMA1EN;
break;
-#if defined(STM32_HAS_DMA2)
+#if STM32_HAS_DMA2
case DMA2_ID:
if (--dmacnt2 == 0)
RCC->AHBENR &= ~RCC_AHBENR_DMA2EN;
diff --git a/os/hal/platforms/STM32/stm32_dma.h b/os/hal/platforms/STM32/stm32_dma.h index 078149167..7f8ba8057 100644 --- a/os/hal/platforms/STM32/stm32_dma.h +++ b/os/hal/platforms/STM32/stm32_dma.h @@ -38,7 +38,7 @@ #define DMA1_ID 0
/** @brief DMA2 identifier.*/
-#if defined(STM32_HAS_DMA2) || defined(__DOXYGEN__)
+#if STM32_HAS_DMA2 || defined(__DOXYGEN__)
#define DMA2_ID 1
#endif
@@ -100,7 +100,7 @@ typedef struct { /** Pointer to the DMA1 channel 7 registers block.*/
#define STM32_DMA1_CH7 (&STM32_DMA1->channels[6])
-#if defined(STM32_HAS_DMA2) || defined(__DOXYGEN__)
+#if STM32_HAS_DMA2 || defined(__DOXYGEN__)
/** DMA2 registers block numeric address.*/
#define STM32_DMA2_BASE (AHBPERIPH_BASE + 0x0400)
/** Pointer to the DMA2 registers block.*/
|