diff --git a/esphome/components/epaper_spi/epaper_spi_uc8179.cpp b/esphome/components/epaper_spi/epaper_spi_uc8179.cpp index 177d4b8763..2a4ff2969a 100644 --- a/esphome/components/epaper_spi/epaper_spi_uc8179.cpp +++ b/esphome/components/epaper_spi/epaper_spi_uc8179.cpp @@ -118,7 +118,8 @@ void EPaperUC8179::power_on() { void EPaperUC8179::refresh_screen(bool /*partial*/) { ESP_LOGV(TAG, "Refresh"); this->command(0x12); // DISPLAY REFRESH - // The busy line needs at least 200us to assert after the refresh command + // Delay the next busy poll: the busy line takes a short time to assert after + // the refresh command, and polling too early would read it as already idle this->next_delay_ = 100; } diff --git a/esphome/components/epaper_spi/models/uc8179.py b/esphome/components/epaper_spi/models/uc8179.py index 9d6e4173dd..bea133c328 100644 --- a/esphome/components/epaper_spi/models/uc8179.py +++ b/esphome/components/epaper_spi/models/uc8179.py @@ -5,13 +5,13 @@ Supported models: - seeed-reterminal-e1001: Seeed reTerminal E1001, which uses the same 7.5" 800x480 panel on an integrated ESP32-S3 board -Panel configuration is sent during the INITIALISE state. Power-on is handled -in the POWER_ON state, after data transfer, so the state machine's built-in -busy wait covers the power-on delay. +Panel configuration and power-on (0x04) are both sent during the INITIALISE +state; the state machine's built-in busy wait then covers the power-on delay +before the waveform/mode registers and image data are transferred. These displays support fast full and partial refresh: set ``full_update_every`` -greater than 1 to enable it. Every ``full_update_every`` updates a fast full -refresh is performed, with partial refreshes in between. +greater than 1 to enable it. Every ``full_update_every``-th update is a fast +full refresh, with partial refreshes in between. """ from typing import Any @@ -37,8 +37,9 @@ class UC8179(EpaperModel): def get_init_sequence(self, config: dict) -> tuple: """Generate the initialization sequence for UC8179 mono displays. - Panel configuration only — power-on is handled separately in power_on() - after data transfer, with the state machine busy-waiting before refresh. + Panel configuration only — the driver appends power-on (0x04) at the + end of the INITIALISE state, and the state machine busy-waits for it + to complete before the data transfer starts. """ width, height = self.get_dimensions(config) return ( diff --git a/tests/component_tests/epaper_spi/test_init.py b/tests/component_tests/epaper_spi/test_init.py index 55481895dd..bc41f3cf11 100644 --- a/tests/component_tests/epaper_spi/test_init.py +++ b/tests/component_tests/epaper_spi/test_init.py @@ -448,7 +448,7 @@ def test_uc8179_e1001_code_generation( # The model must instantiate the UC8179 driver class with the panel dimensions assert "epaper_spi::EPaperUC8179" in main_cpp - assert '"SEEED-RETERMINAL-E1001", 800, 480' in main_cpp + assert re.search(r'"SEEED-RETERMINAL-E1001",\s*800,\s*480', main_cpp) # The generated init sequence must contain the UC8179 resolution setting # for 800x480: command 0x61, 4 data bytes 0x03 0x20 0x01 0xE0