stm32f4/dma: Fix DMA_ISR_OFFSET definition

This commit is contained in:
Ben Gamari 2012-11-08 12:13:16 -05:00
parent 2fe567e25d
commit f3557b8d60

View File

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