MODDMA GPDMA Controller New features: transfer pins to memory buffer under periodic timer control and send double buffers to DAC

Dependents:   FirstTest WaveSim IO-dma-memmem DACDMAfuncgenlib ... more

Files at this revision

API Documentation at this revision

Comitter:
AjK
Date:
Sun Mar 13 23:54:06 2011 +0000
Parent:
12:1dfee7208043
Child:
14:15939b260dfa
Commit message:
1.8 See ChangeLog.c

Changed in this revision

ChangeLog.c Show annotated file Show diff for this revision Revisions of this file
example3.h Show annotated file Show diff for this revision Revisions of this file
--- a/ChangeLog.c	Sun Mar 13 23:28:21 2011 +0000
+++ b/ChangeLog.c	Sun Mar 13 23:54:06 2011 +0000
@@ -1,5 +1,10 @@
 /* $Id:$
 
+1.9 - 13 Mar 2011
+
+    * Improved example3.h to add rescheduling additional grabs
+      based on the timer setup.
+      
 1.8 - 13 Mar 2011
 
     * Renamed example files to .h
--- a/example3.h	Sun Mar 13 23:28:21 2011 +0000
+++ b/example3.h	Sun Mar 13 23:54:06 2011 +0000
@@ -91,7 +91,13 @@
                 int val = (buffer[i] >> 4) & 0xF; 
                 pc.printf("Buffer index %d = 0x%x\n", i, val);
             }
-            pc.printf("Done.\n");            
+            pc.printf("Done.\n");
+            
+            // Schedule another grab.
+            if (dma.Setup( conf )) {        
+                dma.Enable( conf );
+                LPC_TIM1->TCR = 1;
+            }            
         }
     }       
 }
@@ -116,7 +122,7 @@
     
     // Clear DMA IRQ flags.
     if (dma.irqType() == MODDMA::TcIrq) dma.clearTcIrq();    
-    if (dma.irqType() == MODDMA::ErrIrq) dma.clearErrIrq();
+    if (dma.irqType() == MODDMA::ErrIrq) dma.clearErrIrq();    
 }
 
 // Configuration callback on Error