569bec322f
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>
35 lines
1.2 KiB
C
35 lines
1.2 KiB
C
#pragma once
|
|
#include "Arduino.h"
|
|
|
|
// Shared sequence counter — incremented by each instrumented mock call
|
|
extern int g_call_seq;
|
|
extern int g_epd_draw_seq; // sequence position of last epd_draw_image_from_file call
|
|
|
|
// Call counters for assertions
|
|
extern int g_epd_init_count;
|
|
extern int g_epd_sleep_count;
|
|
extern int g_epd_draw_image_count;
|
|
extern int g_epd_fill_count;
|
|
extern int g_epd_fill_last_color;
|
|
extern int g_epd_draw_setup_count;
|
|
extern int g_epd_draw_border_count;
|
|
extern int g_epd_draw_border_last_color;
|
|
extern int g_epd_draw_border_last_thickness;
|
|
|
|
inline void epd_setup_pins() {}
|
|
inline void epd_init() { g_epd_init_count++; }
|
|
inline void epd_sleep() { g_epd_sleep_count++; }
|
|
inline void epd_draw_image_from_file(File& f) {
|
|
g_epd_draw_image_count++;
|
|
if (g_epd_draw_seq < 0) g_epd_draw_seq = g_call_seq;
|
|
g_call_seq++;
|
|
}
|
|
inline void epd_fill(int color) { g_epd_fill_count++; g_epd_fill_last_color = color; }
|
|
inline void epd_draw_image_with_border(File& f, int color, int thickness) {
|
|
g_epd_draw_border_count++;
|
|
g_epd_draw_border_last_color = color;
|
|
g_epd_draw_border_last_thickness = thickness;
|
|
}
|
|
inline void epd_draw_ap_screen(void*) {}
|
|
inline void epd_draw_setup_screen(void*) { g_epd_draw_setup_count++; }
|