feat: Add displayGrayscaleBase method for differential refresh

(#2334)

Introduces a new display method that prepares the framebuffer as a base
frame for grayscale overlays. On X3 panels, this uses the OEM
differential base waveform (AA-pre-BW) without forcing a resync. Other
panels fall back to normal display with configurable refresh mode.


Dependent upon matching SDK commit to work
This commit is contained in:
Justin Mitchell
2026-06-24 07:53:19 -04:00
committed by GitHub
parent 9ad2da0950
commit f6e59aab72
7 changed files with 80 additions and 3 deletions
+13
View File
@@ -47,6 +47,19 @@ class HalDisplay {
// Access to frame buffer
uint8_t* getFrameBuffer() const;
// X3 grayscale preconditioning (OEM "AA-pre-BW(mid)" settle pass), windowed
// to the gray region in physical panel coordinates (no-arg = full frame).
// Call after the BW base frame is displayed and before the grayscale planes
// are written; no-op on X4. See EInkDisplay::preconditionGrayscale.
void preconditionGrayscale();
void preconditionGrayscale(uint16_t x, uint16_t y, uint16_t w, uint16_t h);
// Display the framebuffer as the base frame for a grayscale overlay that
// follows. X3 uses the OEM differential base waveform ("AA-pre-BW(mid)");
// other panels display normally with `fallback` mode (previous behavior).
// Deliberately does NOT force the X3 resync that displayBuffer(HALF) does.
void displayGrayscaleBase(RefreshMode fallback = HALF_REFRESH, bool turnOffScreen = false);
void copyGrayscaleBuffers(const uint8_t* lsbBuffer, const uint8_t* msbBuffer);
void copyGrayscaleLsbBuffers(const uint8_t* lsbBuffer);
void copyGrayscaleMsbBuffers(const uint8_t* msbBuffer);