From 2fe567e25debd0cb6ac7a92f229055679125bcdb Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Thu, 8 Nov 2012 12:12:59 -0500 Subject: [PATCH 1/3] stm32f4: Add dma.o --- lib/stm32/f4/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/stm32/f4/Makefile b/lib/stm32/f4/Makefile index 19ea8efd..614a37e4 100644 --- a/lib/stm32/f4/Makefile +++ b/lib/stm32/f4/Makefile @@ -32,7 +32,7 @@ ARFLAGS = rcs OBJS = rcc.o gpio.o usart.o spi.o flash.o \ i2c.o exti.o pwr.o timer.o \ usb.o usb_standard.o usb_control.o usb_fx07_common.o usb_f107.o \ - usb_f207.o adc.o + usb_f207.o adc.o dma.o VPATH += ../../usb:../:../../cm3 From f3557b8d6087d6e041c781419cda694431916fc4 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Thu, 8 Nov 2012 12:13:16 -0500 Subject: [PATCH 2/3] stm32f4/dma: Fix DMA_ISR_OFFSET definition --- include/libopencm3/stm32/f4/dma.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/libopencm3/stm32/f4/dma.h b/include/libopencm3/stm32/f4/dma.h index 1f034fa8..c765a799 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) From 095e6cdb5dfacb715b5266ba3f76ed9021ef532e Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Thu, 8 Nov 2012 12:20:36 -0500 Subject: [PATCH 3/3] stm32f4/dma: Fix cut-and-paste error --- lib/stm32/f4/dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/stm32/f4/dma.c b/lib/stm32/f4/dma.c index 80eb963a..7c80dcf6 100644 --- a/lib/stm32/f4/dma.c +++ b/lib/stm32/f4/dma.c @@ -123,7 +123,7 @@ The interrupt flag for the stream is returned. @param[in] dma unsigned int32. DMA controller base address: DMA1 or DMA2 @param[in] stream unsigned int8. Stream number: @ref dma_st_number -@param[in] interrupt unsigned int32. Interrupt number: @ref dma_st_number +@param[in] interrupt unsigned int32. Interrupt number: @ref dma_if_offset @returns bool interrupt flag is set. */