Add GPIO hardware test service (GPIO1_D5 button drives two outputs high) - #3
Open
fanxiaobinggit wants to merge 1 commit into
Open
Add GPIO hardware test service (GPIO1_D5 button drives two outputs high)#3fanxiaobinggit wants to merge 1 commit into
fanxiaobinggit wants to merge 1 commit into
Conversation
Add robopi-hw-test, which watches the GPIO1_D5 button (gpiochip1/29) and drives GPIO1_B0 (gpiochip1/8) and GPIO0_C2 (gpiochip0/18) high on each press. Outputs latch high by default; --toggle flips them per press. - src/hw_test.c: new program (mirrors sig_led_key.c gpioevent polling). - etc/systemd/system/robopi-hw-test.service: new unit, WantedBy=multi-user.target. - Makefile: build, install the binary, /usr/bin symlink, and unit. - debian/postinst: enable and start the service on install. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Adds a boot-enabled hardware test service for verifying GPIO routing on the RoboPi2 board.
When the GPIO1_D5 button (GPIO61) is pressed, the service drives two output lines high:
/dev/gpiochip1offset 8/dev/gpiochip0offset 18Changes
src/hw_test.c— newrobopi-hw-testprogram. Polls the button rising edge (30 ms debounce) via thelinux/gpio.hgpioevent API, then sets both outputs high. Outputs latch high by default; a--toggleflag flips them on each press. Modeled on the existingsig_led_key.c.etc/systemd/system/robopi-hw-test.service— new unit,WantedBy=multi-user.targetfor boot auto-start.Makefile— builds the binary, installs it under/opt/roboparty/binwith a/usr/binsymlink, and installs the unit.debian/postinst—systemctl enable+startthe service on install.Notes
main(independent of Fix DKMS build on Rockchip headers and consolidate conffile ownership #2).🤖 Generated with Claude Code