PINE64
GPIO - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Hardware (https://forum.pine64.org/forumdisplay.php?fid=122)
+--- Thread: GPIO (/showthread.php?tid=13973)



GPIO - jack1 - 05-23-2021

Why there is no documentation of the soc gpio ? And how to play with it. I know that one can do huge damages playing with it, but still there should be!


RE: GPIO - vortex - 05-24-2021

I am going to guess that it is being done the standard way GPIO is being done on Linux these days, which is with the libgpiod interface.

Kernel REAME on the interface: https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/tree/README

Kernel documentation on the interface: https://www.kernel.org/doc/html/latest/driver-api/gpio/index.html

libgpiod is straightforward to interface from C or C++. There are bindings for a lot of languages to make it easier to use. The gpiod tools even let information about the GPIO lines be gotten and the GPIO lines be set from the command line. Note that the raspberry pi has moved over to libgpiod, so one can find some documentation in that community and the raspberry pi also provides a test board if you want to test things on a board you can't damage with it before you do it on your pinephone where you might.


RE: GPIO - jack1 - 05-25-2021

I want know to where the gpio pins are connected to, and what are the free ones.
And are there 2 gpio ?