RS232 control for TVOne products
Revision 7:c73d4c68a13b, committed 2012-10-07
- Comitter:
- tobyspark
- Date:
- Sun Oct 07 23:35:41 2012 +0000
- Parent:
- 3:03e7e7b7a870
- Child:
- 8:903062cdeba7
- Commit message:
- Using MODSERIAL. In tests earlier, this seemed to fix. Now applying to clean commit (#3), no difference in behaviour: hang on rx while tx. FFSx1000.
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MODSERIAL.lib Sun Oct 07 23:35:41 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/AjK/code/MODSERIAL/#5c45c21f36b7
--- 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);
--- a/spk_tvone_mbed.h Sun Sep 30 13:39:58 2012 +0000 +++ b/spk_tvone_mbed.h Sun Oct 07 23:35:41 2012 +0000 @@ -25,6 +25,7 @@ #include "spk_tvone.h" #include "mbed.h" +#include "MODSERIAL.h" class SPKTVOne { @@ -41,7 +42,7 @@ void set1600x600(int resStoreNumber); void set2048x768(int resStoreNumber); - Serial *serial; + MODSERIAL *serial; Serial *debug; DigitalOut *writeDO;