1
0
mirror of https://github.com/xtacocorex/CHIP_IO synced 2025-07-20 12:53:22 +00:00

Adding Python interface to get the base XIO numbers, fixes for gptest.py on the 4.4 kernel CHIPs

This commit is contained in:
Robert Wolterman
2016-07-03 11:49:17 -05:00
parent 92888aaca4
commit 9ee83c0b38
4 changed files with 19 additions and 3 deletions

View File

@ -99,7 +99,9 @@ print "SETTING UP EDGE DETECTION ON XIO-P0"
GPIO.add_event_detect("XIO-P0", GPIO.FALLING, myfuncallback)
print "VERIFYING EDGE DETECT"
f = open("/sys/class/gpio/gpio408/edge", "r")
base = GPIO.get_gpio_base()
gfile = "/sys/class/gpio/gpio%d/edge" % base
f = open(gfile, "r")
edge = f.read()
f.close()
print "EDGE: %s" % edge