You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just tested the PiFace Digital 2 on just released Debian Buster, and it works great (some messing with device tree required to bring up SPI interface devices), official Debian on arm64 feels much snappier and riding upstream is "right thing to do" ™️...
However, as documented on https://wiki.debian.org/RaspberryPi3, GPIOs have to be accessed by offset of 458 in mind, which will cause bring_gpio_interrupt_into_userspace to fail:
>>> import pifacedigitalio
>>> pfd = pifacedigitalio.PiFaceDigital()
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/pifacecommon/interrupts.py", line 385, in bring_gpio_interrupt_into_userspace
with open(GPIO_INTERRUPT_DEVICE_VALUE):
FileNotFoundError: [Errno 2] No such file or directory: '/sys/class/gpio/gpio25/value'
During handling of the above exception, another exception occurred:
OSError: [Errno 22] Invalid argument
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/dist-packages/pifacedigitalio/core.py", line 82, in __init__
self.init_board()
File "/usr/local/lib/python3.7/dist-packages/pifacedigitalio/core.py", line 114, in init_board
self.enable_interrupts()
File "/usr/local/lib/python3.7/dist-packages/pifacedigitalio/core.py", line 86, in enable_interrupts
self.gpio_interrupts_enable()
File "/usr/local/lib/python3.7/dist-packages/pifacecommon/interrupts.py", line 232, in gpio_interrupts_enable
bring_gpio_interrupt_into_userspace()
File "/usr/local/lib/python3.7/dist-packages/pifacecommon/interrupts.py", line 390, in bring_gpio_interrupt_into_userspace
export_file.write(str(GPIO_INTERRUPT_PIN))
OSError: [Errno 22] Invalid argument
If I change GPIO_INTERRUPT_PIN = 25 to GPIO_INTERRUPT_PIN = 25 + 458 everything just works ™️
I'd like to submit a small patch that does the proper GPIO offset detection by checking /sys/bus/gpio/devices...
The text was updated successfully, but these errors were encountered:
sibradzic
added a commit
to sibradzic/pifacecommon
that referenced
this issue
Jul 8, 2019
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+
Just tested the PiFace Digital 2 on just released Debian Buster, and it works great (some messing with device tree required to bring up SPI interface devices), official Debian on arm64 feels much snappier and riding upstream is "right thing to do" ™️...
However, as documented on https://wiki.debian.org/RaspberryPi3, GPIOs have to be accessed by offset of 458 in mind, which will cause
bring_gpio_interrupt_into_userspace
to fail:If I change
GPIO_INTERRUPT_PIN = 25
toGPIO_INTERRUPT_PIN = 25 + 458
everything just works ™️I'd like to submit a small patch that does the proper GPIO offset detection by checking
/sys/bus/gpio/devices
...The text was updated successfully, but these errors were encountered: