aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Tools/DreamboxHardware.py
blob: 5eaaeecaba7fbd8eef7cc0d0b95e4e2de206e970 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
def getFPVersion():
	from fcntl import ioctl
	try:
		fp = open("/dev/dbox/fp0")
		return ioctl(fp.fileno(),0)
	except IOError:
		return None

def setFPWakeuptime(wutime):
	from fcntl import ioctl
	from struct import pack

	try:
		fp = open("/dev/dbox/fp0")
		ioctl(fp.fileno(), 6, pack('L', wutime)) # set wake up
	except IOError:
		pass