Cleaned up and streamlined DMA support for f1. Definitely needs a bunch of testing!

This commit is contained in:
Piotr Esden-Tempski
2012-02-29 16:02:51 -08:00
parent 20c5e56234
commit ec904f176b
3 changed files with 242 additions and 1005 deletions

View File

@@ -90,11 +90,11 @@ int main(void)
dma_enable_mem2mem_mode(DMA1, DMA_CHANNEL1);
/* Highest priority. */
dma_set_priority(DMA1, DMA_CHANNEL1, DMA_CCR1_PL_VERY_HIGH);
dma_set_priority(DMA1, DMA_CHANNEL1, DMA_CCR_PL_VERY_HIGH);
/* 32Bit wide transfer for source and destination. */
dma_set_memory_size(DMA1, DMA_CHANNEL1, DMA_CCR1_MSIZE_32BIT);
dma_set_peripheral_size(DMA1, DMA_CHANNEL1, DMA_CCR1_PSIZE_32BIT);
dma_set_memory_size(DMA1, DMA_CHANNEL1, DMA_CCR_MSIZE_32BIT);
dma_set_peripheral_size(DMA1, DMA_CHANNEL1, DMA_CCR_PSIZE_32BIT);
/*
* After every 32bits we have to increase the address because