Skip to contentSkip to conversation

: non-exclusive use of input lines

libgpiod Hollerer Franz, Schrack Seconet AG, Entwicklung 2 participants 2 messages Jul 13, 2023 GPIO

lore
Share & tools
lore
#0 lore raw

I have several processes (one of them is a shell scripts, others are C/C++ programs) which need to read the same input line. Is it somehow possible to request input lines for non-exclusive use? If not, is this a feature which will be added sometime in the future?

Thanks

Franz Hollerer

#1 lore raw
Quoted 4 lines · Entwicklung

I have several processes (one of them is a shell scripts, others are C/C++ programs) which need to read the same input line. Is it somehow possible to request input lines for non-exclusive use?

No, it is not possible.

Quoted 2 lines

If not, is this a feature which will be added sometime in the future?

No, there are no plans for such a feature, AFAIAA.

The solution is to have a userspace process monitor the line and share the value with the other processes. How best to do that is up to you. A simple approach would be to write the value to a file. (which might be a useful mode to add to gpiomon??)

Bart is working on a daemon that may provided shared read access, but I'm just guessing.

Cheers,
Kent.