Skip to content

Add Waveshare GamePi13 support - #1070

Open
nomadbit21 wants to merge 2 commits into
SeedSigner:devfrom
nomadbit21:gamepi13
Open

nomadbit21 wants to merge 2 commits into
SeedSigner:devfrom
nomadbit21:gamepi13

Conversation

@nomadbit21

Copy link
Copy Markdown

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.

HardwareButtonsConstants now takes its values from HardwareButtons, 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

gamepi13 13lcdhat

This pull request is categorized as a:

  • New feature

Checklist

I ran pytest locally

  • All tests passed before submitting the PR

I included screenshots of any new or modified screens

  • Yes

I tested this PR hands-on on the following platform(s):

  • SeedSigner OS on a Pi0WH board (wireless physically disabled)
    • With a GamePi13
    • With a 1.3" LCD HAT

I have reviewed these notes:

  • Keep your changes limited in scope.
  • If you uncover other issues or improvements along the way, ideally submit those as a separate PR.
  • The more complicated the PR, the harder it is to review, test, and merge.
  • We appreciate your efforts, but we're a small team of volunteers so PR review can be a very slow process.
  • Please only "@" mention a contributor if their input is truly needed to enable further progress.
  • I understand

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant