docs/adr/ADR-045-amoled-display-support.md
Proposed
The ESP32-S3 board (LilyGO T-Display-S3 AMOLED) has an integrated RM67162 QSPI AMOLED display (536x240) and 8MB octal PSRAM that were unused by the CSI firmware. Users want real-time on-device visualization of CSI statistics, vital signs, and system health without relying on an external server.
Thread-safe edge APIs already exist (edge_get_vitals(), edge_get_multi_person()) — the display task only reads from these, no new synchronization needed.
Add optional AMOLED display support with the following architecture:
display_hal.c/h: RM67162 QSPI panel driver + CST816S capacitive touch via I2Cdisplay_ui.c/h: LVGL 8.3 with 4 swipeable views via tileview widgetdisplay_task.c/h: FreeRTOS task on Core 0, priority 1 (lowest)CONFIG_DISPLAY_ENABLE=y (default): compiles display code, auto-detects hardware at bootCONFIG_DISPLAY_ENABLE=n: zero-cost — no display code compiledCONFIG_SPIRAM_IGNORE_NOTFOUND=y: boots fine on boards without PSRAM8MB partition table (partitions_display.csv):
| Task | Core | Priority | Impact |
|---|---|---|---|
| WiFi/LwIP | 0 | 18-23 | unchanged |
| OTA httpd | 0 | 5 | unchanged |
| display_task | 0 | 1 | NEW — lowest priority |
| edge_task (DSP) | 1 | 5 | unchanged |
CONFIG_DISPLAY_ENABLE=n and the old partition table| File | Purpose |
|---|---|
main/display_hal.c/h | RM67162 QSPI + CST816S touch HAL |
main/display_ui.c/h | LVGL 4-view UI |
main/display_task.c/h | FreeRTOS task, LVGL pump |
main/lv_conf.h | LVGL compile config |
partitions_display.csv | 8MB partition table |
idf_component.yml | Managed component deps |
| File | Change |
|---|---|
sdkconfig.defaults | 8MB flash, SPIRAM, custom partitions |
main/CMakeLists.txt | Conditional display sources + deps |
main/main.c | +1 include, +5 lines guarded init |
main/Kconfig.projbuild | "AMOLED Display" menu |