refactoring eink devices behaviour

This commit is contained in:
Florent committed 2026-10-21 14:08:56 -04:00
1 parent c9fa617c38
commit d1d06b92ab
17 files changed
+71 -25

No files matched your search

+1
View File
@@ -27,6 +27,7 @@ public:
virtual void turnOn() = 0;
virtual void turnOff() = 0;
virtual void clear() = 0;
virtual void blankScreen() {} // to cleanly erase screen before turning off
virtual void startFrame(ColorVal bkg = UIColor::window_bkg) = 0;
virtual void setTextSize(int sz) = 0;
virtual void setColor(ColorVal c) = 0;
+5 -1
View File
@@ -82,13 +82,17 @@ void GxEPDDisplay::turnOff() {
expander.digitalWrite(EXP_PIN_BACKLIGHT, LOW);
#endif
_isOn = false;
last_display_crc_value=0;
display.hibernate();
}
void GxEPDDisplay::blankScreen() {
// do full refresh before powering off to clear screen
// no full refresh needed at wakeup
display.clearScreen(0xFF); // Clears microcontroller side RAM
display.writeScreenBuffer(0xFF); // Forces 0xFF (White) into the display controller's history registers
resetPartialRefreshCounter();
last_display_crc_value=0;
display.hibernate();
}
void GxEPDDisplay::clear() {
+1
View File
@@ -61,6 +61,7 @@ public:
void turnOn() override;
void turnOff() override;
void clear() override;
void blankScreen() override;
void startFrame(ColorVal bkg = UIColor::window_bkg) override;
void setTextSize(int sz) override;
void setColor(ColorVal c) override;