feat(13e6): bring up Waveshare 13.3" Spectra-6 end-to-end
Adds a second panel target alongside the 7.3": - src/panels/waveshare13e6/v1/ — full epd.h impl with hardware SPI on FSPI, dual-CS dispatch (CS_M/CS_S split halves), PSRAM framebuffer for image/QR/setup-screen render paths - src/test_display_13e6.cpp + [env:test-display-13e6] — self-contained first-pixels color-bar smoke test, kept as a hardware diagnostic - [env:waveshare13e6-v1] — production env: ESP32-S3-WROOM-2 N32R16V with OPI flash + OPI PSRAM (the WROOM-2 is octal flash; QIO mode crashes at do_core_init startup.c:328) - scripts/gen_screens_13e6.py + data/waveshare13e6-v1/ — 1200x1600 portrait setup screens with QR overlay regions matching the driver - scripts/data_dir.py — extra_scripts shim that routes uploadfs to the right data/ tree based on $PIOENV (PlatformIO ignores per-env data_dir) - src/epd.h: epd_setup_pins() abstraction so each panel driver owns its own pinMode + SPI.begin; main/test_display/sim_border lose all panel-specific GPIO and call epd_setup_pins() once at boot - src/operation.h: report PANEL_ID via X-Panel-Id header on every poll so the server can auto-correct Device.model 7.3" production env stays byte-identical, all 43 native tests pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+64
-6
@@ -10,12 +10,13 @@
|
||||
; Old envs preserved as historical snapshots — re-flashing units in the
|
||||
; field stays a one-line `pio run -e <env> --target upload` command.
|
||||
|
||||
; data_dir lives at project level (PlatformIO ignores it inside [env:…]
|
||||
; blocks — the silent ignore once led to a LittleFS upload that put every
|
||||
; file under /waveshare73-v1/ instead of /, blanking the panel to the
|
||||
; epd_fill yellow fallback). All current envs target the V1 panel; when
|
||||
; a second panel ships, swap this via an extra_scripts shim that picks
|
||||
; the dir from $PIOENV before uploadfs runs.
|
||||
; data_dir is single project-wide in [platformio]; PlatformIO silently
|
||||
; ignores it inside [env:…] blocks. To route uploadfs to the right
|
||||
; LittleFS payload per panel (waveshare73-v1 vs waveshare13e6-v1), each
|
||||
; env wires in scripts/data_dir.py via extra_scripts, which overrides
|
||||
; PROJECT_DATA_DIR from $PIOENV before SCons evaluates uploadfs.
|
||||
; The project-level default below keeps tooling that runs outside a
|
||||
; specific env (e.g. raw `pio run`) pointed at the 7.3" payload.
|
||||
[platformio]
|
||||
data_dir = data/waveshare73-v1
|
||||
|
||||
@@ -28,6 +29,7 @@ upload_port = /dev/ttyUSB0
|
||||
monitor_port = /dev/ttyUSB0
|
||||
monitor_speed = 115200
|
||||
board_build.filesystem = littlefs
|
||||
extra_scripts = pre:scripts/data_dir.py
|
||||
build_src_filter =
|
||||
+<main.cpp>
|
||||
+<panels/waveshare73/v1/>
|
||||
@@ -85,6 +87,62 @@ build_flags =
|
||||
-DSIM_BORDER
|
||||
-DSIM_BORDER_COLOR=COLOR_RED
|
||||
|
||||
; ── Production firmware: Waveshare 13.3" Spectra-6 + ESP32-S3-ePaper-13.3E6 ──
|
||||
; All-in-one board: ESP32-S3-WROOM-2-N32R16V (32MB OPI flash, 16MB OPI PSRAM),
|
||||
; CH343 USB-serial on USB-C. PIN_CS aliases CS_M only to satisfy config.h's
|
||||
; required-pin check — the driver uses CS_M / CS_S explicitly, never PIN_CS.
|
||||
[env:waveshare13e6-v1]
|
||||
platform = espressif32
|
||||
board = esp32-s3-devkitc-1
|
||||
framework = arduino
|
||||
monitor_speed = 115200
|
||||
board_build.flash_size = 32MB
|
||||
board_build.flash_mode = opi
|
||||
board_upload.flash_size = 32MB
|
||||
board_build.arduino.memory_type = opi_opi
|
||||
board_build.filesystem = littlefs
|
||||
extra_scripts = pre:scripts/data_dir.py
|
||||
build_src_filter =
|
||||
+<main.cpp>
|
||||
+<panels/waveshare13e6/v1/>
|
||||
build_flags =
|
||||
-DEPD_WIDTH=1200
|
||||
-DEPD_HEIGHT=1600
|
||||
-DMAX_PANEL_WIDTH=1200
|
||||
-DPIN_SCK=9
|
||||
-DPIN_MOSI=46
|
||||
-DPIN_CS=10
|
||||
-DPIN_CS_M=10
|
||||
-DPIN_CS_S=3
|
||||
-DPIN_DC=11
|
||||
-DPIN_RST=2
|
||||
-DPIN_BUSY=12
|
||||
-DPIN_PWR=1
|
||||
-DPANEL_ID=\"waveshare-13.3-spectra6\"
|
||||
-DBOARD_HAS_PSRAM
|
||||
lib_deps =
|
||||
ricmoo/QRCode@^0.0.1
|
||||
|
||||
; ── First-pixels smoke test for ESP32-S3-ePaper-13.3E6 ──
|
||||
; Self-contained color-bar bringup, no LittleFS / no shared driver. Kept
|
||||
; alongside the production env as a fallback for hardware diagnostics:
|
||||
; if waveshare13e6-v1 misbehaves, this verifies the panel + SPI bus alone.
|
||||
; pio run -e test-display-13e6 --target upload
|
||||
[env:test-display-13e6]
|
||||
platform = espressif32
|
||||
board = esp32-s3-devkitc-1
|
||||
framework = arduino
|
||||
monitor_speed = 115200
|
||||
board_build.flash_size = 32MB
|
||||
board_build.flash_mode = opi
|
||||
board_upload.flash_size = 32MB
|
||||
board_build.arduino.memory_type = opi_opi
|
||||
build_src_filter =
|
||||
+<test_display_13e6.cpp>
|
||||
build_flags =
|
||||
-DENV_TEST_DISPLAY_13E6
|
||||
-DBOARD_HAS_PSRAM
|
||||
|
||||
; ── Native unit tests — no hardware, uses test/mocks/ ──
|
||||
[env:native-test]
|
||||
platform = native
|
||||
|
||||
Reference in New Issue
Block a user