On Sun, Nov 25, 2018 at 3:45 AM Olivier Burelli <oliv...@burelli.fr> wrote: > For the moment, I manage to light via GPIOCTL, a LED on the pin 23 header P9. > > $ doas gpioctl gpio1 17 on > > my /etc/rc.securelevel: > > # Digital Output: > gpioctl gpio1 17 set out pinH9_23 > gpioctl gpio3 21 set out pinH9_25 > gpioctl gpio3 25 set out pinH9_27 > > Question : in this way (I am not an expert in programming): > > _ Should I create a tree (directory) to turn on my LED in C language ?
No -- See below > _ Should I instead use the physical addresses to turn on my LED in C language > ? Use ioctl(2) calls on the gpio device file. > _ Regarding analog inputs, are they recognized by the kernel as GPIO ? No, those pins are not wired to GPIO. They are there own thing. > _ Do you have some interesting link to documentations, to help me ? The gpio(4), gpioctl(8) man pages should suffice. If you have any further issues you can mail this list. Best, ians