RS232 control for TVOne products

Dependents:   SPK-DVIMXR

Revision:
0:533cfae24a1b
Child:
1:349d6da461df
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spk_tvone_mbed.h	Sun Apr 15 20:58:35 2012 +0000
@@ -0,0 +1,36 @@
+// *spark audio-visual
+// RS232 Control for TV-One products
+// Good for 1T-C2-750, others will need some extra work
+// Copyright *spark audio-visual 2009-2011
+
+#ifndef SPKTVOne_mBed_h
+#define SPKTVOne_mBed_h
+
+#include "spk_tvone.h"
+#include "mbed.h"
+
+class SPKTVOne
+{
+  public:
+    SPKTVOne(PinName txPin, PinName rxPin, PinName signWritePin = NC, PinName signErrorPin = NC, Serial *debugSerial = NULL);
+    
+    bool command(uint8_t channel, uint8_t window, int32_t func, int32_t payload);
+    
+    void setCustomResolutions();
+    bool setHDCPOff();
+     
+  private:
+    // Tx and Wait LED pins to go here
+    void set1920x480(int resStoreNumber);
+    void set1600x600(int resStoreNumber);
+    
+    Serial *serial;
+    Serial *debug; 
+    
+    DigitalOut *writeDO;
+    DigitalOut *errorDO;
+    Timeout signErrorTimeout;
+    void signErrorOff();
+};
+
+#endif