ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
epaper_spi_ultrachip.cpp
Go to the documentation of this file.
2
3#include "esphome/core/log.h"
4
5namespace esphome::epaper_spi {
6
7ESPHOME_LOG_TAG(TAG, "epaper_spi.ultrachip");
8
9static constexpr uint8_t hi(uint16_t v) { return static_cast<uint8_t>(v >> 8); }
10static constexpr uint8_t lo(uint16_t v) { return static_cast<uint8_t>(v & 0xFF); }
11
13 // Partial updates compare against the previous image, which deep sleep would lose; standby keeps it
14 if (this->is_using_partial_update_())
15 return;
16 this->send_deep_sleep_();
17}
18
20 ESP_LOGV(TAG, "Deep sleep");
22}
23
25
26void EPaperUltraChip::set_partial_window_(uint16_t x_start, uint16_t x_end, uint16_t y_start, uint16_t y_end) {
29 {hi(x_start), static_cast<uint8_t>(lo(x_start) & 0xF8), hi(x_end),
30 static_cast<uint8_t>(lo(x_end) | 0x07), hi(y_start), lo(y_start), hi(y_end), lo(y_end), 0x01});
31}
32
33} // namespace esphome::epaper_spi
void command(uint8_t value)
void cmd_data(uint8_t command, const uint8_t *ptr, size_t length)
static constexpr uint8_t CMD_PARTIAL_WINDOW
void set_partial_window_(uint16_t x_start, uint16_t x_end, uint16_t y_start, uint16_t y_end)
static void int x_start
Definition display.cpp:62
static void int int y_start
Definition display.cpp:62
ESPHOME_LOG_TAG(TAG, "display")