aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2009-03-05 00:11:55 +0100
committerghost <andreas.monzner@multimedia-labs.de>2009-03-05 00:11:55 +0100
commit8ca7a05ca454eafdeb43cbbc68384af56dd9e153 (patch)
tree181a31e76604dd8bc33974de0d2cbf639379b36d
parent95fe5642cb7b4d4ceb06a147356ab5c637764739 (diff)
downloadenigma2-8ca7a05ca454eafdeb43cbbc68384af56dd9e153.tar.gz
enigma2-8ca7a05ca454eafdeb43cbbc68384af56dd9e153.zip
lib/python/Tools/DreamboxHardware.py: add function to set RTC Time
-rw-r--r--lib/python/Tools/DreamboxHardware.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/python/Tools/DreamboxHardware.py b/lib/python/Tools/DreamboxHardware.py
index 5461f7b0..9e81bb47 100644
--- a/lib/python/Tools/DreamboxHardware.py
+++ b/lib/python/Tools/DreamboxHardware.py
@@ -23,6 +23,16 @@ def setFPWakeuptime(wutime):
except IOError:
print "setFPWakeupTime failed!"
+def setRTCtime(wutime):
+ try:
+ open("/proc/stb/fp/rtc", "w").write(str(wutime))
+ except IOError:
+ try:
+ fp = open("/dev/dbox/fp0")
+ ioctl(fp.fileno(), 0x101, pack('L', wutime)) # set wake up
+ except IOError:
+ print "setRTCtime failed!"
+
def getFPWakeuptime():
ret = 0
try: