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:
16:cb10aec6feb1
Parent:
12:1dfee7208043
--- a/MODDMA.h	Mon Mar 14 00:14:24 2011 +0000
+++ b/MODDMA.h	Mon Mar 14 13:51:38 2011 +0000
@@ -312,7 +312,7 @@
         , p2m = 2UL     /*!< Peripheral to memory - DMA control */
         , p2p = 3UL     /*!< Src peripheral to dest peripheral - DMA control */         
         , g2m = 4UL     /*!< Psuedo special case for reading "peripheral GPIO" that's memory mapped. */
-        , m2g = 5UL     /*!< Psuedo Special case for writing "peripheral GPIO" that's memory mapped. */
+        , m2g = 5UL     /*!< Psuedo Special case for writing "peripheral GPIO" that's memory mapped. */        
     };   
 
     //! Burst size in Source and Destination definitions */
@@ -376,6 +376,20 @@
     void init(bool isConstructorCalling, int Channels = 0xFF, int Tc = 0xFF, int Err = 0xFF);
     
     /**
+     * Used to setup and enable the DMA controller.
+     *
+     * @see Setup
+     * @see Enable
+     * @ingroup API
+     * @param c A pointer to an instance of MODDMA_Config to setup.
+     */
+    uint32_t Prepare(MODDMA_Config *c) {
+        uint32_t u = Setup(c);
+        if (u) Enable(c);
+        return u;
+    }
+    
+    /**
      * Used to setup the DMA controller to prepare for a data transfer.
      *
      * @ingroup API