Serial UART snooper. Connect RX and TX of the UUT to 2 x RX pins on mbed to inspect the traffic in both directions

Dependencies:   MODSERIAL Terminal mbed

Files at this revision

API Documentation at this revision

Comitter:
cbayley
Date:
Mon Aug 27 05:02:12 2012 +0000
Parent:
3:b8bad606d4f2
Child:
5:76d46f565551
Commit message:
working

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu Aug 02 21:23:04 2012 +0000
+++ b/main.cpp	Mon Aug 27 05:02:12 2012 +0000
@@ -9,8 +9,8 @@
 
  
 MODSERIAL   pc(USBTX,NC,4096);
-Serial   wt(NC,p10);
-Serial   r8(NC,p14);
+Serial      wt(NC,p10);
+Serial      r8(NC,p14);
 
 DigitalOut  ledCTS(LED1);
 DigitalOut  ledRTS(LED2);
@@ -71,8 +71,8 @@
 /* flush Stripes after no activity */
 void flush( void )
 {
-        Qpush(&outQ, (void*)pStripe);
-        pStripe = newStripe();
+    Qpush(&outQ, (void*)pStripe);
+    pStripe = newStripe();
 }
 
 // This function is called when a character goes into the RX buffer.
@@ -91,7 +91,7 @@
         Qpush(&outQ, (void*)pStripe);
         pStripe = newStripe();
     }
-    icto.attach(flush,0.5);
+    //icto.attach(flush,0.5);
 }
   
 int main()
@@ -102,8 +102,9 @@
     wt.baud(BAUD);
     r8.baud(BAUD);
            
-    nCTS.mode(PullUp);
-    nRTS.mode(PullUp);
+    //nCTS.mode(PullUp);
+    //nRTS.mode(PullUp);
+    
     
     wt.attach(&rxCallbackWT, Serial::RxIrq);
     r8.attach(&rxCallbackR8, Serial::RxIrq);