test

Dependencies:   SimpleDMA mbed-rtos mbed

Fork of spiDMAtest by Shreesha S

Files at this revision

API Documentation at this revision

Comitter:
Piasiv1206
Date:
Mon Dec 21 08:57:48 2015 +0000
Parent:
2:16545dbc88ae
Commit message:
gfkiuk

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 16545dbc88ae -r 972fa06ef0aa main.cpp
--- 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();
         }
     }