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
I am moving from using sysfs to libgpiod, and so far it works pretty nicely.
But, one thing I cannot seem to do, is to read the current state of a gpio pin if it is in output-direction and set in another context.
For example: Other program sets pin to output, and to value 1.
In my program, I just want to see what value the pin is at, WITHOUT changing the direction to input (since this would change the behaivour of the pin).
In sysfs, this was easily done by just polling the value (and as long as you did not write to anything, you did not change anything.). But if I try to do this with libgpio, it returns an error if I don’t first change direction to input.
After some quick correspondance with Bartosz it seems this is currently not possible, but future plans are there for a single daemon that can be interfaced with.
Still, if it can be fixed in the library alone, it would avoid more userspace applications that are required (and have something as lightweight as sysfs (where you basically only need the kernel and no libraries).
Keeping this issue open here for other ppl to track as well:)
The text was updated successfully, but these errors were encountered:
I am moving from using sysfs to libgpiod, and so far it works pretty nicely.
But, one thing I cannot seem to do, is to read the current state of a gpio pin if it is in output-direction and set in another context.
For example: Other program sets pin to output, and to value 1.
In my program, I just want to see what value the pin is at, WITHOUT changing the direction to input (since this would change the behaivour of the pin).
In sysfs, this was easily done by just polling the value (and as long as you did not write to anything, you did not change anything.). But if I try to do this with libgpio, it returns an error if I don’t first change direction to input.
After some quick correspondance with Bartosz it seems this is currently not possible, but future plans are there for a single daemon that can be interfaced with.
Still, if it can be fixed in the library alone, it would avoid more userspace applications that are required (and have something as lightweight as sysfs (where you basically only need the kernel and no libraries).
Keeping this issue open here for other ppl to track as well:)
The text was updated successfully, but these errors were encountered: