Discussion:
[fedora-arm] Raspberry Pi 3 B Gpio
c***@gmail.com
2017-04-02 19:19:39 UTC
Permalink
Hi,
I would like to ask, is it any possibilities to use the GPIO headers from a python program or from the userspace to control switches via the GPIO headers?
If not out of the box, but is there any possibilities, to write a device tree overlay?

Thanks,
sgfdhsg
_______________________________________________
arm mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to arm
Peter Robinson
2017-04-02 19:30:14 UTC
Permalink
Post by c***@gmail.com
Hi,
I would like to ask, is it any possibilities to use the GPIO headers from a python program or from the userspace to control switches via the GPIO headers?
If not out of the box, but is there any possibilities, to write a device tree overlay?
Yes, there's python3-libsoc which should support the RPi. There's some
tools in the kernel-tools for gpio, the lsgpio is one to see the
available ones. In terms of DT overlay, we have all the bits in Fedora
26 (u-boot, kernel, compiler) to support it but I've not had time to
test and document the process, I'd love help there for test and docs
or plan (hope) to get it done by F-26 GA.

Peter
_______________________________________________
arm mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to arm-***@l
Richard Ryniker
2017-04-10 12:44:33 UTC
Permalink
Post by Peter Robinson
Yes, there's python3-libsoc which should support the RPi.
libsoc uses the old, deprecated sysfs interface to access GPIO resources
from user space. I wrote a Python module to use the newer, file
descriptor ioctl interface. See:

http://ryniker.org/raspberrypi/Fedora/gpiofd.py

I welcome reports of problems, or suggestions for improvement.
_______________________________________________
arm mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to arm-***@lists.fedoraproject.
Peter Robinson
2017-04-10 12:46:39 UTC
Permalink
Post by Richard Ryniker
Post by Peter Robinson
Yes, there's python3-libsoc which should support the RPi.
libsoc uses the old, deprecated sysfs interface to access GPIO resources
from user space. I wrote a Python module to use the newer, file
http://ryniker.org/raspberrypi/Fedora/gpiofd.py
I welcome reports of problems, or suggestions for improvement.
I would sooner a issue/PR files upstream against libsoc instead of yet
another GPIO library.
_______________________________________________
arm mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to arm-leave@

Continue reading on narkive:
Loading...