Skip to content

Instantly share code, notes, and snippets.

@alexanderhiam
Created February 2, 2015 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexanderhiam/4310934a026b79fc8c65 to your computer and use it in GitHub Desktop.
Save alexanderhiam/4310934a026b79fc8c65 to your computer and use it in GitHub Desktop.
PRU driver idea
class PRUDriverWrapper(object):
firmware = 'pru_driver.bin'
def __init__(self, pin1, pin2):
self.pru_driver = PRU.load(self.firmware, pin1, pin2)
def doit(self, value):
self.pru_driver.callFunction('doit', value)
def read(self):
return self.pru_driver.getValue('result')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment