MODDMA GPDMA Controller fork EXPERIMENTAL -- do not use

Fork of MODDMA by Andy K

Revision:
1:9700b9455cbf
Parent:
0:c409efd8df78
Child:
2:203d22a890cd
--- a/MODDMA.h	Tue Nov 23 14:50:39 2010 +0000
+++ b/MODDMA.h	Tue Nov 23 14:53:25 2010 +0000
@@ -38,57 +38,15 @@
 namespace AjK {
 
 /**
+ * @brief The MODDMA configuration system
  * @author Andy Kirkham
- * @see http://mbed.org/cookbook/MODDMA
- * @see example1.cpp
+ * @see http://mbed.org/cookbook/MODDMA_Config
+ * @see MODDMA
  * @see API 
  *
- * <b>MODDMA</b> defines a GPDMA controller and multiple DMA configurations that allow for DMA
+ * <b>MODDMA_Config</b> defines a configuration that can be passed to the MODDMA controller
+ * instance to perform a GPDMA data transfer.
  * transfers from memory to memory, memory to peripheral or peripheral to memory.
- *
- * At the heart of the library is the MODDMA class the defines a single instance controller that
- * manages all the GPDMA hardware registers and interrupts. The controller can accept multiple
- * configurations that define the transfer. Each configuration specifies the src and dest information
- * and other associated parts to maintain the transfer process.
- *
- * Standard example:
- * @code
- * #include "mbed.h"
- * #include "MODDMA.h"
- *
- * DigitalOut led1(LED1);
- * Serial pc(USBTX, USBRX); // tx, rx
- * MODDMA dma;
- *
- * int main() {
- *
- *     // Create a string buffer to send directly to a Uart/Serial
- *     char s[] = "***DMA*** ABCDEFGHIJKLMNOPQRSTUVWXYZ ***DMA***";
- *
- *     // Create a transfer configuarion
- *     MODDMA_Config *config = new MODDMA_Config;
- *
- *     // Provide a "minimal" setup for demo purposes.
- *     config
- *      ->channelNum    ( MODDMA::Channel_0 )   // The DMA channel to use.
- *      ->srcMemAddr    ( (uint32_t) &s )       // A pointer to the buffer to send.
- *      ->transferSize  ( sizeof(s) )           // The size of that buffer.
- *      ->transferType  ( MODDMA::m2p )         // Buffer is memory, dest is peripheral
- *      ->dstConn       ( MODDMA::UART0_Tx )    // Specifically, peripheral is Uart0 TX (USBTX, USBRX)
- *    ; // config end.
- *
- *    // Pass the configuration to the MODDMA controller.
- *    dma.Setup( config );
- *
- *    // Enable the channel and begin transfer.
- *    dma.Enable( config->channelNum() );
- *
- *    while(1) {
- *         led1 = !led1;
- *         wait(0.25);
- *     }
- * }
- * @endcode
  */
 class  MODDMA_Config {
 protected:
@@ -166,15 +124,60 @@
 } GPDMA_LLI_t;
 */
 
-/**
+
+ /**
+ * @brief MODDMA GPDMA Controller
  * @author Andy Kirkham
- * @see http://mbed.org/cookbook/MODDMA_Config
- * @see MODDMA
+ * @see http://mbed.org/cookbook/MODDMA
+ * @see example1.cpp
  * @see API 
  *
- * <b>MODDMA_Config</b> defines a configuration that can be passed to the MODDMA controller
- * instance to perform a GPDMA data transfer.
+ * <b>MODDMA</b> defines a GPDMA controller and multiple DMA configurations that allow for DMA
  * transfers from memory to memory, memory to peripheral or peripheral to memory.
+ *
+ * At the heart of the library is the MODDMA class the defines a single instance controller that
+ * manages all the GPDMA hardware registers and interrupts. The controller can accept multiple
+ * configurations that define the transfer. Each configuration specifies the src and dest information
+ * and other associated parts to maintain the transfer process.
+ *
+ * Standard example:
+ * @code
+ * #include "mbed.h"
+ * #include "MODDMA.h"
+ *
+ * DigitalOut led1(LED1);
+ * Serial pc(USBTX, USBRX); // tx, rx
+ * MODDMA dma;
+ *
+ * int main() {
+ *
+ *     // Create a string buffer to send directly to a Uart/Serial
+ *     char s[] = "***DMA*** ABCDEFGHIJKLMNOPQRSTUVWXYZ ***DMA***";
+ *
+ *     // Create a transfer configuarion
+ *     MODDMA_Config *config = new MODDMA_Config;
+ *
+ *     // Provide a "minimal" setup for demo purposes.
+ *     config
+ *      ->channelNum    ( MODDMA::Channel_0 )   // The DMA channel to use.
+ *      ->srcMemAddr    ( (uint32_t) &s )       // A pointer to the buffer to send.
+ *      ->transferSize  ( sizeof(s) )           // The size of that buffer.
+ *      ->transferType  ( MODDMA::m2p )         // Buffer is memory, dest is peripheral
+ *      ->dstConn       ( MODDMA::UART0_Tx )    // Specifically, peripheral is Uart0 TX (USBTX, USBRX)
+ *    ; // config end.
+ *
+ *    // Pass the configuration to the MODDMA controller.
+ *    dma.Setup( config );
+ *
+ *    // Enable the channel and begin transfer.
+ *    dma.Enable( config->channelNum() );
+ *
+ *    while(1) {
+ *         led1 = !led1;
+ *         wait(0.25);
+ *     }
+ * }
+ * @endcode
  */
 class MODDMA
 {