Conversation
Adds a driver for the original-generation 4.2in 400x300 tri-color panel, covering both the B (black/white/red) and C (black/white/yellow) pigments. Waveshare ships a single driver for both; the later 4in2b_V2 revision is a different controller and is red-only. The panel runs from its OTP waveform, selected by PanelSetting 0x0F, so the whole initialisation is three commands: BoosterSoftStart, PowerOn and PanelSetting. It has no partial refresh, so update_partial_frame and set_lut are unimplemented and QuickRefresh is not implemented at all. The chromatic plane is inverted on send. Together with BWRBIT=false this produces the polarity the panel documents: a set bit is white on both planes, and a cleared bit on the chromatic plane is the pigment. Tested against a 4.2in (C) yellow panel on a Waveshare ESP32 driver board. Supersedes rust-embedded-community#144 and rust-embedded-community#231, which target a graphics.rs architecture that has since been replaced by the BWRBIT const parameter.
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.
Hey, thanks for maintaining this great library. I've had the yellow 4.2" display kicking around for a few years and finally had Claude Code take a stab at using it. Used the couple other open PRs around for this display to feed it reference implementations. Seems to be working well. I'm a human and happy to help do anything to improve it or get it in. Or just happy to share with anyone who needs a starting point for these rarer displays.
Claude's Message: