mirror of
https://github.com/esphome/esphome.git
synced 2026-10-12 06:14:17 +00:00
[it8951] Hold display enable pins off during deep-sleep (#20471)
This commit is contained in:
@@ -145,8 +145,8 @@ IT8951Model(
|
||||
reset_pin=12,
|
||||
cs_pin=10,
|
||||
# Board power-enable rails: 1.8V logic supply (GPIO21) and the EPD supply
|
||||
# (GPIO11). Driven high during setup so no separate power_supply is needed.
|
||||
enable_pin=[21, 11],
|
||||
# (GPIO11). Driven high during setup so no separate power_supply is needed, and held low during deep_sleep.
|
||||
enable_pin=[{"number": 21, "hold_state": True}, {"number": 11, "hold_state": True}],
|
||||
vcom=1400,
|
||||
# reTerminal E1003 panel firmware only accepts the 0x0002 VCOM SET
|
||||
# selector; using the default 0x0001 leaves VCOM unchanged and breaks
|
||||
|
||||
@@ -351,6 +351,12 @@ void IT8951Display::on_safe_shutdown() {
|
||||
this->spi_cmd_(TCON_SLEEP);
|
||||
}
|
||||
|
||||
void IT8951Display::on_powerdown() {
|
||||
for (auto *pin : this->enable_pins_) {
|
||||
pin->digital_write(false);
|
||||
}
|
||||
}
|
||||
|
||||
// --- Init op enqueuers -------------------------------------------------------
|
||||
|
||||
void IT8951Display::enqueue_init_reset_() {
|
||||
|
||||
@@ -150,6 +150,7 @@ class IT8951Display : public Display,
|
||||
void loop() override;
|
||||
void dump_config() override;
|
||||
void on_safe_shutdown() override;
|
||||
void on_powerdown() override;
|
||||
float get_setup_priority() const override { return setup_priority::PROCESSOR; }
|
||||
|
||||
// --- Config setters (called from generated code) ---
|
||||
|
||||
Reference in New Issue
Block a user