12static constexpr uint8_t CMD_PSR = 0x00;
13static constexpr uint8_t CMD_PFS = 0x03;
14static constexpr uint8_t CMD_GATE_SCAN = 0xE1;
16static constexpr uint8_t PSR0_OTP_LUT = 0x17;
17static constexpr uint8_t PSR1 = 0x4D;
18static constexpr uint8_t PFS = 0x20;
19static constexpr uint8_t GATE_SCAN = 0x02;
20static constexpr uint8_t CCSET = 0x02;
21static constexpr uint8_t TSSET_FULL = 0x1E;
22static constexpr uint8_t TSSET_PARTIAL = 0x5A;
23static constexpr uint8_t CDI_FULL = 0x97;
24static constexpr uint8_t CDI_PARTIAL = 0xD7;
26static constexpr uint16_t RESET_SETTLE_MS = 50;
27static constexpr uint16_t BUSY_ASSERT_MS = 10;
28static constexpr uint16_t REFRESH_START_MS = 50;
49 uint8_t white_bytes[MAX_TRANSFER_SIZE];
50 memset(white_bytes, 0xFF,
sizeof(white_bytes));
52 const size_t length = std::min(row_width -
written, MAX_TRANSFER_SIZE);
59 for (
size_t remaining = row_width; remaining != 0;) {
105 ESP_LOGV(TAG,
"Power on");
111 this->
cmd_data(CMD_GATE_SCAN, {GATE_SCAN});
118 ESP_LOGV(TAG,
"Refresh screen (%s)", partial ? LOG_STR_LITERAL(
"partial") : LOG_STR_LITERAL(
"full"));
122 this->
cmd_data(CMD_PSR, {PSR0_OTP_LUT, PSR1});
void command(uint8_t value)
bool is_using_partial_update_() const
virtual bool initialise(bool partial)
split_buffer::SplitBuffer buffer_
void cmd_data(uint8_t command, const uint8_t *ptr, size_t length)
size_t current_data_index_
bool write_plane_(uint8_t command, bool white, size_t base)
bool initialise(bool partial) override
bool after_refresh() override
bool transfer_data() override
uint16_t gate_count_() const
void power_off() override
void refresh_screen(bool partial) override
void write_gate_(size_t gate, bool white)
static constexpr uint8_t CMD_DTM2
static constexpr uint8_t CMD_REFRESH
static constexpr uint8_t CMD_TSSET
static constexpr uint8_t CMD_POWER_OFF
static constexpr uint8_t CMD_PARTIAL_OUT
static constexpr uint8_t CMD_CCSET
static constexpr uint8_t CMD_POWER_ON
void set_partial_window_(uint16_t x_start, uint16_t x_end, uint16_t y_start, uint16_t y_end)
static constexpr uint8_t CMD_DTM1
static constexpr uint8_t CMD_CDI
void write_array(const uint8_t *data, size_t length)
const uint8_t * get_span(size_t index, size_t &length) const
ESPHOME_LOG_TAG(TAG, "display")
uint32_t IRAM_ATTR HOT millis()