Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Pirate Audio ST7789 HAT #203

Merged
merged 1 commit into from
Mar 28, 2021
Merged

Conversation

ricmatsui
Copy link
Contributor

@ricmatsui ricmatsui commented Mar 20, 2021

Closes #199. The Pirate Audio collection of pHATs use GPIO 9 as the Data/Control pin:

https://pinout.xyz/pinout/pirate_audio_3w_amp
https://pinout.xyz/pinout/pirate_audio_headphone_amp
https://pinout.xyz/pinout/pirate_audio_line_out
https://pinout.xyz/pinout/pirate_audio_speaker

Currently GPIO 9 is always set as MISO which causes the display to not receive any commands. This PR adds a check to only set the pin as MISO if it is not the Data/Control pin, and adds a PIRATE_AUDIO_ST7789_HAT flag to configure the pins.

Tested on a Pi Zero W with -DPIRATE_AUDIO_ST7789_HAT=ON -DSPI_BUS_CLOCK_DIVISOR=6 -DBACKLIGHT_CONTROL=ON -DSTATISTICS=1 and ALL_TASKS_SHOULD_DMA disabled:

pirate-audio.mp4
# /boot/config.txt 
display_rotate=1

hdmi_group=2
hdmi_mode=87
hdmi_cvt=240 240 60 1 0 0 0
hdmi_force_hotplug=1

@juj
Copy link
Owner

juj commented Mar 28, 2021

Great work!

@juj juj merged commit 7c4a05a into juj:master Mar 28, 2021
@antiero
Copy link

antiero commented Mar 28, 2021

@ricmatsui - amazing thanks. What demo are you running, looks cool!

@ricmatsui
Copy link
Contributor Author

Thanks @antiero! The demo is the Pi VideoCore Hello Teapot sample that was mentioned in #187

@ricmatsui ricmatsui deleted the rm-pirate-audio branch March 28, 2021 10:07
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.

Pirate Audio 1.3 Support? (ST7789 driver)
3 participants