| 11 | HalDisplay::~HalDisplay() {} |
| 12 | |
| 13 | void HalDisplay::begin(bool seamless) { |
| 14 | // Set X3-specific panel mode before initializing. |
| 15 | if (gpio.deviceIsX3()) { |
| 16 | einkDisplay.setDisplayX3(); |
| 17 | } |
| 18 | |
| 19 | einkDisplay.begin(); |
| 20 | |
| 21 | if (seamless) { |
| 22 | // Defuse the SDK's X3 _x3InitialFullSyncsRemaining counter (no-op on X4) |
| 23 | // so the first paint isn't promoted to FULL (~770ms). Skips the wakeup- |
| 24 | // gated requestResync() below for the same reason. |
| 25 | einkDisplay.skipInitialResync(); |
| 26 | return; |
| 27 | } |
| 28 | // Request resync after specific wakeup events to ensure clean display state. |
| 29 | const auto wakeupReason = gpio.getWakeupReason(); |
| 30 | if (wakeupReason == HalGPIO::WakeupReason::PowerButton || wakeupReason == HalGPIO::WakeupReason::AfterFlash || |
| 31 | wakeupReason == HalGPIO::WakeupReason::Other) { |
| 32 | einkDisplay.requestResync(); |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | void HalDisplay::clearScreen(uint8_t color) const { einkDisplay.clearScreen(color); } |
| 37 |
nothing calls this directly
no test coverage detected