annotate pcmon/pcmon.py @ 0:c34b37680055 default tip

Inital commit of random SuperIO code.
author Daniel O'Connor <darius@dons.net.au>
date Thu, 20 Oct 2011 16:48:24 +1030
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
c34b37680055 Inital commit of random SuperIO code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
1 #!/usr/bin/env python
c34b37680055 Inital commit of random SuperIO code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
2
c34b37680055 Inital commit of random SuperIO code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
3 import subprocess
c34b37680055 Inital commit of random SuperIO code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
4
c34b37680055 Inital commit of random SuperIO code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
5 baseadr = 0x2e
c34b37680055 Inital commit of random SuperIO code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
6 type = 'i'
c34b37680055 Inital commit of random SuperIO code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
7
c34b37680055 Inital commit of random SuperIO code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
8 class pcmon(object):
c34b37680055 Inital commit of random SuperIO code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
9 def __init__(self):
c34b37680055 Inital commit of random SuperIO code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
10 p = subprocess.Popen(["./pcmonhelper", "-b", "0x%x" % (baseadr), "-t", type], stdout=subprocess.PIPE, stdin=subprocess.PIPE)
c34b37680055 Inital commit of random SuperIO code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
11
c34b37680055 Inital commit of random SuperIO code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
12 if __name__ == "__main__":
c34b37680055 Inital commit of random SuperIO code.
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
13 pass