Merge pull request #92 "DMA tidyup"

Merge remote-tracking branch 'karlp/dma_tidy'
This commit is contained in:
Piotr Esden-Tempski 2013-02-18 14:14:22 -08:00
commit b4634ba8ff
7 changed files with 7 additions and 9 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 -------------------------------------------------- */

View File

@ -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

View File

@ -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

View File

@ -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;