test

Dependencies:   SimpleDMA mbed-rtos mbed

Fork of spiDMAtest by Shreesha S

Revision:
3:972fa06ef0aa
Parent:
2:16545dbc88ae
--- a/main.cpp	Thu Jul 16 05:40:25 2015 +0000
+++ b/main.cpp	Mon Dec 21 08:57:48 2015 +0000
@@ -4,9 +4,9 @@
 
 #define PAYLOAD_LENGTH 1024
 
-dmaSPISlave spi(PTA16, PTA17, PTA15, PTA14);
+dmaSPISlave spi(PTD6, PTD7, PTD5,PTD4 ); 
 RawSerial pc(USBTX, USBRX);
-DigitalOut ledg(LED_GREEN);
+//DigitalOut ledg(LED_GREEN);
 
 bool flag = false;
 
@@ -31,14 +31,14 @@
     while(true){
         if(flag){
             flag = false;
-            ledg = !ledg;
+            //ledg = !ledg;
+            
 
-//            for(int i = 0 ; i < PAYLOAD_LENGTH ; ++i){
-//                pc.printf("%02x ", buffer[i]);
-//            }
-//            pc.printf("\r\n");
+            for(int i = 0 ; i < PAYLOAD_LENGTH ; ++i){
+                pc.printf("data %d   %d  \r\n",i, buffer[i]);            }
+          pc.printf("\r\n");
 
-//            start dma again after handling the data
+            //start dma again after handling the data
             spi.bulkRead_start();
         }
     }