RS232 control for TVOne products

Dependents:   SPK-DVIMXR

Revision:
4:3faabbbf0ecf
Parent:
3:03e7e7b7a870
Child:
5:4b0bf9a724a4
--- a/spk_tvone_mbed.cpp	Sun Sep 30 13:39:58 2012 +0000
+++ b/spk_tvone_mbed.cpp	Sat Oct 06 12:37:05 2012 +0000
@@ -50,7 +50,10 @@
   
   // TASK: discard anything waiting to be read
   while (serial->readable()) {
-    serial->getc();
+    if (debug) 
+        debug->printf("Warning: data waiting on TV One serial bus: %u\n", serial->getc());
+    else 
+        serial->getc();
   }
   
   // TASK: Create the bytes of command