10static const char *
const TAG =
"waveshare_epaper";
12static const uint8_t LUT_SIZE_WAVESHARE = 30;
14static const uint8_t FULL_UPDATE_LUT[LUT_SIZE_WAVESHARE] = {0x02, 0x02, 0x01, 0x11, 0x12, 0x12, 0x22, 0x22, 0x66, 0x69,
15 0x69, 0x59, 0x58, 0x99, 0x99, 0x88, 0x00, 0x00, 0x00, 0x00,
16 0xF8, 0xB4, 0x13, 0x51, 0x35, 0x51, 0x51, 0x19, 0x01, 0x00};
18static const uint8_t PARTIAL_UPDATE_LUT[LUT_SIZE_WAVESHARE] = {
19 0x10, 0x18, 0x18, 0x08, 0x18, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
20 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x14, 0x44, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
22static const uint8_t LUT_SIZE_TTGO = 70;
24static const uint8_t FULL_UPDATE_LUT_TTGO[LUT_SIZE_TTGO] = {
25 0x80, 0x60, 0x40, 0x00, 0x00, 0x00, 0x00,
26 0x10, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00,
27 0x80, 0x60, 0x40, 0x00, 0x00, 0x00, 0x00,
28 0x10, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00,
29 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
30 0x03, 0x03, 0x00, 0x00, 0x02,
31 0x09, 0x09, 0x00, 0x00, 0x02,
32 0x03, 0x03, 0x00, 0x00, 0x02,
33 0x00, 0x00, 0x00, 0x00, 0x00,
34 0x00, 0x00, 0x00, 0x00, 0x00,
35 0x00, 0x00, 0x00, 0x00, 0x00,
36 0x00, 0x00, 0x00, 0x00, 0x00,
39static const uint8_t PARTIAL_UPDATE_LUT_TTGO[LUT_SIZE_TTGO] = {
40 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
41 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
42 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
43 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
44 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
45 0x0A, 0x00, 0x00, 0x00, 0x00,
46 0x00, 0x00, 0x00, 0x00, 0x00,
47 0x00, 0x00, 0x00, 0x00, 0x00,
48 0x00, 0x00, 0x00, 0x00, 0x00,
49 0x00, 0x00, 0x00, 0x00, 0x00,
50 0x00, 0x00, 0x00, 0x00, 0x00,
51 0x00, 0x00, 0x00, 0x00, 0x00,
54static const uint8_t LUT_SIZE_TTGO_B73 = 100;
56static const uint8_t FULL_UPDATE_LUT_TTGO_B73[LUT_SIZE_TTGO_B73] = {
57 0xA0, 0x90, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x90, 0xA0, 0x00, 0x00, 0x00, 0x00,
58 0x00, 0x00, 0x00, 0xA0, 0x90, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x90, 0xA0, 0x00,
59 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
61 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x03, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00,
62 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
63 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
66static const uint8_t PARTIAL_UPDATE_LUT_TTGO_B73[LUT_SIZE_TTGO_B73] = {
67 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
68 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
69 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
71 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
72 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
73 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
76static const uint8_t LUT_SIZE_TTGO_B1 = 29;
78static const uint8_t FULL_UPDATE_LUT_TTGO_B1[LUT_SIZE_TTGO_B1] = {
79 0x22, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
80 0x00, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x01, 0x00, 0x00, 0x00, 0x00};
82static const uint8_t PARTIAL_UPDATE_LUT_TTGO_B1[LUT_SIZE_TTGO_B1] = {
83 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
84 0x00, 0x0F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
88static const uint8_t PARTIAL_UPD_2IN9_LUT_SIZE = 159;
89static const uint8_t PARTIAL_UPD_2IN9_LUT[PARTIAL_UPD_2IN9_LUT_SIZE] =
91 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
92 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
93 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
94 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
95 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
96 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
97 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
98 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
99 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
100 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
101 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
102 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
103 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
104 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
105 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
106 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
107 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
108 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0x00,
109 0x22, 0x17, 0x41, 0xB0, 0x32, 0x36,
162 ESP_LOGE(TAG,
"Timeout while displaying image!");
176 Display::fill(color);
181 const uint8_t
fill = color.
is_on() ? 0x00 : 0xFF;
199 ESP_LOGE(TAG,
"Could not allocate buffer %d for display!", i);
200 for (
auto &buffer : this->
buffers_) {
201 allocator.
deallocate(buffer, small_buffer_length);
211 if (color.
red > 127) {
212 if (color.
green > 170) {
213 if (color.
blue > 127) {
218 }
else if (color.
green > 85) {
224 if (color.
green > 127) {
225 if (color.
blue > 127) {
231 if (color.
blue > 127) {
256 ESP_LOGE(TAG,
"Buffer unavailable!");
259 for (
auto &buffer : this->
buffers_) {
260 for (
uint32_t buffer_pos = 0; buffer_pos < small_buffer_length; buffer_pos += 3) {
264 buffer[buffer_pos + 0] = pixel_color << 5 | pixel_color << 2 | pixel_color >> 1;
265 buffer[buffer_pos + 1] = pixel_color << 7 | pixel_color << 4 | pixel_color << 1 | pixel_color >> 2;
266 buffer[buffer_pos + 2] = pixel_color << 6 | pixel_color << 3 | pixel_color << 0;
274 ESP_LOGE(TAG,
"Buffer unavailable!");
279 uint8_t byte_to_send;
280 for (
auto &buffer : this->
buffers_) {
281 for (
uint32_t buffer_pos = 0; buffer_pos < small_buffer_length; buffer_pos += 3) {
282 std::bitset<24> triplet =
283 buffer[buffer_pos + 0] << 16 | buffer[buffer_pos + 1] << 8 | buffer[buffer_pos + 2] << 0;
287 byte_to_send = ((triplet >> 17).to_ulong() & 0b01110000) | ((triplet >> 18).to_ulong() & 0b00000111);
288 this->
data(byte_to_send);
290 byte_to_send = ((triplet >> 11).to_ulong() & 0b01110000) | ((triplet >> 12).to_ulong() & 0b00000111);
291 this->
data(byte_to_send);
293 byte_to_send = ((triplet >> 5).to_ulong() & 0b01110000) | ((triplet >> 6).to_ulong() & 0b00000111);
294 this->
data(byte_to_send);
296 byte_to_send = ((triplet << 1).to_ulong() & 0b01110000) | ((triplet << 0).to_ulong() & 0b00000111);
297 this->
data(byte_to_send);
318 const uint8_t subpos =
x & 0x07;
320 if (!color.
is_on()) {
347 const uint8_t subpos =
x & 0x07;
356 if (((color.
red > 0) && (color.
green == 0) && (color.
blue == 0))) {
357 this->
buffer_[pos + buf_half_len] |= 0x80 >> subpos;
359 this->
buffer_[pos + buf_half_len] &= ~(0x80 >> subpos);
369 uint32_t first_bit_position = pixel_position * 3;
370 uint32_t byte_position = first_bit_position / 8u;
371 uint32_t byte_subposition = first_bit_position % 8u;
372 uint32_t buffer_position = byte_position / small_buffer_length;
373 uint32_t buffer_subposition = byte_position % small_buffer_length;
375 if (byte_subposition <= 5) {
376 this->
buffers_[buffer_position][buffer_subposition] =
377 (this->
buffers_[buffer_position][buffer_subposition] & (0xFF ^ (0b111 << (5 - byte_subposition)))) |
378 (pixel_bits << (5 - byte_subposition));
380 this->
buffers_[buffer_position][buffer_subposition + 0] =
381 (this->
buffers_[buffer_position][buffer_subposition + 0] & (0xFF ^ (0b111 >> (byte_subposition - 5)))) |
382 (pixel_bits >> (byte_subposition - 5));
384 this->
buffers_[buffer_position][buffer_subposition + 1] = (this->
buffers_[buffer_position][buffer_subposition + 1] &
385 (0xFF ^ (0xFF & (0b111 << (13 - byte_subposition))))) |
386 (pixel_bits << (13 - byte_subposition));
416 ESP_LOGI(TAG,
"Set the display to deep sleep");
481 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
484 ESP_LOGCONFIG(TAG,
" Model: 1.54in");
487 ESP_LOGCONFIG(TAG,
" Model: 1.54inV2");
490 ESP_LOGCONFIG(TAG,
" Model: 2.13in");
493 ESP_LOGCONFIG(TAG,
" Model: 2.13inV2");
496 ESP_LOGCONFIG(TAG,
" Model: 2.13in (TTGO)");
499 ESP_LOGCONFIG(TAG,
" Model: 2.13in (TTGO B73)");
502 ESP_LOGCONFIG(TAG,
" Model: 2.13in (TTGO B74)");
505 ESP_LOGCONFIG(TAG,
" Model: 2.13in (TTGO B1)");
508 ESP_LOGCONFIG(TAG,
" Model: 2.9in");
511 ESP_LOGCONFIG(TAG,
" Model: 2.9inV2");
516 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
518 LOG_UPDATE_INTERVAL(
this);
522 bool prev_full_update = this->
at_update_ == 1;
525 ESP_LOGI(TAG,
"Wake up the display");
537 if (full_update != prev_full_update) {
542 this->
write_lut_(full_update ? FULL_UPDATE_LUT_TTGO : PARTIAL_UPDATE_LUT_TTGO, LUT_SIZE_TTGO);
545 this->
write_lut_(full_update ? FULL_UPDATE_LUT_TTGO_B73 : PARTIAL_UPDATE_LUT_TTGO_B73, LUT_SIZE_TTGO_B73);
551 this->
write_lut_(full_update ? FULL_UPDATE_LUT_TTGO_B1 : PARTIAL_UPDATE_LUT_TTGO_B1, LUT_SIZE_TTGO_B1);
554 this->
write_lut_(full_update ? FULL_UPDATE_LUT : PARTIAL_UPDATE_LUT, LUT_SIZE_WAVESHARE);
563 this->
data(full_update ? 0x55 : 0x26);
585 this->
data(full_update ? 0x05 : 0x80);
589 this->
data(full_update ? 0x03 : 0x01);
651 for (
int j = 0; j < wb; j++) {
677 this->
data(full_update ? 0xF7 : 0xFF);
683 this->
data(full_update ? 0xC7 : 0x0C);
698 ESP_LOGI(TAG,
"Set the display back to deep sleep");
755 for (uint8_t i = 0; i <
size; i++)
782static const uint8_t LUT_VCOM_DC_2_7[44] = {
783 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x00, 0x32, 0x32, 0x00, 0x00, 0x02, 0x00,
784 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
785 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
788static const uint8_t LUT_WHITE_TO_WHITE_2_7[42] = {
789 0x50, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x60, 0x32, 0x32, 0x00, 0x00, 0x02, 0xA0, 0x0F,
790 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
791 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
794static const uint8_t LUT_BLACK_TO_WHITE_2_7[42] = {
795 0x50, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x60, 0x32, 0x32, 0x00, 0x00, 0x02, 0xA0, 0x0F,
796 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
797 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
800static const uint8_t LUT_WHITE_TO_BLACK_2_7[] = {
801 0xA0, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x60, 0x32, 0x32, 0x00, 0x00, 0x02, 0x50, 0x0F,
802 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
803 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
806static const uint8_t LUT_BLACK_TO_BLACK_2_7[42] = {
807 0xA0, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x60, 0x32, 0x32, 0x00, 0x00, 0x02, 0x50, 0x0F,
808 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
809 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
872 for (uint8_t i : LUT_VCOM_DC_2_7)
877 for (uint8_t i : LUT_WHITE_TO_WHITE_2_7)
881 for (uint8_t i : LUT_BLACK_TO_WHITE_2_7)
885 for (uint8_t i : LUT_WHITE_TO_BLACK_2_7)
889 for (uint8_t i : LUT_BLACK_TO_BLACK_2_7)
898 for (
uint32_t i = 0; i < buf_len; i++) {
906 for (
uint32_t i = 0; i < buf_len; i++) {
916 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
917 ESP_LOGCONFIG(TAG,
" Model: 2.7in");
919 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
921 LOG_UPDATE_INTERVAL(
this);
969 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
970 ESP_LOGCONFIG(TAG,
" Model: 2.7in V2");
972 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
974 LOG_UPDATE_INTERVAL(
this);
1032 for (
uint32_t i = 0; i < buf_len_half; i++) {
1040 for (
uint32_t i = buf_len_half; i < buf_len_half * 2u; i++) {
1053 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1054 ESP_LOGCONFIG(TAG,
" Model: 1.54in V2 B");
1056 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1057 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1058 LOG_UPDATE_INTERVAL(
this);
1068static const uint8_t LUT_VCOM_DC_2_7B[44] = {0x00, 0x00, 0x00, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x0A,
1069 0x00, 0x00, 0x08, 0x00, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x00, 0x0A,
1070 0x0A, 0x00, 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x05, 0x00,
1071 0x03, 0x0E, 0x00, 0x00, 0x0A, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01};
1073static const uint8_t LUT_WHITE_TO_WHITE_2_7B[42] = {0x90, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x40, 0x0A, 0x0A, 0x00, 0x00,
1074 0x08, 0x84, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x80, 0x0A, 0x0A, 0x00,
1075 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x05, 0x00, 0x03, 0x0E,
1076 0x00, 0x00, 0x0A, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01};
1078static const uint8_t LUT_BLACK_TO_WHITE_2_7B[42] = {0xA0, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x0A, 0x00, 0x00,
1079 0x08, 0x84, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x90, 0x0A, 0x0A, 0x00,
1080 0x00, 0x08, 0xB0, 0x04, 0x10, 0x00, 0x00, 0x05, 0xB0, 0x03, 0x0E,
1081 0x00, 0x00, 0x0A, 0xC0, 0x23, 0x00, 0x00, 0x00, 0x01};
1083static const uint8_t LUT_WHITE_TO_BLACK_2_7B[] = {0x90, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x20, 0x0A, 0x0A, 0x00, 0x00,
1084 0x08, 0x84, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x10, 0x0A, 0x0A, 0x00,
1085 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x05, 0x00, 0x03, 0x0E,
1086 0x00, 0x00, 0x0A, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01};
1088static const uint8_t LUT_BLACK_TO_BLACK_2_7B[42] = {0x90, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x40, 0x0A, 0x0A, 0x00, 0x00,
1089 0x08, 0x84, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x80, 0x0A, 0x0A, 0x00,
1090 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x05, 0x00, 0x03, 0x0E,
1091 0x00, 0x00, 0x0A, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01};
1150 for (uint8_t i : LUT_VCOM_DC_2_7B)
1154 for (uint8_t i : LUT_WHITE_TO_WHITE_2_7B)
1158 for (uint8_t i : LUT_BLACK_TO_WHITE_2_7B)
1162 for (uint8_t i : LUT_WHITE_TO_BLACK_2_7B) {
1168 for (uint8_t i : LUT_BLACK_TO_BLACK_2_7B) {
1189 for (
uint32_t i = 0; i < buf_len_half; i++) {
1198 for (
uint32_t i = buf_len_half; i < buf_len_half * 2u; i++) {
1214 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1215 ESP_LOGCONFIG(TAG,
" Model: 2.7in B");
1217 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1218 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1219 LOG_UPDATE_INTERVAL(
this);
1251 this->
data((xend >> 3) & 0xff);
1256 this->
data(yend & 0xff);
1257 this->
data((yend >> 8) & 0xff);
1272 for (
uint32_t i = 0; i < buf_len; i++) {
1280 for (
uint32_t i = 0; i < buf_len; i++) {
1293 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1294 ESP_LOGCONFIG(TAG,
" Model: 2.7in B V2");
1296 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1297 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1298 LOG_UPDATE_INTERVAL(
this);
1372 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1373 ESP_LOGCONFIG(TAG,
" Model: 2.9in (B)");
1375 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1376 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1377 LOG_UPDATE_INTERVAL(
this);
1459 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1460 ESP_LOGCONFIG(TAG,
" Model: 2.9in (D)");
1462 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1463 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1464 LOG_UPDATE_INTERVAL(
this);
1470static const uint8_t LUT_SIZE_DKE = 70;
1471static const uint8_t UPDATE_LUT_DKE[LUT_SIZE_DKE] = {
1472 0xA0, 0x90, 0x50, 0x0, 0x0, 0x0, 0x0, 0x50, 0x90, 0xA0, 0x0, 0x0, 0x0, 0x0, 0xA0, 0x90, 0x50, 0x0,
1473 0x0, 0x0, 0x0, 0x50, 0x90, 0xA0, 0x0, 0x0, 0x0, 0x0, 0x00, 0x00, 0x00, 0x0, 0x0, 0x0, 0x0, 0xF,
1474 0xF, 0x0, 0x0, 0x0, 0xF, 0xF, 0x0, 0x0, 0x02, 0xF, 0xF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1475 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1477static const uint8_t PART_UPDATE_LUT_DKE[LUT_SIZE_DKE] = {
1478 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xa0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x10, 0x00, 0x00,
1479 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
1480 0x05, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1481 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
1482static const uint8_t FULL_UPDATE_LUT_DKE[LUT_SIZE_DKE] = {
1483 0x90, 0x50, 0xa0, 0x50, 0x50, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa0, 0xa0, 0x80, 0x00, 0x90, 0x50, 0xa0, 0x50,
1484 0x50, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa0, 0xa0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17,
1485 0x04, 0x00, 0x00, 0x00, 0x0b, 0x04, 0x00, 0x00, 0x00, 0x06, 0x05, 0x00, 0x00, 0x00, 0x04, 0x05, 0x00, 0x00,
1486 0x00, 0x01, 0x0e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
1550 for (uint8_t v : FULL_UPDATE_LUT_DKE)
1555 ESP_LOGI(TAG,
"Performing e-paper update.");
1581 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1582 ESP_LOGCONFIG(TAG,
" Model: 2.9in DKE");
1584 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1585 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1586 LOG_UPDATE_INTERVAL(
this);
1653 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1654 ESP_LOGCONFIG(TAG,
" Model: 2.9in (B) V3");
1656 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1657 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1658 LOG_UPDATE_INTERVAL(
this);
1709void WaveshareEPaper2P9InV2R2::reset_() {
1721 ESP_LOGE(TAG,
"fail idle 1");
1760 this->
write_lut_(PARTIAL_UPD_2IN9_LUT, PARTIAL_UPD_2IN9_LUT_SIZE);
1782 ESP_LOGE(TAG,
"fail idle 2");
1821 for (uint8_t i = 0; i <
size; i++)
1826 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1828 " Model: 2.9inV2R2\n"
1829 " Full Update Every: %" PRIu32,
1832 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1833 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1834 LOG_UPDATE_INTERVAL(
this);
1914 LOG_DISPLAY(
"",
"E-Paper (Good Display)",
this);
1915 ESP_LOGCONFIG(TAG,
" Model: 2.9in GDEY029T94");
1917 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1918 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1919 LOG_UPDATE_INTERVAL(
this);
1932static const uint8_t LUT_20_VCOMDC_29_5[] = {
1933 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x60, 0x28, 0x28, 0x00, 0x00, 0x01, 0x00, 0x14, 0x00,
1934 0x00, 0x00, 0x01, 0x00, 0x12, 0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1935 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1938static const uint8_t LUT_21_WW_29_5[] = {
1939 0x40, 0x08, 0x00, 0x00, 0x00, 0x02, 0x90, 0x28, 0x28, 0x00, 0x00, 0x01, 0x40, 0x14,
1940 0x00, 0x00, 0x00, 0x01, 0xA0, 0x12, 0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
1941 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1944static const uint8_t LUT_22_BW_29_5[] = {
1945 0x40, 0x08, 0x00, 0x00, 0x00, 0x02, 0x90, 0x28, 0x28, 0x00, 0x00, 0x01, 0x40, 0x14,
1946 0x00, 0x00, 0x00, 0x01, 0xA0, 0x12, 0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
1947 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1950static const uint8_t LUT_23_WB_29_5[] = {
1951 0x80, 0x08, 0x00, 0x00, 0x00, 0x02, 0x90, 0x28, 0x28, 0x00, 0x00, 0x01, 0x80, 0x14,
1952 0x00, 0x00, 0x00, 0x01, 0x50, 0x12, 0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
1953 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1956static const uint8_t LUT_24_BB_29_5[] = {
1957 0x80, 0x08, 0x00, 0x00, 0x00, 0x02, 0x90, 0x28, 0x28, 0x00, 0x00, 0x01, 0x80, 0x14,
1958 0x00, 0x00, 0x00, 0x01, 0x50, 0x12, 0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
1959 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1963static const uint8_t LUT_20_VCOMDC_PARTIAL_29_5[] = {
1964 0x00, 0x20, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1965 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1966 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1969static const uint8_t LUT_21_WW_PARTIAL_29_5[] = {
1970 0x00, 0x20, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1971 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1972 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1975static const uint8_t LUT_22_BW_PARTIAL_29_5[] = {
1976 0x80, 0x20, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1977 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1978 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1981static const uint8_t LUT_23_WB_PARTIAL_29_5[] = {
1982 0x40, 0x20, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1983 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1984 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1987static const uint8_t LUT_24_BB_PARTIAL_29_5[] = {
1988 0x00, 0x20, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1989 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1990 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1994 if (!this->power_is_on_) {
1998 this->power_is_on_ =
true;
2004 this->power_is_on_ =
false;
2009 if (this->deep_sleep_between_updates_) {
2012 ESP_LOGD(TAG,
"go to deep sleep");
2013 this->is_deep_sleep_ =
true;
2021 if (this->deep_sleep_between_updates_ && this->is_deep_sleep_) {
2022 ESP_LOGI(TAG,
"wake up from deep sleep");
2024 this->is_deep_sleep_ =
false;
2052 this->
data(0b10111111);
2061 ESP_LOGD(TAG,
"panel setting done");
2067 this->deep_sleep_between_updates_ =
true;
2072 if (this->old_buffer_ ==
nullptr) {
2073 ESP_LOGE(TAG,
"Could not allocate old buffer for display!");
2077 this->old_buffer_[i] = 0xFF;
2089 this->
write_lut_(LUT_20_VCOMDC_29_5,
sizeof(LUT_20_VCOMDC_29_5));
2091 this->
write_lut_(LUT_21_WW_29_5,
sizeof(LUT_21_WW_29_5));
2093 this->
write_lut_(LUT_22_BW_29_5,
sizeof(LUT_22_BW_29_5));
2095 this->
write_lut_(LUT_23_WB_29_5,
sizeof(LUT_23_WB_29_5));
2097 this->
write_lut_(LUT_24_BB_29_5,
sizeof(LUT_24_BB_29_5));
2098 ESP_LOGD(TAG,
"initialized full update");
2109 this->
write_lut_(LUT_20_VCOMDC_PARTIAL_29_5,
sizeof(LUT_20_VCOMDC_PARTIAL_29_5));
2111 this->
write_lut_(LUT_21_WW_PARTIAL_29_5,
sizeof(LUT_21_WW_PARTIAL_29_5));
2113 this->
write_lut_(LUT_22_BW_PARTIAL_29_5,
sizeof(LUT_22_BW_PARTIAL_29_5));
2115 this->
write_lut_(LUT_23_WB_PARTIAL_29_5,
sizeof(LUT_23_WB_PARTIAL_29_5));
2117 this->
write_lut_(LUT_24_BB_PARTIAL_29_5,
sizeof(LUT_24_BB_PARTIAL_29_5));
2118 ESP_LOGD(TAG,
"initialized partial update");
2122 bool full_update = this->at_update_ == 0;
2156 this->old_buffer_[i] = this->
buffer_[i];
2167 ESP_LOGD(TAG,
"full update done");
2170 ESP_LOGD(TAG,
"partial update done");
2173 this->at_update_ = (this->at_update_ + 1) % this->full_update_every_;
2181 for (uint8_t i = 0; i <
size; i++)
2191 LOG_DISPLAY(
"",
"Waveshare E-Paper (Good Display)",
this);
2192 ESP_LOGCONFIG(TAG,
" Model: 2.9in Greyscale GDEW029T5");
2194 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2195 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2196 ESP_LOGCONFIG(TAG,
" Full Update Every: %" PRIu32, this->full_update_every_);
2197 LOG_UPDATE_INTERVAL(
this);
2214 this->init_internal_();
2217 if (this->lastbuff_ !=
nullptr) {
2223void GDEW0154M09::reset_() {
2233void GDEW0154M09::init_internal_() {
2244 const uint8_t panel_setting_1 = 0b11011111;
2251 const uint8_t panel_setting_2 = 0b01110;
2253 const uint8_t wf_t0154_cz_b3_list[] = {
2255 CMD_PSR_PANEL_SETTING, 2, panel_setting_1, panel_setting_2,
2256 CMD_UNDOCUMENTED_0x4D, 1, 0x55,
2257 CMD_UNDOCUMENTED_0xAA, 1, 0x0f,
2258 CMD_UNDOCUMENTED_0xE9, 1, 0x02,
2259 CMD_UNDOCUMENTED_0xB6, 1, 0x11,
2260 CMD_UNDOCUMENTED_0xF3, 1, 0x0a,
2261 CMD_TRES_RESOLUTION_SETTING, 3, 0xc8, 0x00, 0xc8,
2262 CMD_TCON_TCONSETTING, 1, 0x00,
2263 CMD_CDI_VCOM_DATA_INTERVAL, 1, 0xd7,
2264 CMD_PWS_POWER_SAVING, 1, 0x00,
2269 this->write_init_list_(wf_t0154_cz_b3_list);
2274void GDEW0154M09::write_init_list_(
const uint8_t *list) {
2275 uint8_t list_limit = list[0];
2276 uint8_t *start_ptr = ((uint8_t *) list + 1);
2277 for (uint8_t i = 0; i < list_limit; i++) {
2278 this->
command(*(start_ptr + 0));
2279 for (uint8_t dnum = 0; dnum < *(start_ptr + 1); dnum++) {
2280 this->
data(*(start_ptr + 2 + dnum));
2282 start_ptr += (*(start_ptr + 1) + 2);
2286void GDEW0154M09::clear_() {
2288 for (uint8_t j = 0;
j < 2;
j++) {
2289 this->
command(CMD_DTM1_DATA_START_TRANS);
2290 for (
uint32_t count = 0; count < pixsize; count++) {
2293 this->
command(CMD_DTM2_DATA_START_TRANS2);
2294 for (
uint32_t count = 0; count < pixsize; count++) {
2297 this->
command(CMD_DISPLAY_REFRESH);
2304 this->init_internal_();
2306 this->
command(CMD_DTM1_DATA_START_TRANS);
2310 this->
command(CMD_DTM2_DATA_START_TRANS2);
2314 this->
command(CMD_DISPLAY_REFRESH);
2322 this->
command(CMD_POF_POWER_OFF);
2325 this->
command(CMD_DSLP_DEEP_SLEEP);
2326 this->
data(DATA_DSLP_DEEP_SLEEP);
2332 LOG_DISPLAY(
"",
"M5Stack CoreInk E-Paper (Good Display)",
this);
2333 ESP_LOGCONFIG(TAG,
" Model: 1.54in Greyscale GDEW0154M09");
2335 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2336 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2337 LOG_UPDATE_INTERVAL(
this);
2354 this->init_display_();
2355 ESP_LOGD(TAG,
"Initialization complete, set the display to deep sleep");
2368void GDEY042T81::reset_() {
2377void GDEY042T81::init_display_() {
2423void GDEY042T81::update_full_() {
2444void GDEY042T81::update_part_() {
2457 ESP_LOGD(TAG,
"Wake up the display");
2458 this->init_display_();
2462 ESP_LOGE(TAG,
"Failed to perform update, display is busy");
2468 ESP_LOGD(TAG,
"Full update");
2476 this->update_full_();
2482 ESP_LOGD(TAG,
"Update");
2495 this->update_full_();
2504 ESP_LOGD(TAG,
"Partial update");
2508 ESP_LOGE(TAG,
"Failed to perform partial update, display is busy");
2518 this->update_part_();
2523 ESP_LOGD(TAG,
"Set the display back to deep sleep");
2531 LOG_DISPLAY(
"",
"GoodDisplay E-Paper",
this);
2533 " Model: 4.2in B/W GDEY042T81\n"
2534 " Full Update Every: %" PRIu32,
2537 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2538 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2539 LOG_UPDATE_INTERVAL(
this);
2542static const uint8_t LUT_VCOM_DC_4_2[] = {
2543 0x00, 0x17, 0x00, 0x00, 0x00, 0x02, 0x00, 0x17, 0x17, 0x00, 0x00, 0x02, 0x00, 0x0A, 0x01,
2544 0x00, 0x00, 0x01, 0x00, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2545 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2547static const uint8_t LUT_WHITE_TO_WHITE_4_2[] = {
2548 0x40, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x40, 0x0A,
2549 0x01, 0x00, 0x00, 0x01, 0xA0, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
2550 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2552static const uint8_t LUT_BLACK_TO_WHITE_4_2[] = {
2553 0x40, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x40, 0x0A,
2554 0x01, 0x00, 0x00, 0x01, 0xA0, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
2555 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2558static const uint8_t LUT_BLACK_TO_BLACK_4_2[] = {
2559 0x80, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x80, 0x0A,
2560 0x01, 0x00, 0x00, 0x01, 0x50, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
2561 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2564static const uint8_t LUT_WHITE_TO_BLACK_4_2[] = {
2565 0x80, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x80, 0x0A,
2566 0x01, 0x00, 0x00, 0x01, 0x50, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
2567 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2602 for (uint8_t i : LUT_VCOM_DC_4_2)
2606 for (uint8_t i : LUT_WHITE_TO_WHITE_4_2)
2610 for (uint8_t i : LUT_BLACK_TO_WHITE_4_2)
2614 for (uint8_t i : LUT_WHITE_TO_BLACK_4_2)
2618 for (uint8_t i : LUT_BLACK_TO_BLACK_4_2)
2656 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2657 ESP_LOGCONFIG(TAG,
" Model: 4.2in");
2659 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2660 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2661 LOG_UPDATE_INTERVAL(
this);
2712 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2713 ESP_LOGCONFIG(TAG,
" Model: 4.2in (B V2)");
2715 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2716 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2717 LOG_UPDATE_INTERVAL(
this);
2748 for (
uint32_t i = 0; i < buf_len; ++i) {
2754 for (
uint32_t i = 0; i < buf_len; ++i) {
2770 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2771 ESP_LOGCONFIG(TAG,
" Model: 4.2in (B V2) BWR-Mode");
2773 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2774 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2775 LOG_UPDATE_INTERVAL(
this);
2836 uint8_t temp1 = this->
buffer_[i];
2837 for (uint8_t j = 0; j < 8; j++) {
2867 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2868 ESP_LOGCONFIG(TAG,
" Model: 5.83in");
2870 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2871 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2872 LOG_UPDATE_INTERVAL(
this);
2948 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2949 ESP_LOGCONFIG(TAG,
" Model: 5.83inv2");
2951 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2952 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2953 LOG_UPDATE_INTERVAL(
this);
2973 if (this->old_buffer_ ==
nullptr) {
2974 ESP_LOGE(TAG,
"Could not allocate old buffer for display!");
2986void GDEY0583T81::power_on_() {
2987 if (!this->power_is_on_) {
2991 this->power_is_on_ =
true;
2992 this->is_deep_sleep_ =
false;
2995void GDEY0583T81::power_off_() {
2998 this->power_is_on_ =
false;
3002 if (this->is_deep_sleep_) {
3016 this->is_deep_sleep_ =
true;
3019void GDEY0583T81::reset_() {
3029void GDEY0583T81::init_full_() {
3030 this->init_display_();
3048void GDEY0583T81::init_partial_() {
3049 this->init_display_();
3060void GDEY0583T81::init_display_() {
3089 bool full_update = this->at_update_ == 0;
3093 this->init_partial_();
3137 this->old_buffer_[i] = this->
buffer_[i];
3146 ESP_LOGD(TAG,
"Full update done");
3150 ESP_LOGD(TAG,
"Partial update done, next full update after %" PRIu32
" cycles",
3151 this->full_update_every_ - this->at_update_ - 1);
3154 this->at_update_ = (this->at_update_ + 1) % this->full_update_every_;
3164 LOG_DISPLAY(
"",
"GoodDisplay E-Paper",
this);
3166 " Model: 5.83in B/W GDEY0583T81\n"
3167 " Full Update Every: %" PRIu32,
3168 this->full_update_every_);
3170 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3171 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3172 LOG_UPDATE_INTERVAL(
this);
3243 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
3244 ESP_LOGCONFIG(TAG,
" Model: 7.5in-bv2");
3246 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3247 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3248 LOG_UPDATE_INTERVAL(
this);
3261 ESP_LOGI(TAG,
"Timeout while displaying image!");
3326 uint8_t lut_vcom_7_i_n5_v2[] = {
3327 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0xF, 0x1, 0xF, 0x1, 0x2, 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
3328 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
3331 uint8_t lut_ww_7_i_n5_v2[] = {
3332 0x10, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x20, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
3333 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
3336 uint8_t lut_bw_7_i_n5_v2[] = {
3337 0x10, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x20, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
3338 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
3341 uint8_t lut_wb_7_i_n5_v2[] = {
3342 0x80, 0xF, 0xF, 0x0, 0x0, 0x3, 0x84, 0xF, 0x1, 0xF, 0x1, 0x4, 0x40, 0xF, 0xF, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0,
3343 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
3346 uint8_t lut_bb_7_i_n5_v2[] = {
3347 0x80, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x40, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
3348 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
3353 for (count = 0; count < 42; count++)
3354 this->
data(lut_vcom_7_i_n5_v2[count]);
3357 for (count = 0; count < 42; count++)
3358 this->
data(lut_ww_7_i_n5_v2[count]);
3361 for (count = 0; count < 42; count++)
3362 this->
data(lut_bw_7_i_n5_v2[count]);
3365 for (count = 0; count < 42; count++)
3366 this->
data(lut_wb_7_i_n5_v2[count]);
3369 for (count = 0; count < 42; count++)
3370 this->
data(lut_bb_7_i_n5_v2[count]);
3377 for (
uint32_t i = 0; i < buf_len; i++) {
3383 for (
uint32_t i = 0; i < buf_len; i++) {
3395 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
3396 ESP_LOGCONFIG(TAG,
" Model: 7.5in-bv3");
3398 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3399 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3400 LOG_UPDATE_INTERVAL(
this);
3413 ESP_LOGI(TAG,
"Timeout while displaying image!");
3477 for (
uint32_t i = 0; i < buf_len; i++) {
3483 for (
uint32_t i = 0; i < buf_len; i++) {
3495 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
3496 ESP_LOGCONFIG(TAG,
" Model: 7.5in-bv3 BWR-Mode");
3498 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3499 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3500 LOG_UPDATE_INTERVAL(
this);
3550 uint8_t temp1 = this->
buffer_[i];
3551 for (uint8_t j = 0; j < 8; j++) {
3578 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
3579 ESP_LOGCONFIG(TAG,
" Model: 7.5in");
3581 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3582 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3583 LOG_UPDATE_INTERVAL(
this);
3588namespace cmddata_5P65InF {
3597static const uint8_t R00_CMD_PSR[] = {0x00, 0xEF, 0x08};
3601static const uint8_t R01_CMD_PWR[] = {0x01, 0x07, 0x00, 0x00, 0x00};
3604static const uint8_t R02_CMD_POF[] = {0x02};
3608static const uint8_t R03_CMD_PFS[] = {0x03, 0x00};
3611static const uint8_t R04_CMD_PON[] = {0x04};
3614static const uint8_t R06_CMD_BTST[] = {0x06, 0xC7, 0xC7, 0x1D};
3619static const uint8_t R07_CMD_DSLP[] = {0x07, 0xA5};
3623static const uint8_t R10_CMD_DTM1[] = {0x10};
3626static const uint8_t R11_CMD_DSP[] = {0x11};
3629static const uint8_t R12_CMD_DRF[] = {0x12};
3632static const uint8_t R13_CMD_IPC[] = {0x13, 0x00};
3636static const uint8_t R30_CMD_PLL[] = {0x30, 0x3C};
3640static const uint8_t R41_CMD_TSE[] = {0x41, 0x00};
3645static const uint8_t R50_CMD_CDI[] = {0x50, 0x37};
3650static const uint8_t R60_CMD_TCON[] = {0x60, 0x22};
3655static const uint8_t R61_CMD_TRES[] = {0x61, 0x02, 0x58, 0x01, 0xC0};
3658static const uint8_t RE3_CMD_PWS[] = {0xE3, 0xAA};
3662 if (this->
buffers_[0] ==
nullptr) {
3663 ESP_LOGE(TAG,
"Buffer unavailable!");
3671 using namespace cmddata_5P65InF;
3673 this->
cmd_data(R00_CMD_PSR,
sizeof(R00_CMD_PSR));
3674 this->
cmd_data(R01_CMD_PWR,
sizeof(R01_CMD_PWR));
3675 this->
cmd_data(R03_CMD_PFS,
sizeof(R03_CMD_PFS));
3676 this->
cmd_data(R06_CMD_BTST,
sizeof(R06_CMD_BTST));
3677 this->
cmd_data(R30_CMD_PLL,
sizeof(R30_CMD_PLL));
3678 this->
cmd_data(R41_CMD_TSE,
sizeof(R41_CMD_TSE));
3679 this->
cmd_data(R50_CMD_CDI,
sizeof(R50_CMD_CDI));
3680 this->
cmd_data(R60_CMD_TCON,
sizeof(R60_CMD_TCON));
3681 this->
cmd_data(R61_CMD_TRES,
sizeof(R61_CMD_TRES));
3682 this->
cmd_data(RE3_CMD_PWS,
sizeof(RE3_CMD_PWS));
3685 this->
cmd_data(R50_CMD_CDI,
sizeof(R50_CMD_CDI));
3687 ESP_LOGI(TAG,
"Display initialized successfully");
3692 ESP_LOGI(TAG,
"Initialise the display");
3695 using namespace cmddata_5P65InF;
3698 ESP_LOGI(TAG,
"Sending data to the display");
3699 this->
cmd_data(R61_CMD_TRES,
sizeof(R61_CMD_TRES));
3700 this->
cmd_data(R10_CMD_DTM1,
sizeof(R10_CMD_DTM1));
3704 ESP_LOGI(TAG,
"Power on the display");
3705 this->
cmd_data(R04_CMD_PON,
sizeof(R04_CMD_PON));
3709 ESP_LOGI(TAG,
"Refresh the display");
3710 this->
cmd_data(R12_CMD_DRF,
sizeof(R12_CMD_DRF));
3714 ESP_LOGI(TAG,
"Power off the display");
3715 this->
cmd_data(R02_CMD_POF,
sizeof(R02_CMD_POF));
3719 ESP_LOGI(TAG,
"Set the display to deep sleep");
3720 this->
cmd_data(R07_CMD_DSLP,
sizeof(R07_CMD_DSLP));
3729 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
3730 ESP_LOGCONFIG(TAG,
" Model: 5.65in-F");
3732 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3733 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3734 LOG_UPDATE_INTERVAL(
this);
3745 ESP_LOGE(TAG,
"Timeout while displaying image!");
3755 if (this->
buffers_[0] ==
nullptr) {
3756 ESP_LOGE(TAG,
"Buffer unavailable!");
3855 ESP_LOGI(TAG,
"Display initialized successfully");
3859 ESP_LOGI(TAG,
"Initialise the display");
3863 ESP_LOGI(TAG,
"Sending data to the display");
3868 ESP_LOGI(TAG,
"Power on the display");
3873 ESP_LOGI(TAG,
"Refresh the display");
3879 ESP_LOGI(TAG,
"Power off the display");
3885 ESP_LOGI(TAG,
"Set the display to deep sleep");
3894 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
3895 ESP_LOGCONFIG(TAG,
" Model: 7.3in-F");
3897 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3898 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3899 LOG_UPDATE_INTERVAL(
this);
3909 ESP_LOGE(TAG,
"Timeout while displaying image!");
3927 ESP_LOGE(TAG,
"Timeout while displaying image!");
3982 ESP_LOGI(TAG,
"Power on the display and hat");
3994 for (
uint32_t i = 0; i < buf_len; i++) {
4006 ESP_LOGV(TAG,
"Before command(0x02) (>> power off)");
4009 ESP_LOGV(TAG,
"After command(0x02) (>> power off)");
4016 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
4017 ESP_LOGCONFIG(TAG,
" Model: 7.5inV2rev2");
4019 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
4020 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
4021 LOG_UPDATE_INTERVAL(
this);
4034 ESP_LOGI(TAG,
"Timeout while displaying image!");
4100 uint8_t lut_vcom_7_i_n5_v2[] = {
4101 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0xF, 0x1, 0xF, 0x1, 0x2, 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
4102 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4105 uint8_t lut_ww_7_i_n5_v2[] = {
4106 0x10, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x20, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
4107 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4110 uint8_t lut_bw_7_i_n5_v2[] = {
4111 0x10, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x20, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
4112 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4115 uint8_t lut_wb_7_i_n5_v2[] = {
4116 0x80, 0xF, 0xF, 0x0, 0x0, 0x3, 0x84, 0xF, 0x1, 0xF, 0x1, 0x4, 0x40, 0xF, 0xF, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0,
4117 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4120 uint8_t lut_bb_7_i_n5_v2[] = {
4121 0x80, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x40, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
4122 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4127 for (count = 0; count < 42; count++)
4128 this->
data(lut_vcom_7_i_n5_v2[count]);
4131 for (count = 0; count < 42; count++)
4132 this->
data(lut_ww_7_i_n5_v2[count]);
4135 for (count = 0; count < 42; count++)
4136 this->
data(lut_bw_7_i_n5_v2[count]);
4139 for (count = 0; count < 42; count++)
4140 this->
data(lut_wb_7_i_n5_v2[count]);
4143 for (count = 0; count < 42; count++)
4144 this->
data(lut_bb_7_i_n5_v2[count]);
4148 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
4149 ESP_LOGCONFIG(TAG,
" Model: 7.5inV2");
4151 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
4152 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
4153 LOG_UPDATE_INTERVAL(
this);
4166 ESP_LOGE(TAG,
"Timeout while displaying image!");
4175void WaveshareEPaper7P5InV2P::reset_() {
4186void WaveshareEPaper7P5InV2P::turn_on_display_() {
4252 ESP_LOGI(TAG,
"Power on the display and hat");
4260 for (
uint32_t i = 0; i < buf_len; i++) {
4264 this->turn_on_display_();
4284 for (
uint32_t i = 0; i < buf_len; i++) {
4293 for (
uint32_t i = 0; i < buf_len; i++) {
4300 this->turn_on_display_();
4325 for (
uint32_t i = 0; i < buf_len; i++) {
4332 this->turn_on_display_();
4335 ESP_LOGV(TAG,
"Before command(0x02) (>> power off)");
4338 ESP_LOGV(TAG,
"After command(0x02) (>> power off)");
4347 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
4349 " Model: 7.50inv2p\n"
4350 " Full Update Every: %" PRIu32,
4353 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
4354 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
4355 LOG_UPDATE_INTERVAL(
this);
4420 uint8_t eight_pixels = this->
buffer_[i];
4422 for (uint8_t j = 0; j < 8; j += 2) {
4426 uint8_t left_nibble = (eight_pixels & 0x80) ? 0x30 : 0x00;
4428 uint8_t right_nibble = (eight_pixels & 0x80) ? 0x03 : 0x00;
4430 this->
write_byte(left_nibble | right_nibble);
4449 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
4450 ESP_LOGCONFIG(TAG,
" Model: 7.5in-bc");
4452 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
4453 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
4454 LOG_UPDATE_INTERVAL(
this);
4550 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
4551 ESP_LOGCONFIG(TAG,
" Model: 7.5in-HD-b");
4553 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
4554 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
4555 LOG_UPDATE_INTERVAL(
this);
4558static const uint8_t LUT_SIZE_TTGO_DKE_PART = 153;
4560static const uint8_t PART_UPDATE_LUT_TTGO_DKE[LUT_SIZE_TTGO_DKE_PART] = {
4561 0x0, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4562 0x0, 0x0, 0x0, 0x0, 0x40, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0,
4563 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4564 0xF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4565 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4566 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4567 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4568 0x0, 0x0, 0x0, 0x0, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x0, 0x0, 0x0,
4578 ESP_LOGI(TAG,
"Performing partial e-paper update.");
4580 ESP_LOGI(TAG,
"Performing full e-paper update.");
4617 this->
write_array(PART_UPDATE_LUT_TTGO_DKE,
sizeof(PART_UPDATE_LUT_TTGO_DKE));
4669 ESP_LOGI(TAG,
"Completed e-paper update.");
4676 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
4677 ESP_LOGCONFIG(TAG,
" Model: 2.13inDKE");
4678 LOG_PIN(
" CS Pin: ", this->
cs_);
4680 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
4681 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
4682 LOG_UPDATE_INTERVAL(
this);
4720 this->
data(0 & 0xFF);
4721 this->
data((0 >> 8) & 0x03);
4726 this->
data(0 & 0xFF);
4727 this->
data((0 >> 8) & 0x03);
4740 this->
data(0 & 0xFF);
4741 this->
data((0 >> 8) & 0x03);
4744 this->
data(0 & 0xFF);
4745 this->
data((0 >> 8) & 0x03);
4764 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
4765 ESP_LOGCONFIG(TAG,
" Model: 13.3inK");
4767 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
4768 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
4769 LOG_UPDATE_INTERVAL(
this);
void feed_wdt()
Feed the task watchdog.
void status_set_warning()
void status_clear_warning()
virtual void digital_write(bool value)=0
virtual bool digital_read()=0
An STL allocator that uses SPI or internal RAM.
void deallocate(T *p, size_t n)
int get_width() override
Get the width of the image in pixels with rotation applied.
void init_internal_(uint32_t buffer_length)
int get_height() override
Get the height of the image in pixels with rotation applied.
virtual void clear()
Clear the entire screen by filling it with OFF pixels.
virtual void fill(Color color)
Fill the entire screen with the given color.
virtual int get_width_internal()=0
virtual int get_height_internal()=0
Rect get_clipping() const
Get the current the clipping rectangle.
void filled_rectangle(int x1, int y1, int width, int height, Color color=COLOR_ON)
Fill a rectangle with the top left point at [x1,y1] and the bottom right point at [x1+width,...
void spi_setup() override
void write_byte(uint8_t data)
void write_array(const uint8_t *data, size_t length)
void deep_sleep() override
int get_height_internal() override
int get_width_internal() override
void initialize() override
void dump_config() override
void set_full_update_every(uint32_t full_update_every)
void deep_sleep() override
int get_height_internal() override
void write_lut_(const uint8_t *lut, uint8_t size)
int get_width_internal() override
void dump_config() override
void initialize() override
int get_height_internal() override
void dump_config() override
int get_width_internal() override
void initialize() override
void set_full_update_every(uint32_t full_update_every)
int get_height_internal() override
uint32_t idle_timeout_() override
uint32_t full_update_every_
void dump_config() override
void initialize() override
void deep_sleep() override
int get_width_internal() override
int get_width_internal() override
void dump_config() override
void initialize() override
uint32_t idle_timeout_() override
void deep_sleep() override
void set_full_update_every(uint32_t full_update_every)
int get_height_internal() override
void initialize() override
uint32_t idle_timeout_() override
void dump_config() override
int get_height_internal() override
int get_width_internal() override
int get_height_internal() override
int get_width_internal() override
void deep_sleep() override
void initialize() override
void dump_config() override
uint32_t full_update_every_
int get_width_internal() override
void set_full_update_every(uint32_t full_update_every)
uint32_t idle_timeout_() override
int get_height_internal() override
void dump_config() override
void initialize() override
int get_width_internal() override
void deep_sleep() override
void dump_config() override
void initialize() override
int get_height_internal() override
int get_width_internal() override
void dump_config() override
int get_height_internal() override
void initialize() override
void initialize() override
void dump_config() override
int get_width_internal() override
int get_height_internal() override
int get_width_internal() override
void dump_config() override
int get_height_internal() override
void initialize() override
int get_height_internal() override
void initialize() override
void dump_config() override
int get_width_internal() override
void dump_config() override
int get_height_internal() override
void initialize() override
int get_width_internal() override
int get_height_internal() override
void dump_config() override
int get_width_internal() override
void initialize() override
void dump_config() override
int get_height_internal() override
int get_width_internal() override
void initialize() override
void set_full_update_every(uint32_t full_update_every)
uint32_t full_update_every_
int get_width_controller() override
int get_height_internal() override
void initialize() override
uint32_t full_update_every_
WaveshareEPaper2P9InV2R2()
int get_width_internal() override
void write_lut_(const uint8_t *lut, uint8_t size)
void dump_config() override
void set_full_update_every(uint32_t full_update_every)
void deep_sleep() override
int get_width_internal() override
void dump_config() override
void initialize() override
int get_height_internal() override
void initialize() override
void dump_config() override
int get_height_internal() override
int get_width_internal() override
void initialize() override
int get_height_internal() override
int get_width_internal() override
void dump_config() override
int get_width_internal() override
void initialize() override
void dump_config() override
uint32_t idle_timeout_() override
int get_height_internal() override
bool deep_sleep_between_updates_
bool wait_until_(WaitForState state)
int get_height_internal() override
int get_width_internal() override
void initialize() override
void dump_config() override
int get_width_internal() override
int get_height_internal() override
void initialize() override
void dump_config() override
void init_internal_7c_(uint32_t buffer_length)
void draw_absolute_pixel_internal(int x, int y, Color color) override
uint8_t * buffers_[NUM_BUFFERS]
uint8_t color_to_hex(Color color)
void fill(Color color) override
uint32_t get_buffer_length_() override
static const int NUM_BUFFERS
void initialize() override
bool deep_sleep_between_updates_
int get_height_internal() override
void dump_config() override
uint32_t idle_timeout_() override
int get_width_internal() override
void dump_config() override
void initialize() override
int get_height_internal() override
int get_width_internal() override
void dump_config() override
void deep_sleep() override
void initialize() override
int get_height_internal() override
int get_width_internal() override
void deep_sleep() override
void initialize() override
void dump_config() override
int get_width_internal() override
int get_height_internal() override
void deep_sleep() override
int get_height_internal() override
void dump_config() override
void initialize() override
int get_width_internal() override
void dump_config() override
int get_height_internal() override
void initialize() override
int get_width_internal() override
void dump_config() override
int get_height_internal() override
void initialize() override
int get_width_internal() override
int get_width_internal() override
uint32_t idle_timeout_() override
int get_height_internal() override
void initialize() override
void dump_config() override
void dump_config() override
int get_width_internal() override
int get_height_internal() override
void initialize() override
uint32_t idle_timeout_() override
void set_full_update_every(uint32_t full_update_every)
uint32_t full_update_every_
void dump_config() override
void initialize() override
uint32_t get_buffer_length_() override
void draw_absolute_pixel_internal(int x, int y, Color color) override
void fill(Color color) override
float get_setup_priority() const override
void command(uint8_t value)
virtual void initialize()=0
void on_safe_shutdown() override
void cmd_data(const uint8_t *data, size_t length)
virtual uint32_t idle_timeout_()
virtual int get_width_controller()
virtual void deep_sleep()=0
virtual uint32_t get_buffer_length_()=0
uint32_t get_buffer_length_() override
void fill(Color color) override
void draw_absolute_pixel_internal(int x, int y, Color color) override
int get_width_controller() override
void set_full_update_every(uint32_t full_update_every)
WaveshareEPaperTypeA(WaveshareEPaperTypeAModel model)
void write_lut_(const uint8_t *lut, uint8_t size)
uint32_t idle_timeout_() override
void dump_config() override
bool deep_sleep_between_updates_
int get_height_internal() override
void initialize() override
void deep_sleep() override
WaveshareEPaperTypeAModel model_
uint32_t full_update_every_
int get_width_internal() override
constexpr float PROCESSOR
For components that use data from sensors like displays.
WaveshareEPaperTypeAModel
@ WAVESHARE_EPAPER_2_9_IN
@ WAVESHARE_EPAPER_2_13_IN_V2
@ TTGO_EPAPER_2_13_IN_B73
@ TTGO_EPAPER_2_13_IN_B74
@ WAVESHARE_EPAPER_2_13_IN
@ WAVESHARE_EPAPER_2_9_IN_V2
@ WAVESHARE_EPAPER_1_54_IN
@ WAVESHARE_EPAPER_1_54_IN_V2
void IRAM_ATTR HOT delayMicroseconds(uint32_t us)
void HOT delay(uint32_t ms)
uint32_t IRAM_ATTR HOT millis()
Application App
Global storage of Application pointer - only one Application can exist.
bool is_on() ESPHOME_ALWAYS_INLINE