Repository navigation
Add Waveshare GamePi13 support - #1070
Open
nomadbit21 wants to merge 2 commits into
Open
nomadbit21 wants to merge 2 commits into
nomadbit21 wants to merge 2 commits into
Conversation
Read BOARD pin 18 once before the backlight is driven. Low is 1.3" LCD HAT / high is GamePi13, which gets its own pin map. HardwareButtonsConstants now copies those pins instead of defining them again.
GamePi13 mounts the same ST7789 panel sideways. Use the detection flag from the button map and rotate only in that case.
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.
Waveshare GamePi13 support
Description
The GamePi13 uses the same ST7789 240x240 panel as the 1.3" LCD HAT, but the buttons are on different pins and the image is rotated 90°.
Solution
BOARD pin 18 is the HAT backlight, held low. On the GamePi13 that pin is unused and reads high with the internal pull-up.
That check runs once, before the backlight is driven, and selects the pin map. If the read fails, SeedSigner keeps the official HAT map.
HardwareButtonsConstantsnow takes its values fromHardwareButtons, so the 26-pin, 40-pin HAT, and GamePi13 maps cannot drift apart.Tested on a Pi Zero with a GamePi13: D-pad, A as confirm, X/Y/B, and the rotated display. The 1.3" LCD HAT path is unchanged when pin 18 reads low.
Images
This pull request is categorized as a:
Checklist
I ran
pytestlocallyI included screenshots of any new or modified screens
I tested this PR hands-on on the following platform(s):
I have reviewed these notes: