8 namespace waveshare_epaper {
10 static const char *
const TAG =
"waveshare_epaper";
12 static const uint8_t LUT_SIZE_WAVESHARE = 30;
14 static 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};
18 static 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};
22 static const uint8_t LUT_SIZE_TTGO = 70;
24 static 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,
39 static 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,
54 static const uint8_t LUT_SIZE_TTGO_B73 = 100;
56 static 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,
66 static 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,
76 static const uint8_t LUT_SIZE_TTGO_B1 = 29;
78 static 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};
82 static 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};
88 static const uint8_t PARTIAL_UPD_2IN9_LUT_SIZE = 159;
89 static 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,
156 const uint32_t start =
millis();
159 ESP_LOGE(TAG,
"Timeout while displaying image!");
172 const uint8_t
fill = color.
is_on() ? 0x00 : 0xFF;
181 const uint8_t subpos = x & 0x07;
183 if (!color.
is_on()) {
184 this->
buffer_[pos] |= 0x80 >> subpos;
186 this->
buffer_[pos] &= ~(0x80 >> subpos);
207 const uint8_t subpos = x & 0x07;
210 this->
buffer_[pos] |= 0x80 >> subpos;
212 this->
buffer_[pos] &= ~(0x80 >> subpos);
216 if (((color.
red > 0) && (color.
green == 0) && (color.
blue == 0))) {
217 this->
buffer_[pos + buf_half_len] |= 0x80 >> subpos;
219 this->
buffer_[pos + buf_half_len] &= ~(0x80 >> subpos);
241 this->init_display_();
245 switch (this->model_) {
249 this->deep_sleep_between_updates_ =
true;
250 ESP_LOGI(TAG,
"Set the display to deep sleep");
298 switch (this->model_) {
315 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
316 switch (this->model_) {
318 ESP_LOGCONFIG(TAG,
" Model: 1.54in");
321 ESP_LOGCONFIG(TAG,
" Model: 1.54inV2");
324 ESP_LOGCONFIG(TAG,
" Model: 2.13in");
327 ESP_LOGCONFIG(TAG,
" Model: 2.13inV2");
330 ESP_LOGCONFIG(TAG,
" Model: 2.13in (TTGO)");
333 ESP_LOGCONFIG(TAG,
" Model: 2.13in (TTGO B73)");
336 ESP_LOGCONFIG(TAG,
" Model: 2.13in (TTGO B74)");
339 ESP_LOGCONFIG(TAG,
" Model: 2.13in (TTGO B1)");
342 ESP_LOGCONFIG(TAG,
" Model: 2.9in");
345 ESP_LOGCONFIG(TAG,
" Model: 2.9inV2");
348 ESP_LOGCONFIG(TAG,
" Full Update Every: %" PRIu32, this->full_update_every_);
350 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
352 LOG_UPDATE_INTERVAL(
this);
355 bool full_update = this->at_update_ == 0;
356 bool prev_full_update = this->at_update_ == 1;
358 if (this->deep_sleep_between_updates_) {
359 ESP_LOGI(TAG,
"Wake up the display");
362 this->init_display_();
370 if (this->full_update_every_ >= 1) {
371 if (full_update != prev_full_update) {
372 switch (this->model_) {
376 this->write_lut_(full_update ? FULL_UPDATE_LUT_TTGO : PARTIAL_UPDATE_LUT_TTGO, LUT_SIZE_TTGO);
379 this->write_lut_(full_update ? FULL_UPDATE_LUT_TTGO_B73 : PARTIAL_UPDATE_LUT_TTGO_B73, LUT_SIZE_TTGO_B73);
385 this->write_lut_(full_update ? FULL_UPDATE_LUT_TTGO_B1 : PARTIAL_UPDATE_LUT_TTGO_B1, LUT_SIZE_TTGO_B1);
388 this->write_lut_(full_update ? FULL_UPDATE_LUT : PARTIAL_UPDATE_LUT, LUT_SIZE_WAVESHARE);
391 this->at_update_ = (this->at_update_ + 1) % this->full_update_every_;
397 this->
data(full_update ? 0x55 : 0x26);
416 switch (this->model_) {
419 this->
data(full_update ? 0x05 : 0x80);
423 this->
data(full_update ? 0x03 : 0x01);
430 switch (this->model_) {
481 switch (this->model_) {
485 for (
int j = 0; j < wb; j++) {
507 switch (this->model_) {
511 this->
data(full_update ? 0xF7 : 0xFF);
517 this->
data(full_update ? 0xC7 : 0x0C);
531 if (this->deep_sleep_between_updates_) {
532 ESP_LOGI(TAG,
"Set the display back to deep sleep");
537 switch (this->model_) {
556 switch (this->model_) {
569 switch (this->model_) {
589 for (uint8_t i = 0; i < size; i++)
616 static const uint8_t LUT_VCOM_DC_2_7[44] = {
617 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x00, 0x32, 0x32, 0x00, 0x00, 0x02, 0x00,
618 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
619 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
622 static const uint8_t LUT_WHITE_TO_WHITE_2_7[42] = {
623 0x50, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x60, 0x32, 0x32, 0x00, 0x00, 0x02, 0xA0, 0x0F,
624 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
625 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
628 static const uint8_t LUT_BLACK_TO_WHITE_2_7[42] = {
629 0x50, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x60, 0x32, 0x32, 0x00, 0x00, 0x02, 0xA0, 0x0F,
630 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
631 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
634 static const uint8_t LUT_WHITE_TO_BLACK_2_7[] = {
635 0xA0, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x60, 0x32, 0x32, 0x00, 0x00, 0x02, 0x50, 0x0F,
636 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
637 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
640 static const uint8_t LUT_BLACK_TO_BLACK_2_7[42] = {
641 0xA0, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x60, 0x32, 0x32, 0x00, 0x00, 0x02, 0x50, 0x0F,
642 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
643 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
706 for (uint8_t i : LUT_VCOM_DC_2_7)
711 for (uint8_t i : LUT_WHITE_TO_WHITE_2_7)
715 for (uint8_t i : LUT_BLACK_TO_WHITE_2_7)
719 for (uint8_t i : LUT_WHITE_TO_BLACK_2_7)
723 for (uint8_t i : LUT_BLACK_TO_BLACK_2_7)
732 for (uint32_t i = 0; i < buf_len; i++) {
740 for (uint32_t i = 0; i < buf_len; i++) {
750 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
751 ESP_LOGCONFIG(TAG,
" Model: 2.7in");
753 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
755 LOG_UPDATE_INTERVAL(
this);
803 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
804 ESP_LOGCONFIG(TAG,
" Model: 2.7in V2");
806 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
808 LOG_UPDATE_INTERVAL(
this);
818 static const uint8_t LUT_VCOM_DC_2_7B[44] = {0x00, 0x00, 0x00, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x0A,
819 0x00, 0x00, 0x08, 0x00, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x00, 0x0A,
820 0x0A, 0x00, 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x05, 0x00,
821 0x03, 0x0E, 0x00, 0x00, 0x0A, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01};
823 static const uint8_t LUT_WHITE_TO_WHITE_2_7B[42] = {0x90, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x40, 0x0A, 0x0A, 0x00, 0x00,
824 0x08, 0x84, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x80, 0x0A, 0x0A, 0x00,
825 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x05, 0x00, 0x03, 0x0E,
826 0x00, 0x00, 0x0A, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01};
828 static const uint8_t LUT_BLACK_TO_WHITE_2_7B[42] = {0xA0, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x0A, 0x00, 0x00,
829 0x08, 0x84, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x90, 0x0A, 0x0A, 0x00,
830 0x00, 0x08, 0xB0, 0x04, 0x10, 0x00, 0x00, 0x05, 0xB0, 0x03, 0x0E,
831 0x00, 0x00, 0x0A, 0xC0, 0x23, 0x00, 0x00, 0x00, 0x01};
833 static const uint8_t LUT_WHITE_TO_BLACK_2_7B[] = {0x90, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x20, 0x0A, 0x0A, 0x00, 0x00,
834 0x08, 0x84, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x10, 0x0A, 0x0A, 0x00,
835 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x05, 0x00, 0x03, 0x0E,
836 0x00, 0x00, 0x0A, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01};
838 static const uint8_t LUT_BLACK_TO_BLACK_2_7B[42] = {0x90, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x40, 0x0A, 0x0A, 0x00, 0x00,
839 0x08, 0x84, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x80, 0x0A, 0x0A, 0x00,
840 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x05, 0x00, 0x03, 0x0E,
841 0x00, 0x00, 0x0A, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01};
900 for (uint8_t i : LUT_VCOM_DC_2_7B)
904 for (uint8_t i : LUT_WHITE_TO_WHITE_2_7B)
908 for (uint8_t i : LUT_BLACK_TO_WHITE_2_7B)
912 for (uint8_t i : LUT_WHITE_TO_BLACK_2_7B) {
918 for (uint8_t i : LUT_BLACK_TO_BLACK_2_7B) {
939 for (uint32_t i = 0; i < buf_len_half; i++) {
948 for (uint32_t i = buf_len_half; i < buf_len_half * 2u; i++) {
964 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
965 ESP_LOGCONFIG(TAG,
" Model: 2.7in B");
967 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
969 LOG_UPDATE_INTERVAL(
this);
1001 this->
data((xend >> 3) & 0xff);
1006 this->
data(yend & 0xff);
1007 this->
data((yend >> 8) & 0xff);
1022 for (uint32_t i = 0; i < buf_len; i++) {
1030 for (uint32_t i = 0; i < buf_len; i++) {
1043 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1044 ESP_LOGCONFIG(TAG,
" Model: 2.7in B V2");
1046 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1047 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1048 LOG_UPDATE_INTERVAL(
this);
1122 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1123 ESP_LOGCONFIG(TAG,
" Model: 2.9in (B)");
1125 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1126 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1127 LOG_UPDATE_INTERVAL(
this);
1133 static const uint8_t LUT_SIZE_DKE = 70;
1134 static const uint8_t UPDATE_LUT_DKE[LUT_SIZE_DKE] = {
1135 0xA0, 0x90, 0x50, 0x0, 0x0, 0x0, 0x0, 0x50, 0x90, 0xA0, 0x0, 0x0, 0x0, 0x0, 0xA0, 0x90, 0x50, 0x0,
1136 0x0, 0x0, 0x0, 0x50, 0x90, 0xA0, 0x0, 0x0, 0x0, 0x0, 0x00, 0x00, 0x00, 0x0, 0x0, 0x0, 0x0, 0xF,
1137 0xF, 0x0, 0x0, 0x0, 0xF, 0xF, 0x0, 0x0, 0x02, 0xF, 0xF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1138 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1140 static const uint8_t PART_UPDATE_LUT_DKE[LUT_SIZE_DKE] = {
1141 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xa0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x10, 0x00, 0x00,
1142 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
1143 0x05, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1144 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
1145 static const uint8_t FULL_UPDATE_LUT_DKE[LUT_SIZE_DKE] = {
1146 0x90, 0x50, 0xa0, 0x50, 0x50, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa0, 0xa0, 0x80, 0x00, 0x90, 0x50, 0xa0, 0x50,
1147 0x50, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa0, 0xa0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17,
1148 0x04, 0x00, 0x00, 0x00, 0x0b, 0x04, 0x00, 0x00, 0x00, 0x06, 0x05, 0x00, 0x00, 0x00, 0x04, 0x05, 0x00, 0x00,
1149 0x00, 0x01, 0x0e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
1213 for (uint8_t v : FULL_UPDATE_LUT_DKE)
1218 ESP_LOGI(TAG,
"Performing e-paper update.");
1244 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1245 ESP_LOGCONFIG(TAG,
" Model: 2.9in DKE");
1247 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1248 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1249 LOG_UPDATE_INTERVAL(
this);
1316 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1317 ESP_LOGCONFIG(TAG,
" Model: 2.9in (B) V3");
1319 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1320 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1321 LOG_UPDATE_INTERVAL(
this);
1372 void WaveshareEPaper2P9InV2R2::reset_() {
1384 ESP_LOGE(TAG,
"fail idle 1");
1423 this->
write_lut_(PARTIAL_UPD_2IN9_LUT, PARTIAL_UPD_2IN9_LUT_SIZE);
1445 ESP_LOGE(TAG,
"fail idle 2");
1484 for (uint8_t i = 0; i < size; i++)
1489 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1490 ESP_LOGCONFIG(TAG,
" Model: 2.9inV2R2");
1493 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1494 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1495 LOG_UPDATE_INTERVAL(
this);
1553 this->
data(0b10011111);
1586 LOG_DISPLAY(
"",
"Waveshare E-Paper (Good Display)",
this);
1587 ESP_LOGCONFIG(TAG,
" Model: 2.9in Greyscale GDEW029T5");
1589 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1590 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1591 LOG_UPDATE_INTERVAL(
this);
1611 if (this->lastbuff_ !=
nullptr) {
1617 void GDEW0154M09::reset_() {
1627 void GDEW0154M09::init_internal_() {
1638 const uint8_t panel_setting_1 = 0b11011111;
1645 const uint8_t panel_setting_2 = 0b01110;
1647 const uint8_t wf_t0154_cz_b3_list[] = {
1649 CMD_PSR_PANEL_SETTING, 2, panel_setting_1, panel_setting_2,
1650 CMD_UNDOCUMENTED_0x4D, 1, 0x55,
1651 CMD_UNDOCUMENTED_0xAA, 1, 0x0f,
1652 CMD_UNDOCUMENTED_0xE9, 1, 0x02,
1653 CMD_UNDOCUMENTED_0xB6, 1, 0x11,
1654 CMD_UNDOCUMENTED_0xF3, 1, 0x0a,
1655 CMD_TRES_RESOLUTION_SETTING, 3, 0xc8, 0x00, 0xc8,
1656 CMD_TCON_TCONSETTING, 1, 0x00,
1657 CMD_CDI_VCOM_DATA_INTERVAL, 1, 0xd7,
1658 CMD_PWS_POWER_SAVING, 1, 0x00,
1663 this->write_init_list_(wf_t0154_cz_b3_list);
1668 void GDEW0154M09::write_init_list_(
const uint8_t *list) {
1669 uint8_t list_limit = list[0];
1670 uint8_t *start_ptr = ((uint8_t *) list + 1);
1671 for (uint8_t i = 0; i < list_limit; i++) {
1672 this->
command(*(start_ptr + 0));
1673 for (uint8_t dnum = 0; dnum < *(start_ptr + 1); dnum++) {
1674 this->
data(*(start_ptr + 2 + dnum));
1676 start_ptr += (*(start_ptr + 1) + 2);
1680 void GDEW0154M09::clear_() {
1682 for (uint8_t j = 0; j < 2; j++) {
1683 this->
command(CMD_DTM1_DATA_START_TRANS);
1684 for (
int count = 0; count < pixsize; count++) {
1687 this->
command(CMD_DTM2_DATA_START_TRANS2);
1688 for (
int count = 0; count < pixsize; count++) {
1691 this->
command(CMD_DISPLAY_REFRESH);
1700 this->
command(CMD_DTM1_DATA_START_TRANS);
1704 this->
command(CMD_DTM2_DATA_START_TRANS2);
1708 this->
command(CMD_DISPLAY_REFRESH);
1716 this->
command(CMD_POF_POWER_OFF);
1719 this->
command(CMD_DSLP_DEEP_SLEEP);
1720 this->
data(DATA_DSLP_DEEP_SLEEP);
1726 LOG_DISPLAY(
"",
"M5Stack CoreInk E-Paper (Good Display)",
this);
1727 ESP_LOGCONFIG(TAG,
" Model: 1.54in Greyscale GDEW0154M09");
1729 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1730 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1731 LOG_UPDATE_INTERVAL(
this);
1734 static const uint8_t LUT_VCOM_DC_4_2[] = {
1735 0x00, 0x17, 0x00, 0x00, 0x00, 0x02, 0x00, 0x17, 0x17, 0x00, 0x00, 0x02, 0x00, 0x0A, 0x01,
1736 0x00, 0x00, 0x01, 0x00, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1737 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1739 static const uint8_t LUT_WHITE_TO_WHITE_4_2[] = {
1740 0x40, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x40, 0x0A,
1741 0x01, 0x00, 0x00, 0x01, 0xA0, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
1742 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1744 static const uint8_t LUT_BLACK_TO_WHITE_4_2[] = {
1745 0x40, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x40, 0x0A,
1746 0x01, 0x00, 0x00, 0x01, 0xA0, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
1747 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1750 static const uint8_t LUT_BLACK_TO_BLACK_4_2[] = {
1751 0x80, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x80, 0x0A,
1752 0x01, 0x00, 0x00, 0x01, 0x50, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
1753 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1756 static const uint8_t LUT_WHITE_TO_BLACK_4_2[] = {
1757 0x80, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x80, 0x0A,
1758 0x01, 0x00, 0x00, 0x01, 0x50, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
1759 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1794 for (uint8_t i : LUT_VCOM_DC_4_2)
1798 for (uint8_t i : LUT_WHITE_TO_WHITE_4_2)
1802 for (uint8_t i : LUT_BLACK_TO_WHITE_4_2)
1806 for (uint8_t i : LUT_WHITE_TO_BLACK_4_2)
1810 for (uint8_t i : LUT_BLACK_TO_BLACK_4_2)
1848 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1849 ESP_LOGCONFIG(TAG,
" Model: 4.2in");
1851 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1852 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1853 LOG_UPDATE_INTERVAL(
this);
1904 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1905 ESP_LOGCONFIG(TAG,
" Model: 4.2in (B V2)");
1907 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1908 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1909 LOG_UPDATE_INTERVAL(
this);
1970 uint8_t temp1 = this->
buffer_[i];
1971 for (uint8_t j = 0; j < 8; j++) {
2001 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2002 ESP_LOGCONFIG(TAG,
" Model: 5.83in");
2004 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2005 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2006 LOG_UPDATE_INTERVAL(
this);
2082 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2083 ESP_LOGCONFIG(TAG,
" Model: 5.83inv2");
2085 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2086 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2087 LOG_UPDATE_INTERVAL(
this);
2158 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2159 ESP_LOGCONFIG(TAG,
" Model: 7.5in-bv2");
2161 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2162 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2163 LOG_UPDATE_INTERVAL(
this);
2172 const uint32_t start =
millis();
2176 ESP_LOGI(TAG,
"Timeout while displaying image!");
2241 uint8_t lut_vcom_7_i_n5_v2[] = {
2242 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0xF, 0x1, 0xF, 0x1, 0x2, 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
2243 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2246 uint8_t lut_ww_7_i_n5_v2[] = {
2247 0x10, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x20, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
2248 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2251 uint8_t lut_bw_7_i_n5_v2[] = {
2252 0x10, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x20, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
2253 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2256 uint8_t lut_wb_7_i_n5_v2[] = {
2257 0x80, 0xF, 0xF, 0x0, 0x0, 0x3, 0x84, 0xF, 0x1, 0xF, 0x1, 0x4, 0x40, 0xF, 0xF, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0,
2258 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2261 uint8_t lut_bb_7_i_n5_v2[] = {
2262 0x80, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x40, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
2263 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2268 for (count = 0; count < 42; count++)
2269 this->
data(lut_vcom_7_i_n5_v2[count]);
2272 for (count = 0; count < 42; count++)
2273 this->
data(lut_ww_7_i_n5_v2[count]);
2276 for (count = 0; count < 42; count++)
2277 this->
data(lut_bw_7_i_n5_v2[count]);
2280 for (count = 0; count < 42; count++)
2281 this->
data(lut_wb_7_i_n5_v2[count]);
2284 for (count = 0; count < 42; count++)
2285 this->
data(lut_bb_7_i_n5_v2[count]);
2292 for (uint32_t i = 0; i < buf_len; i++) {
2298 for (uint32_t i = 0; i < buf_len; i++) {
2310 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2311 ESP_LOGCONFIG(TAG,
" Model: 7.5in-bv3");
2313 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2314 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2315 LOG_UPDATE_INTERVAL(
this);
2365 uint8_t temp1 = this->
buffer_[i];
2366 for (uint8_t j = 0; j < 8; j++) {
2393 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2394 ESP_LOGCONFIG(TAG,
" Model: 7.5in");
2396 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2397 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2398 LOG_UPDATE_INTERVAL(
this);
2405 const uint32_t start =
millis();
2409 ESP_LOGE(TAG,
"Timeout while displaying image!");
2464 ESP_LOGI(TAG,
"Power on the display and hat");
2476 for (uint32_t i = 0; i < buf_len; i++) {
2488 ESP_LOGV(TAG,
"Before command(0x02) (>> power off)");
2491 ESP_LOGV(TAG,
"After command(0x02) (>> power off)");
2498 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2499 ESP_LOGCONFIG(TAG,
" Model: 7.5inV2rev2");
2501 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2502 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2503 LOG_UPDATE_INTERVAL(
this);
2512 const uint32_t start =
millis();
2516 ESP_LOGI(TAG,
"Timeout while displaying image!");
2582 uint8_t lut_vcom_7_i_n5_v2[] = {
2583 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0xF, 0x1, 0xF, 0x1, 0x2, 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
2584 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2587 uint8_t lut_ww_7_i_n5_v2[] = {
2588 0x10, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x20, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
2589 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2592 uint8_t lut_bw_7_i_n5_v2[] = {
2593 0x10, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x20, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
2594 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2597 uint8_t lut_wb_7_i_n5_v2[] = {
2598 0x80, 0xF, 0xF, 0x0, 0x0, 0x3, 0x84, 0xF, 0x1, 0xF, 0x1, 0x4, 0x40, 0xF, 0xF, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0,
2599 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2602 uint8_t lut_bb_7_i_n5_v2[] = {
2603 0x80, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x40, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
2604 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2609 for (count = 0; count < 42; count++)
2610 this->
data(lut_vcom_7_i_n5_v2[count]);
2613 for (count = 0; count < 42; count++)
2614 this->
data(lut_ww_7_i_n5_v2[count]);
2617 for (count = 0; count < 42; count++)
2618 this->
data(lut_bw_7_i_n5_v2[count]);
2621 for (count = 0; count < 42; count++)
2622 this->
data(lut_wb_7_i_n5_v2[count]);
2625 for (count = 0; count < 42; count++)
2626 this->
data(lut_bb_7_i_n5_v2[count]);
2630 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2631 ESP_LOGCONFIG(TAG,
" Model: 7.5inV2");
2633 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2634 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2635 LOG_UPDATE_INTERVAL(
this);
2697 uint8_t eight_pixels = this->
buffer_[i];
2699 for (uint8_t j = 0; j < 8; j += 2) {
2703 uint8_t left_nibble = (eight_pixels & 0x80) ? 0x30 : 0x00;
2705 uint8_t right_nibble = (eight_pixels & 0x80) ? 0x03 : 0x00;
2707 this->
write_byte(left_nibble | right_nibble);
2726 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2727 ESP_LOGCONFIG(TAG,
" Model: 7.5in-bc");
2729 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2730 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2731 LOG_UPDATE_INTERVAL(
this);
2827 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2828 ESP_LOGCONFIG(TAG,
" Model: 7.5in-HD-b");
2830 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2831 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2832 LOG_UPDATE_INTERVAL(
this);
2835 static const uint8_t LUT_SIZE_TTGO_DKE_PART = 153;
2837 static const uint8_t PART_UPDATE_LUT_TTGO_DKE[LUT_SIZE_TTGO_DKE_PART] = {
2838 0x0, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2839 0x0, 0x0, 0x0, 0x0, 0x40, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0,
2840 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2841 0xF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2842 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2843 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2844 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2845 0x0, 0x0, 0x0, 0x0, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x0, 0x0, 0x0,
2855 ESP_LOGI(TAG,
"Performing partial e-paper update.");
2857 ESP_LOGI(TAG,
"Performing full e-paper update.");
2894 this->
write_array(PART_UPDATE_LUT_TTGO_DKE,
sizeof(PART_UPDATE_LUT_TTGO_DKE));
2946 ESP_LOGI(TAG,
"Completed e-paper update.");
2953 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2954 ESP_LOGCONFIG(TAG,
" Model: 2.13inDKE");
2955 LOG_PIN(
" CS Pin: ", this->
cs_);
2957 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2958 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2959 LOG_UPDATE_INTERVAL(
this);
2997 this->
data(0 & 0xFF);
2998 this->
data((0 >> 8) & 0x03);
3003 this->
data(0 & 0xFF);
3004 this->
data((0 >> 8) & 0x03);
3017 this->
data(0 & 0xFF);
3018 this->
data((0 >> 8) & 0x03);
3021 this->
data(0 & 0xFF);
3022 this->
data((0 >> 8) & 0x03);
3041 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
3042 ESP_LOGCONFIG(TAG,
" Model: 13.3inK");
3044 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3045 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3046 LOG_UPDATE_INTERVAL(
this);
void initialize() override
int get_width_internal() override
virtual void digital_write(bool value)=0
void dump_config() override
void set_full_update_every(uint32_t full_update_every)
int get_height_internal() override
void on_safe_shutdown() override
void dump_config() override
int get_width() override
Get the width of the image in pixels with rotation applied.
int get_height_internal() override
float get_setup_priority() const override
void initialize() override
int get_width_internal() override
int get_height_internal() override
void dump_config() override
void status_set_warning(const char *message="unspecified")
void deep_sleep() override
void draw_absolute_pixel_internal(int x, int y, Color color) override
void dump_config() override
void dump_config() override
void dump_config() override
void write_lut_(const uint8_t *lut, uint8_t size)
void spi_setup() override
void dump_config() override
int get_width_internal() override
uint32_t idle_timeout_() override
void deep_sleep() override
void draw_absolute_pixel_internal(int x, int y, Color color) override
void initialize() override
int get_height_internal() override
void initialize() override
int get_height_internal() override
void dump_config() override
void set_full_update_every(uint32_t full_update_every)
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...
int get_width_internal() override
int get_width_internal() override
WaveshareEPaperTypeA(WaveshareEPaperTypeAModel model)
void fill(Color color) override
virtual void fill(Color color)
Fill the entire screen with the given color.
int get_width_internal() override
void write_byte(uint8_t data)
int get_width_internal() override
void fill(Color color) override
virtual int get_width_controller()
bool is_on() ESPHOME_ALWAYS_INLINE
uint32_t IRAM_ATTR HOT millis()
void initialize() override
int get_width_internal() override
uint32_t idle_timeout_() override
int get_width_internal() override
uint32_t idle_timeout_() override
void initialize() override
void init_internal_(uint32_t buffer_length)
int get_width_internal() override
uint32_t idle_timeout_() override
void initialize() override
int get_width_internal() override
virtual int get_height_internal()=0
int get_width_controller() override
void dump_config() override
void initialize() override
void initialize() override
void dump_config() override
int get_width_internal() override
void dump_config() override
int get_height_internal() override
WaveshareEPaperTypeAModel model_
void dump_config() override
void initialize() override
int get_height() override
Get the height of the image in pixels with rotation applied.
uint32_t get_buffer_length_() override
void dump_config() override
virtual uint32_t get_buffer_length_()=0
int get_width_internal() override
int get_width_internal() override
void initialize() override
WaveshareEPaperTypeAModel
void status_clear_warning()
virtual int get_width_internal()=0
void dump_config() override
void dump_config() override
void initialize() override
void deep_sleep() override
int get_height_internal() override
const float PROCESSOR
For components that use data from sensors like displays.
void dump_config() override
int get_width_internal() override
Application App
Global storage of Application pointer - only one Application can exist.
int get_height_internal() override
int get_height_internal() override
int get_height_internal() override
int get_width_internal() override
void dump_config() override
int get_width_internal() override
virtual bool digital_read()=0
void initialize() override
int get_height_internal() override
void write_lut_(const uint8_t *lut, uint8_t size)
void initialize() override
void initialize() override
virtual void deep_sleep()=0
void dump_config() override
int get_height_internal() override
int get_height_internal() override
void dump_config() override
void initialize() override
virtual uint32_t idle_timeout_()
int get_width_internal() override
void dump_config() override
WaveshareEPaper2P9InV2R2()
void write_array(const uint8_t *data, size_t length)
int get_width_internal() override
int get_width_internal() override
void initialize() override
int get_height_internal() override
void initialize() override
int get_height_internal() override
int get_height_internal() override
Implementation of SPI Controller mode.
int get_width_internal() override
void initialize() override
void IRAM_ATTR HOT delayMicroseconds(uint32_t us)
void initialize() override
void command(uint8_t value)
void initialize() override
int get_height_internal() override
void dump_config() override
uint32_t full_update_every_
void initialize() override
int get_width_internal() override
void set_full_update_every(uint32_t full_update_every)
int get_height_internal() override
int get_width_controller() override
int get_height_internal() override
int get_height_internal() override
int get_height_internal() override
void initialize() override
void dump_config() override
void dump_config() override
uint32_t get_buffer_length_() override
int get_height_internal() override
void set_full_update_every(uint32_t full_update_every)
int get_width_internal() override
int get_height_internal() override
void cmd_data(const uint8_t *data, size_t length)
void dump_config() override
void IRAM_ATTR HOT delay(uint32_t ms)
void initialize() override