aboutsummaryrefslogtreecommitdiff
path: root/include/libopencm3/stm32/f4
diff options
context:
space:
mode:
authorPiotr Esden-Tempski2012-11-08 12:04:07 -0800
committerPiotr Esden-Tempski2012-11-08 12:04:28 -0800
commitf714ee42c0d2f6c53ffa42bb466573e1d34b912a (patch)
tree06c227d3509deb91d62d118c85fcaaf71f74b472 /include/libopencm3/stm32/f4
parentd87e751f71b729b01153bb4091eca5842f6229f1 (diff)
parent095e6cdb5dfacb715b5266ba3f76ed9021ef532e (diff)
Merging pull request #60 Miscellaneous DMA fixes for F4
Merge remote-tracking branch 'bgamari/master'
Diffstat (limited to 'include/libopencm3/stm32/f4')
-rw-r--r--include/libopencm3/stm32/f4/dma.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/libopencm3/stm32/f4/dma.h b/include/libopencm3/stm32/f4/dma.h
index 1f034fa..c765a79 100644
--- a/include/libopencm3/stm32/f4/dma.h
+++ b/include/libopencm3/stm32/f4/dma.h
@@ -233,7 +233,7 @@ LGPL License Terms @ref lgpl_license
/**@}*/
/* Offset within interrupt status register to start of stream interrupt flag field */
-#define DMA_ISR_OFFSET(stream) (6*(stream & 0x01)+16*(stream & 0x02))
+#define DMA_ISR_OFFSET(stream) (6*(stream & 0x01)+16*((stream & 0x02) >> 1))
#define DMA_ISR_FLAGS (DMA_ISR_TCIF | DMA_ISR_HTIF | DMA_ISR_TEIF | DMA_ISR_DMEIF | DMA_ISR_FEIF)
#define DMA_ISR_MASK(stream) DMA_ISR_FLAGS << DMA_ISR_OFFSET(stream)