[EInkDisplay] Add basic implementation for displayWindow (#9)

Adds a basic implementation of `displayWindow` which displays a subset
of the current frame buffer to the screen. It is significantly less
performant than a full screen reload, so it shouldn't be used unless the
underlying content is hard to get/rerender.

I've also spotted a little bit of ghosting, but it's not fully clear as
to why that is. My only thought it the LUT and grayscale mode isn't
fully disengaged or the RED RAM buffer isn't correctly setup (but afaict
it should be populated correctly).

Going to merge this to continue testing this feature out in the wild,
but consider it experimental.
This commit is contained in:
Dave Allie
2025-12-17 00:01:47 +11:00
committed by GitHub
parent fba62200e2
commit 98a5aa1f89
2 changed files with 78 additions and 0 deletions

View File

@@ -43,6 +43,8 @@ class EInkDisplay {
#endif
void displayBuffer(RefreshMode mode = FAST_REFRESH);
// EXPERIMENTAL: Windowed update - display only a rectangular region
void displayWindow(uint16_t x, uint16_t y, uint16_t w, uint16_t h);
void displayGrayBuffer(bool turnOffScreen = false);
void refreshDisplay(RefreshMode mode = FAST_REFRESH, bool turnOffScreen = false);