Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bring_gpio_interrupt_into_userspace on Debian, piface#29
This introduces GPIO offset detection by checking the dir name starting with gpiochip[0-9]* found in /sys/bus/gpio/devices/gpiochip0/../gpio/. Thec change is tested and confirmed working on Debian Buster 10 and Raspbian 9.9, on boht Raspberry Pi 3B and 3B+
- Loading branch information
b6418e5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using this code in python2.7 I had the following error:
File "/usr/lib/python2.7/dist-packages/pifacecommon/interrupts.py", line 24, in
if gpio_offset_str.isnumeric():
AttributeError: 'str' object has no attribute 'isnumeric'
The solution is to change the line
if gpio_offset_str.isnumeric():
with
if gpio_offset_str.isdigit():