aboutsummaryrefslogtreecommitdiffstats
path: root/os/io/platforms/STM32/stm32_dma.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-11-01 14:14:10 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-11-01 14:14:10 +0000
commit37182851ef5334fb8e8e42ca9ed500dbc59a85b5 (patch)
tree1ddce45228e896e7d8e5f20fdaee484d74ec26f4 /os/io/platforms/STM32/stm32_dma.c
parent5d84678f57e30b8ec6765a74eb05c89c9c651baa (diff)
downloadChibiOS-37182851ef5334fb8e8e42ca9ed500dbc59a85b5.tar.gz
ChibiOS-37182851ef5334fb8e8e42ca9ed500dbc59a85b5.tar.bz2
ChibiOS-37182851ef5334fb8e8e42ca9ed500dbc59a85b5.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1261 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/io/platforms/STM32/stm32_dma.c')
-rw-r--r--os/io/platforms/STM32/stm32_dma.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/os/io/platforms/STM32/stm32_dma.c b/os/io/platforms/STM32/stm32_dma.c
index d78a058d9..7368f1bb9 100644
--- a/os/io/platforms/STM32/stm32_dma.c
+++ b/os/io/platforms/STM32/stm32_dma.c
@@ -28,6 +28,12 @@
#include "stm32_dma.h"
+#undef FALSE
+#undef TRUE
+#include <stm32f10x.h>
+#define FALSE 0
+#define TRUE (!FALSE)
+
static cnt_t dmacnt1;
#if defined(STM32F10X_HD) || defined (STM32F10X_CL)
static cnt_t dmacnt2;
@@ -39,8 +45,11 @@ static cnt_t dmacnt2;
void dmaInit(void) {
dmacnt1 = 0;
+ DMA1->IFCR = 0x0FFFFFFF;
+
#if defined(STM32F10X_HD) || defined (STM32F10X_CL)
dmacnt2 = 0;
+ DMA2->IFCR = 0x0FFFFFFF;
#endif
}