Skip to content

feat: Add support for the 4.2in 3 color (B/C) display - #265

Open
OzzieOrca wants to merge 1 commit into
rust-embedded-community:mainfrom
OzzieOrca:epd4in2bc
Open

OzzieOrca wants to merge 1 commit into
rust-embedded-community:mainfrom
OzzieOrca:epd4in2bc

Conversation

@OzzieOrca

@OzzieOrca OzzieOrca commented Aug 25, 2026

Copy link
Copy Markdown

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:

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 #144 and #231, which target a graphics.rs architecture that has
since been replaced by the BWRBIT const parameter.

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.
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