Repository navigation
kakip: build the robot-eye demo against libgpiod 1.x or 2.x - #10
Merged
Merged
Conversation
gpiod_compat.h gives the demos one open/request/set/get/release API that builds unchanged against libgpiod 1.x or 2.x. Compiles against gpiod.h 1.0 to 2.3.1 (ten releases) without warnings. Run on Kakip with libgpiod 2.2.1; the 1.x path is compile-tested only.
Ubuntu 26.04 ships libgpiod 2.x, which is not source compatible with the 1.x API this demo called directly. Use common/gpiod_compat.h, which builds against either.
Open the RZ/V2H pinctrl by its label instead of gpiochip0; the number depends on which GPIO controllers probe first.
On the Kakip 6.1 kernel the 40-pin header is SPI bus 1, so default to /dev/spidev1.0 and take the device path as the first argument: sudo ./robot-eye # /dev/spidev1.0 sudo ./robot-eye /dev/spidev1.1 # second chip select
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
request line as output/input; set, get, release; close) with an
implementation per libgpiod major version, picked from gpiod.h at
compile time
libgpiod 1.x API directly
label (10410000.pinctrl) instead of gpiochip0
the spidev path as the first argument
Tested on Kakip, Ubuntu 26.04 (libgpiod 2.2.1): e-paper demo on CE0 and
CE1, 10 re-inits + 300 s run. Compiles against gpiod.h 1.0 to 2.3.1.