aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Esden-Tempski2013-02-18 14:14:22 -0800
committerPiotr Esden-Tempski2013-02-18 14:14:22 -0800
commitb4634ba8fff09f73bf4598ae75e99d45e7b95126 (patch)
tree14745a002413045ae90bf5264619c5a4bb15e00e
parentb13e55da8c10479aa1d0086aacab52f52e2852de (diff)
parent7afc13930f86f226cac27abc63a68afed0b119ec (diff)
Merge pull request #92 "DMA tidyup"
Merge remote-tracking branch 'karlp/dma_tidy'
-rw-r--r--include/libopencm3/stm32/f1/dma.h2
-rw-r--r--include/libopencm3/stm32/f2/dma.h2
-rw-r--r--include/libopencm3/stm32/f2/rng.h2
-rw-r--r--include/libopencm3/stm32/f4/adc.h2
-rw-r--r--include/libopencm3/stm32/f4/dma.h2
-rw-r--r--include/libopencm3/stm32/f4/rng.h2
-rw-r--r--lib/stm32/common/dma_common_f13.c4
7 files changed, 7 insertions, 9 deletions
diff --git a/include/libopencm3/stm32/f1/dma.h b/include/libopencm3/stm32/f1/dma.h
index 4af8f43..e0c55a6 100644
--- a/include/libopencm3/stm32/f1/dma.h
+++ b/include/libopencm3/stm32/f1/dma.h
@@ -34,7 +34,7 @@ LGPL License Terms @ref lgpl_license
#ifndef LIBOPENCM3_DMA_H
#define LIBOPENCM3_DMA_H
-#include <libopencm3/stm32/f2/memorymap.h>
+#include <libopencm3/stm32/memorymap.h>
#include <libopencm3/stm32/common/dma_common_f13.h>
#endif
diff --git a/include/libopencm3/stm32/f2/dma.h b/include/libopencm3/stm32/f2/dma.h
index 8226f55..0eb952c 100644
--- a/include/libopencm3/stm32/f2/dma.h
+++ b/include/libopencm3/stm32/f2/dma.h
@@ -34,7 +34,7 @@ LGPL License Terms @ref lgpl_license
#ifndef LIBOPENCM3_DMA_H
#define LIBOPENCM3_DMA_H
-#include <libopencm3/stm32/f2/memorymap.h>
+#include <libopencm3/stm32/memorymap.h>
#include <libopencm3/stm32/common/dma_common_f24.h>
#endif
diff --git a/include/libopencm3/stm32/f2/rng.h b/include/libopencm3/stm32/f2/rng.h
index 63d03fe..403c7c7 100644
--- a/include/libopencm3/stm32/f2/rng.h
+++ b/include/libopencm3/stm32/f2/rng.h
@@ -18,7 +18,7 @@
#ifndef LIBOPENCM3_RNG_F2_H
#define LIBOPENCM3_RNG_F2_H
-#include <libopencm3/stm32/f2/memorymap.h>
+#include <libopencm3/stm32/memorymap.h>
#include <libopencm3/stm32/common/rng_common_f24.h>
#endif
diff --git a/include/libopencm3/stm32/f4/adc.h b/include/libopencm3/stm32/f4/adc.h
index 272c4c2..e400591 100644
--- a/include/libopencm3/stm32/f4/adc.h
+++ b/include/libopencm3/stm32/f4/adc.h
@@ -36,7 +36,7 @@ LGPL License Terms @ref lgpl_license
#ifndef LIBOPENCM3_ADC_H
#define LIBOPENCM3_ADC_H
-#include <libopencm3/stm32/f4/memorymap.h>
+#include <libopencm3/stm32/memorymap.h>
#include <libopencm3/cm3/common.h>
/* --- Convenience macros -------------------------------------------------- */
diff --git a/include/libopencm3/stm32/f4/dma.h b/include/libopencm3/stm32/f4/dma.h
index cc97024..a3e9db1 100644
--- a/include/libopencm3/stm32/f4/dma.h
+++ b/include/libopencm3/stm32/f4/dma.h
@@ -34,7 +34,7 @@ LGPL License Terms @ref lgpl_license
#ifndef LIBOPENCM3_DMA_H
#define LIBOPENCM3_DMA_H
-#include <libopencm3/stm32/f2/memorymap.h>
+#include <libopencm3/stm32/memorymap.h>
#include <libopencm3/stm32/common/dma_common_f24.h>
#endif
diff --git a/include/libopencm3/stm32/f4/rng.h b/include/libopencm3/stm32/f4/rng.h
index b72f801..e8e6cc4 100644
--- a/include/libopencm3/stm32/f4/rng.h
+++ b/include/libopencm3/stm32/f4/rng.h
@@ -18,7 +18,7 @@
#ifndef LIBOPENCM3_RNG_F4_H
#define LIBOPENCM3_RNG_F4_H
-#include <libopencm3/stm32/f4/memorymap.h>
+#include <libopencm3/stm32/memorymap.h>
#include <libopencm3/stm32/common/rng_common_f24.h>
#endif
diff --git a/lib/stm32/common/dma_common_f13.c b/lib/stm32/common/dma_common_f13.c
index 0a708aa..35b9da6 100644
--- a/lib/stm32/common/dma_common_f13.c
+++ b/lib/stm32/common/dma_common_f13.c
@@ -55,9 +55,7 @@ The channel is disabled and configuration registers are cleared.
void dma_channel_reset(u32 dma, u8 channel)
{
- /* Disable channel. */
- DMA_CCR(dma, channel) &= ~DMA_CCR_EN;
- /* Reset config bits. */
+ /* Disable channel and reset config bits. */
DMA_CCR(dma, channel) = 0;
/* Reset data transfer number. */
DMA_CNDTR(dma, channel) = 0;