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

Revision:
5:c39b22fa0c60
Parent:
4:67f327b9278e
Child:
6:40d38be4bb59
--- a/example1.cpp	Tue Nov 23 15:33:30 2010 +0000
+++ b/example1.cpp	Tue Nov 23 16:04:32 2010 +0000
@@ -22,8 +22,8 @@
     
     pc.baud(PC_BAUD);
     
-    dma.isrIntTCStat.attach(&dmaTCCallback);
-    dma.isrIntErrStat.attach(&dmaERRCallback);
+    dma.attach_tc( &dmaTCCallback );
+    dma.attach_err( &dmaERRCallback );
     
     MODDMA_Config *config = new MODDMA_Config;
     config
@@ -36,12 +36,10 @@
      ->srcConn       ( 0 )
      ->dstConn       ( MODDMA::UART0_Tx )
      ->dmaLLI        ( 0 )
+     ->attach_tc     ( &TC0_callback )
+     ->attach_err    ( &ERR0_callback )
     ; // config end
     
-    // Attach configuration callbacks if required.
-    config->isrIntTCStat->attach(&TC0_callback);
-    config->isrIntErrStat->attach(&ERR0_callback);
-    
     // Setup the configuration.
     dma.Setup(config);