From 84c0cd106c8eba2757c2059231970dfb3cd3e868 Mon Sep 17 00:00:00 2001 From: Daniel Ansorregui Date: Tue, 26 Dec 2023 16:46:53 +0000 Subject: [PATCH] Set boosters configuration * Reduce the phase on times from 40ms->10ms * Increase the driving strength, this reduces a little the power usage as well * Reduces 220ms the display update -80ms the power on of the display -140ms the display partial update - Note: This may have side effects, but I saw none tested on Watchy v1.0, display should be same on other Watchy boards --- src/Display.cpp | 12 ++++++++++++ src/Display.h | 2 ++ 2 files changed, 14 insertions(+) diff --git a/src/Display.cpp b/src/Display.cpp index ad61249..25f311f 100644 --- a/src/Display.cpp +++ b/src/Display.cpp @@ -382,6 +382,18 @@ void WatchyDisplay::_InitDisplay() _transfer(0xC7); _transfer(0x00); _transfer(0x00); + + if (reduceBoosterTime) { + // SSD1675B controller datasheet + _transferCommand(0x0C); // BOOSTER_SOFT_START_CONTROL + // Set the driving strength of GDR for all phases to maximun 0b111 -> 0xF + // Set the minimum off time of GDR to minimum 0x4 (values below sould be same) + _transfer(0xF4); // Phase1 Default value 0x8B + _transfer(0xF4); // Phase2 Default value 0x9C + _transfer(0xF4); // Phase3 Default value 0x96 + _transfer(0x00); // Duration of phases, Default 0xF = 0b00 11 11 (40ms Phase 1/2, 10ms Phase 3) + } + _transferCommand(0x3C); // BorderWavefrom _transfer(darkBorder ? 0x02 : 0x05); _transferCommand(0x18); // Read built-in temperature sensor diff --git a/src/Display.h b/src/Display.h index 0799863..5c1ebf3 100644 --- a/src/Display.h +++ b/src/Display.h @@ -71,6 +71,8 @@ class WatchyDisplay : public GxEPD2_EPD void hibernate(); // turns powerOff() and sets controller to deep sleep for minimum power use, ONLY if wakeable by RST (rst >= 0) bool darkBorder = false; // adds a dark border outside the normal screen area + + static constexpr bool reduceBoosterTime = true; // Saves ~200ms private: void _writeScreenBuffer(uint8_t command, uint8_t value); void _writeImage(uint8_t command, const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false);