ESPHome 2026.8.0-dev
Loading...
Searching...
No Matches
epaper_spi_inkplate2.h
Go to the documentation of this file.
1#pragma once
2
3#include "epaper_spi.h"
4
5namespace esphome::epaper_spi {
6
7// Soldered Inkplate 2: 104x212 black/white/red (BWR) e-paper, UC8xxx-family controller.
8class EPaperInkplate2 final : public EPaperBase {
9 public:
10 EPaperInkplate2(const char *name, uint16_t width, uint16_t height, const uint8_t *init_sequence,
11 size_t init_sequence_length)
12 : EPaperBase(name, width, height, init_sequence, init_sequence_length, DISPLAY_TYPE_COLOR) {
13 // Dual-plane buffer: black/white plane followed by red plane, 1 bit per pixel each.
14 this->buffer_length_ = this->row_width_ * this->height_ * 2;
15 }
16
17 void fill(Color color) override;
18 void clear() override;
19 void draw_pixel_at(int x, int y, Color color) override;
20
21 protected:
22 void refresh_screen(bool partial) override;
23 void power_on() override;
24 void power_off() override;
25 void deep_sleep() override;
26
27 bool transfer_data() override;
28
29 // Streams buffer_[current_data_index_ .. end) in chunks; returns false if it yields on MAX_TRANSFER_TIME.
30 bool send_buffer_range_(size_t end, uint32_t start_time);
31};
32
33} // namespace esphome::epaper_spi
void refresh_screen(bool partial) override
void draw_pixel_at(int x, int y, Color color) override
EPaperInkplate2(const char *name, uint16_t width, uint16_t height, const uint8_t *init_sequence, size_t init_sequence_length)
bool send_buffer_range_(size_t end, uint32_t start_time)
static void uint32_t
uint8_t end[39]
Definition sun_gtil2.cpp:17
uint16_t x
Definition tt21100.cpp:5
uint16_t y
Definition tt21100.cpp:6