bug in binding peripheral to dma channel; inverted sense of a bitmask

This commit is contained in:
ziggurat29 2016-04-25 10:27:02 -05:00
parent cb15ec1d9b
commit 1218ee5f51

View File

@ -523,7 +523,7 @@ void stm32l4_dmasetup(DMA_HANDLE handle, uint32_t paddr, uint32_t maddr,
/* define peripheral indicated in dmach->function */
regval = dmabase_getreg(dmach, STM32L4_DMA_CSELR_OFFSET);
regval &= (0x0f << (dmach->chan << 2));
regval &= ~(0x0f << (dmach->chan << 2));
regval |= (dmach->function << (dmach->chan << 2));
dmabase_putreg(dmach, STM32L4_DMA_CSELR_OFFSET, regval);
}