public inbox for linux-gpio@vger.kernel.org
 help / color / mirror / Atom feed
* Help regarding IO configuration of multiple lines
@ 2026-03-06 11:09 joussemetmathis
  2026-03-07  2:13 ` Kent Gibson
  0 siblings, 1 reply; 2+ messages in thread
From: joussemetmathis @ 2026-03-06 11:09 UTC (permalink / raw)
  To: linux-gpio


[-- Attachment #1.1: Type: text/plain, Size: 792 bytes --]

Hello,

I am trying to learn how to use libgpiod on a Pi 5. I created for that
goal a simple circuit with a push button and 2 LEDs, one of which turns
on on a button press.
Since I want to keep my program as modular as possible, I created a
pinconfig function that configures the pins according to the parameters
passed in main.
However, when trying to pass an enum array of gpiod_line_direction to
the function, the code no longer works and the LEDs no longer turn on.
I suspect it is due to the way the array is handled, but since this use
case isn't shown in the examples and that online ressources seems to
only talk about v1 of gpiod, I'm a bit stuck.
Could someone help me? You'll find my code attached in a zip in this
email.

Thanks in advance 

Mathis Joussemet 

[-- Attachment #1.2: Type: text/html, Size: 1126 bytes --]

[-- Attachment #2: pinconfig.zip --]
[-- Type: application/zip, Size: 7218 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-07  2:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-06 11:09 Help regarding IO configuration of multiple lines joussemetmathis
2026-03-07  2:13 ` Kent Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox