RS232 control for TVOne products

Dependents:   SPK-DVIMXR

Files at this revision

API Documentation at this revision

Comitter:
tobyspark
Date:
Sun Sep 30 13:39:58 2012 +0000
Parent:
2:af9e9ab63b23
Child:
4:3faabbbf0ecf
Child:
7:c73d4c68a13b
Commit message:
HDCP function now sets on or off

Changed in this revision

spk_tvone_mbed.cpp Show annotated file Show diff for this revision Revisions of this file
spk_tvone_mbed.h Show annotated file Show diff for this revision Revisions of this file
--- a/spk_tvone_mbed.cpp	Fri Aug 03 07:44:17 2012 +0000
+++ b/spk_tvone_mbed.cpp	Sun Sep 30 13:39:58 2012 +0000
@@ -145,18 +145,18 @@
   set2048x768(kTV1ResolutionDualHeadXGAp60);
 }
 
-bool SPKTVOne::setHDCPOff() 
+bool SPKTVOne::setHDCPOn(bool state) 
 {
   bool ok = false;
 
   // Turn HDCP off on the output
-  ok =       command(0, kTV1WindowIDA, kTV1FunctionAdjustOutputsHDCPRequired, 0);
-  ok = ok && command(0, kTV1WindowIDA, kTV1FunctionAdjustOutputsHDCPStatus, 0);
+  ok =       command(0, kTV1WindowIDA, kTV1FunctionAdjustOutputsHDCPRequired, state);
+  ok = ok && command(0, kTV1WindowIDA, kTV1FunctionAdjustOutputsHDCPStatus, state);
   // Likewise on inputs A and B
-  ok = ok && command(0, kTV1WindowIDA, kTV1FunctionAdjustSourceHDCPAdvertize, 0);
-  ok = ok && command(0, kTV1WindowIDB, kTV1FunctionAdjustSourceHDCPAdvertize, 0);
-  ok = ok && command(0, kTV1WindowIDA, kTV1FunctionAdjustSourceHDCPStatus, 0);
-  ok = ok && command(0, kTV1WindowIDB, kTV1FunctionAdjustSourceHDCPStatus, 0);
+  ok = ok && command(0, kTV1WindowIDA, kTV1FunctionAdjustSourceHDCPAdvertize, state);
+  ok = ok && command(0, kTV1WindowIDB, kTV1FunctionAdjustSourceHDCPAdvertize, state);
+  ok = ok && command(0, kTV1WindowIDA, kTV1FunctionAdjustSourceHDCPStatus, state);
+  ok = ok && command(0, kTV1WindowIDB, kTV1FunctionAdjustSourceHDCPStatus, state);
   
   return ok;
 }
--- a/spk_tvone_mbed.h	Fri Aug 03 07:44:17 2012 +0000
+++ b/spk_tvone_mbed.h	Sun Sep 30 13:39:58 2012 +0000
@@ -34,7 +34,7 @@
     bool command(uint8_t channel, uint8_t window, int32_t func, int32_t payload);
     
     void setCustomResolutions();
-    bool setHDCPOff();
+    bool setHDCPOn(bool state);
      
   private:
     void set1920x480(int resStoreNumber);