Add epd7in3e display driver component

Ports Waveshare's official EPD_7in3e.c register/refresh sequence (the
panel has no public datasheet, so their reference driver is the source of
truth) to an ESP-IDF component using spi_master + gpio instead of the
bcm2835/RPi hardware abstraction the reference targets.

Unlike the reference driver, which toggles CS around every single byte,
this holds CS low for each logical command/data phase and DMAs pixel data
in 4KB chunks -- sending ~192,000 individual one-byte SPI transactions
would make a full refresh impractically slow.

Exposes a streaming API (epd_display_stream, pulling chunks from a
caller-supplied read_fn) so the eventual HTTP fetch path can feed the panel
without holding a full ~192KB frame in RAM, plus an in-memory convenience
wrapper (epd_display_buffer) for cases like the upcoming QR code screen
where buffering the whole frame is fine.

Wired into wifi_provisioning_start() as an init + white-clear for now, to
prove the driver builds/links/runs at the right point in the boot sequence
ahead of the actual QR code content.
This commit is contained in:
2026-07-18 11:05:06 -04:00
parent 87c2eccfdf
commit 85a5238724
6 changed files with 395 additions and 4 deletions
+39
View File
@@ -0,0 +1,39 @@
menu "E-Paper Display (epd7in3e) Configuration"
config EPD_PIN_CLK
int "SPI CLK (SCLK) GPIO"
default 18
help
Not physically wired yet -- these are sensible ESP32-C6 devkit
defaults (avoiding strapping pins 4/5/8/9/15 and the USB-JTAG
pins 12/13). Override to match your actual wiring.
config EPD_PIN_MOSI
int "SPI MOSI (DIN) GPIO"
default 19
config EPD_PIN_CS
int "SPI CS GPIO"
default 20
config EPD_PIN_DC
int "Data/Command GPIO"
default 21
config EPD_PIN_RST
int "Reset GPIO"
default 22
config EPD_PIN_BUSY
int "Busy GPIO"
default 23
config EPD_SPI_CLOCK_HZ
int "SPI clock speed (Hz)"
default 4000000
help
The panel's SPI interface is rated well above this, but dupont
wires/breadboards are often unreliable much past a few MHz.
Raise this once the physical wiring is confirmed solid.
endmenu