public inbox for linux-gpio@vger.kernel.org
 help / color / mirror / Atom feed
From: joussemetmathis@gmail.com
To: linux-gpio@vger.kernel.org
Subject: Help regarding IO configuration of multiple lines
Date: Fri, 06 Mar 2026 12:09:50 +0100	[thread overview]
Message-ID: <cf52e066ba190f52bbfbfcfdcbdf7addc8998616.camel@gmail.com> (raw)


[-- 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 --]

             reply	other threads:[~2026-03-06 11:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-06 11:09 joussemetmathis [this message]
2026-03-07  2:13 ` Help regarding IO configuration of multiple lines Kent Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cf52e066ba190f52bbfbfcfdcbdf7addc8998616.camel@gmail.com \
    --to=joussemetmathis@gmail.com \
    --cc=linux-gpio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox