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:
@ -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
|
||||
|
Reference in New Issue
Block a user