libgpiod-dev/gpiod.h

Hello,

I am trying to use LibGPIOd and gpiod.h in a file. Well, it works as expected, i.e. even better than before today when I tried w/ a newer image.

Anyway…

  1. Fixes
    a. libgpiod does not cause the pin to stay on/1/high when the file ends and has finished running.
  2. Errors
    a. libgpiod does stay in charge of the file which causes other uses to the gpio unavailable.
    b. For instance, not using gpiod.h in a file descriptor like in normal sysfs entries as fd cannot be used once a file w/ gpiod.h has been used.

Seth

P.S. Is this something that has changed or is it just me? The concern I am having is that the lack of control once my program runs and then fails causes a gpio to halt or stay in a low state until reboot.

Hello Again,

So, for future reference here…

  1. libgpiod once used does cause a fault that is not mentioned in output on the terminal once run.
  2. This is true if you are using a sysfs .dts file.
  3. For future users, try to figure out how to write a libgpiod .dts file!

Seth

UPDATE

Libgpiod-dev and its use no longer floats the pin w/ the IoT image that is updated on this forum.

i.e. cat /etc/dogtag: BeagleBoard.org Debian Bullseye IoT Image 2022-11-01

Enjoy!