From 0d50b97ed5c61bd7c3936407656a5c70c3cdfa23 Mon Sep 17 00:00:00 2001 From: Piotr Esden-Tempski Date: Fri, 20 Apr 2012 21:16:23 -0700 Subject: [PATCH] Correct DMA_CCR_MSIZE and PSIZE bit masks. Thanks Tomas Solic. --- include/libopencm3/stm32/f1/dma.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/libopencm3/stm32/f1/dma.h b/include/libopencm3/stm32/f1/dma.h index 7f9abada..5aa01835 100644 --- a/include/libopencm3/stm32/f1/dma.h +++ b/include/libopencm3/stm32/f1/dma.h @@ -252,14 +252,14 @@ #define DMA_CCR_MSIZE_8BIT (0x0 << 10) #define DMA_CCR_MSIZE_16BIT (0x1 << 10) #define DMA_CCR_MSIZE_32BIT (0x2 << 10) -#define DMA_CCR_MSIZE_MASK (0x2 << 10) +#define DMA_CCR_MSIZE_MASK (0x3 << 10) #define DMA_CCR_MSIZE_SHIFT 10 /* PSIZE[9:8]: Peripheral size */ #define DMA_CCR_PSIZE_8BIT (0x0 << 8) #define DMA_CCR_PSIZE_16BIT (0x1 << 8) #define DMA_CCR_PSIZE_32BIT (0x2 << 8) -#define DMA_CCR_PSIZE_MASK (0x2 << 8) +#define DMA_CCR_PSIZE_MASK (0x3 << 8) #define DMA_CCR_PSIZE_SHIFT 8 /* MINC: Memory increment mode */