Has anyone worked out how to read/write to the GPIO pins on a Pi 5, using version 2 of libgpiod, in C?
Not only has the hardware changed from Pi4 to Pi5, but the API for libgpiod has changed from V1 to V2. All of the 'examples' I've found so far refer to functions like gpiod_chip_get_line, which no longer seem to exist in V2. I've found what I think is the right documentation for libgpiod V2, but it's just a function list, with no worked examples.
It's all very confusing, for something as simple as reading and writing a GPIO line!
I'd appreciate any pointers.
Not only has the hardware changed from Pi4 to Pi5, but the API for libgpiod has changed from V1 to V2. All of the 'examples' I've found so far refer to functions like gpiod_chip_get_line, which no longer seem to exist in V2. I've found what I think is the right documentation for libgpiod V2, but it's just a function list, with no worked examples.
It's all very confusing, for something as simple as reading and writing a GPIO line!
I'd appreciate any pointers.
Statistics: Posted by edfield — Thu Nov 27, 2025 8:46 am — Replies 0 — Views 7