Repository navigation
examples: add GPIO drive strength config parser and htool gpio sweep … - #309
Open
qwerty-10434 wants to merge 1 commit into
Open
qwerty-10434 wants to merge 1 commit into
qwerty-10434 wants to merge 1 commit into
Conversation
…command
Add a zero-dependency configuration file parser and an interactive
'htool gpio sweep' subcommand in examples/htool_gpio.{c,h} to step
through GPIO drive strengths (0..3) across SPI interfaces (spidev,
spihost0, spihost1) for signal integrity (SI) validation.
- Parse per-interface 6-signal pad mappings (<spi>.clk, .cs, .d0, .d1,
.d2, .d3) using DIO0..DIO15 and MIO0..MIO46 pad names (matching
'htool gpio set_drive_strength --dio/--mio') and drive strength
lists (<spi>.drive_strengths).
- Require all 6 SPI signals to be explicitly mapped for each configured
interface, and reject unrecognised keys, invalid values, or lines
exceeding the maximum line length.
- Read back each pad immediately after setting its drive strength and
warn on stderr if the readback value does not match.
- Save the initial drive strengths of all 6 pads before sweeping and
restore them on every exit path (normal completion, 'q', EOF, a
failed set, or SIGINT/SIGTERM/SIGHUP).
- Support '--dry_run' ('-n') to step through combinations without
connecting to a RoT device or sending host commands.
- Add unit tests in examples/htool_gpio_test.cc and a reference
configuration file in examples/gpio_sweep.conf.example.
qwerty-10434
marked this pull request as ready for review
October 12, 2026 22:44
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.
…command
Add a zero-dependency configuration file parser and an interactive 'htool gpio sweep' subcommand in examples/htool_gpio.{c,h} to step through GPIO drive strengths (0..3) across SPI interfaces (spidev, spihost0, spihost1) for signal integrity (SI) validation.