RS232 control for TVOne products

Dependents:   SPK-DVIMXR

Revision:
7:c73d4c68a13b
Parent:
3:03e7e7b7a870
Child:
8:903062cdeba7
--- a/spk_tvone_mbed.cpp	Sun Sep 30 13:39:58 2012 +0000
+++ b/spk_tvone_mbed.cpp	Sun Oct 07 23:35:41 2012 +0000
@@ -27,7 +27,10 @@
 {
     // Create Serial connection for TVOne unit comms
     // Creating our own as this is exclusively for TVOne comms
-    serial = new Serial(txPin, rxPin);
+    // Update - The stock mbed Serial object will hang on rx while tx, which can happen if the TV-One unit's state unexpectedly changes as this is repeated to RS232.
+    // No fixes will fix here, tried every variant of IRQ disable, sprintf and allsuch.
+    // However MODSERIAL doesn't hang, and as a bonus will allow much easier handling of these unexpected 'commands' sent *to* our controller.
+    serial = new MODSERIAL(txPin, rxPin);
     serial->baud(57600);
     
     if (signWritePin != NC) writeDO = new DigitalOut(signWritePin);