A simple library to access the DMA functionality.

Fork of SimpleDMA by Erik -

Revision:
4:c3a84c6c432c
Parent:
3:34f5bf8adfa0
Child:
5:d9f46ef80e20
--- a/SimpleDMA_KL25.cpp	Thu Dec 26 12:19:29 2013 +0000
+++ b/SimpleDMA_KL25.cpp	Thu Dec 26 16:31:54 2013 +0000
@@ -76,23 +76,17 @@
 }
 
 
-int SimpleDMA::start(int length) {
+int SimpleDMA::start(int length) {  
     if (auto_channel)
         _channel = getFreeChannel();
     else
         while(isBusy());
-        
-    DMA0->DMA[_channel].DSR_BCR |= DMA_DSR_BCR_DONE_MASK ;
     
     if (length > 0xFFFFF)
         return -1;
-    
-    if (irq_en) {
-        DCR |= (1UL<<31);
+
+    DCR |= (1UL<<31);
         irq_owner[_channel] = this;
-        }
-    else
-        DCR &= ~(1UL<<31);
     
     //Set registers:
     DMA0->DMA[_channel].SAR = SAR;