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);
866 for (uint32_t i = 0; i < buf_len_half; i++) {
874 for (uint32_t i = buf_len_half; i < buf_len_half * 2u; i++) {
887 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
888 ESP_LOGCONFIG(TAG,
" Model: 1.54in V2 B");
890 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
892 LOG_UPDATE_INTERVAL(
this);
902 static const uint8_t LUT_VCOM_DC_2_7B[44] = {0x00, 0x00, 0x00, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x0A,
903 0x00, 0x00, 0x08, 0x00, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x00, 0x0A,
904 0x0A, 0x00, 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x05, 0x00,
905 0x03, 0x0E, 0x00, 0x00, 0x0A, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01};
907 static const uint8_t LUT_WHITE_TO_WHITE_2_7B[42] = {0x90, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x40, 0x0A, 0x0A, 0x00, 0x00,
908 0x08, 0x84, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x80, 0x0A, 0x0A, 0x00,
909 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x05, 0x00, 0x03, 0x0E,
910 0x00, 0x00, 0x0A, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01};
912 static const uint8_t LUT_BLACK_TO_WHITE_2_7B[42] = {0xA0, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x0A, 0x00, 0x00,
913 0x08, 0x84, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x90, 0x0A, 0x0A, 0x00,
914 0x00, 0x08, 0xB0, 0x04, 0x10, 0x00, 0x00, 0x05, 0xB0, 0x03, 0x0E,
915 0x00, 0x00, 0x0A, 0xC0, 0x23, 0x00, 0x00, 0x00, 0x01};
917 static const uint8_t LUT_WHITE_TO_BLACK_2_7B[] = {0x90, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x20, 0x0A, 0x0A, 0x00, 0x00,
918 0x08, 0x84, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x10, 0x0A, 0x0A, 0x00,
919 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x05, 0x00, 0x03, 0x0E,
920 0x00, 0x00, 0x0A, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01};
922 static const uint8_t LUT_BLACK_TO_BLACK_2_7B[42] = {0x90, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x40, 0x0A, 0x0A, 0x00, 0x00,
923 0x08, 0x84, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x80, 0x0A, 0x0A, 0x00,
924 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x05, 0x00, 0x03, 0x0E,
925 0x00, 0x00, 0x0A, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01};
984 for (uint8_t i : LUT_VCOM_DC_2_7B)
988 for (uint8_t i : LUT_WHITE_TO_WHITE_2_7B)
992 for (uint8_t i : LUT_BLACK_TO_WHITE_2_7B)
996 for (uint8_t i : LUT_WHITE_TO_BLACK_2_7B) {
1002 for (uint8_t i : LUT_BLACK_TO_BLACK_2_7B) {
1023 for (uint32_t i = 0; i < buf_len_half; i++) {
1032 for (uint32_t i = buf_len_half; i < buf_len_half * 2u; i++) {
1048 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1049 ESP_LOGCONFIG(TAG,
" Model: 2.7in B");
1051 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1052 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1053 LOG_UPDATE_INTERVAL(
this);
1085 this->
data((xend >> 3) & 0xff);
1090 this->
data(yend & 0xff);
1091 this->
data((yend >> 8) & 0xff);
1106 for (uint32_t i = 0; i < buf_len; i++) {
1114 for (uint32_t i = 0; i < buf_len; i++) {
1127 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1128 ESP_LOGCONFIG(TAG,
" Model: 2.7in B V2");
1130 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1131 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1132 LOG_UPDATE_INTERVAL(
this);
1206 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1207 ESP_LOGCONFIG(TAG,
" Model: 2.9in (B)");
1209 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1210 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1211 LOG_UPDATE_INTERVAL(
this);
1217 static const uint8_t LUT_SIZE_DKE = 70;
1218 static const uint8_t UPDATE_LUT_DKE[LUT_SIZE_DKE] = {
1219 0xA0, 0x90, 0x50, 0x0, 0x0, 0x0, 0x0, 0x50, 0x90, 0xA0, 0x0, 0x0, 0x0, 0x0, 0xA0, 0x90, 0x50, 0x0,
1220 0x0, 0x0, 0x0, 0x50, 0x90, 0xA0, 0x0, 0x0, 0x0, 0x0, 0x00, 0x00, 0x00, 0x0, 0x0, 0x0, 0x0, 0xF,
1221 0xF, 0x0, 0x0, 0x0, 0xF, 0xF, 0x0, 0x0, 0x02, 0xF, 0xF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1222 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1224 static const uint8_t PART_UPDATE_LUT_DKE[LUT_SIZE_DKE] = {
1225 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xa0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x10, 0x00, 0x00,
1226 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
1227 0x05, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1228 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
1229 static const uint8_t FULL_UPDATE_LUT_DKE[LUT_SIZE_DKE] = {
1230 0x90, 0x50, 0xa0, 0x50, 0x50, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa0, 0xa0, 0x80, 0x00, 0x90, 0x50, 0xa0, 0x50,
1231 0x50, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa0, 0xa0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17,
1232 0x04, 0x00, 0x00, 0x00, 0x0b, 0x04, 0x00, 0x00, 0x00, 0x06, 0x05, 0x00, 0x00, 0x00, 0x04, 0x05, 0x00, 0x00,
1233 0x00, 0x01, 0x0e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
1297 for (uint8_t v : FULL_UPDATE_LUT_DKE)
1302 ESP_LOGI(TAG,
"Performing e-paper update.");
1328 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1329 ESP_LOGCONFIG(TAG,
" Model: 2.9in DKE");
1331 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1332 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1333 LOG_UPDATE_INTERVAL(
this);
1400 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1401 ESP_LOGCONFIG(TAG,
" Model: 2.9in (B) V3");
1403 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1404 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1405 LOG_UPDATE_INTERVAL(
this);
1456 void WaveshareEPaper2P9InV2R2::reset_() {
1468 ESP_LOGE(TAG,
"fail idle 1");
1507 this->
write_lut_(PARTIAL_UPD_2IN9_LUT, PARTIAL_UPD_2IN9_LUT_SIZE);
1529 ESP_LOGE(TAG,
"fail idle 2");
1568 for (uint8_t i = 0; i < size; i++)
1573 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1574 ESP_LOGCONFIG(TAG,
" Model: 2.9inV2R2");
1577 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1578 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1579 LOG_UPDATE_INTERVAL(
this);
1637 this->
data(0b10011111);
1670 LOG_DISPLAY(
"",
"Waveshare E-Paper (Good Display)",
this);
1671 ESP_LOGCONFIG(TAG,
" Model: 2.9in Greyscale GDEW029T5");
1673 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1674 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1675 LOG_UPDATE_INTERVAL(
this);
1695 if (this->lastbuff_ !=
nullptr) {
1701 void GDEW0154M09::reset_() {
1711 void GDEW0154M09::init_internal_() {
1722 const uint8_t panel_setting_1 = 0b11011111;
1729 const uint8_t panel_setting_2 = 0b01110;
1731 const uint8_t wf_t0154_cz_b3_list[] = {
1733 CMD_PSR_PANEL_SETTING, 2, panel_setting_1, panel_setting_2,
1734 CMD_UNDOCUMENTED_0x4D, 1, 0x55,
1735 CMD_UNDOCUMENTED_0xAA, 1, 0x0f,
1736 CMD_UNDOCUMENTED_0xE9, 1, 0x02,
1737 CMD_UNDOCUMENTED_0xB6, 1, 0x11,
1738 CMD_UNDOCUMENTED_0xF3, 1, 0x0a,
1739 CMD_TRES_RESOLUTION_SETTING, 3, 0xc8, 0x00, 0xc8,
1740 CMD_TCON_TCONSETTING, 1, 0x00,
1741 CMD_CDI_VCOM_DATA_INTERVAL, 1, 0xd7,
1742 CMD_PWS_POWER_SAVING, 1, 0x00,
1747 this->write_init_list_(wf_t0154_cz_b3_list);
1752 void GDEW0154M09::write_init_list_(
const uint8_t *list) {
1753 uint8_t list_limit = list[0];
1754 uint8_t *start_ptr = ((uint8_t *) list + 1);
1755 for (uint8_t i = 0; i < list_limit; i++) {
1756 this->
command(*(start_ptr + 0));
1757 for (uint8_t dnum = 0; dnum < *(start_ptr + 1); dnum++) {
1758 this->
data(*(start_ptr + 2 + dnum));
1760 start_ptr += (*(start_ptr + 1) + 2);
1764 void GDEW0154M09::clear_() {
1766 for (uint8_t j = 0; j < 2; j++) {
1767 this->
command(CMD_DTM1_DATA_START_TRANS);
1768 for (
int count = 0; count < pixsize; count++) {
1771 this->
command(CMD_DTM2_DATA_START_TRANS2);
1772 for (
int count = 0; count < pixsize; count++) {
1775 this->
command(CMD_DISPLAY_REFRESH);
1784 this->
command(CMD_DTM1_DATA_START_TRANS);
1788 this->
command(CMD_DTM2_DATA_START_TRANS2);
1792 this->
command(CMD_DISPLAY_REFRESH);
1800 this->
command(CMD_POF_POWER_OFF);
1803 this->
command(CMD_DSLP_DEEP_SLEEP);
1804 this->
data(DATA_DSLP_DEEP_SLEEP);
1810 LOG_DISPLAY(
"",
"M5Stack CoreInk E-Paper (Good Display)",
this);
1811 ESP_LOGCONFIG(TAG,
" Model: 1.54in Greyscale GDEW0154M09");
1813 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1814 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1815 LOG_UPDATE_INTERVAL(
this);
1818 static const uint8_t LUT_VCOM_DC_4_2[] = {
1819 0x00, 0x17, 0x00, 0x00, 0x00, 0x02, 0x00, 0x17, 0x17, 0x00, 0x00, 0x02, 0x00, 0x0A, 0x01,
1820 0x00, 0x00, 0x01, 0x00, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1821 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1823 static const uint8_t LUT_WHITE_TO_WHITE_4_2[] = {
1824 0x40, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x40, 0x0A,
1825 0x01, 0x00, 0x00, 0x01, 0xA0, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
1826 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1828 static const uint8_t LUT_BLACK_TO_WHITE_4_2[] = {
1829 0x40, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x40, 0x0A,
1830 0x01, 0x00, 0x00, 0x01, 0xA0, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
1831 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1834 static const uint8_t LUT_BLACK_TO_BLACK_4_2[] = {
1835 0x80, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x80, 0x0A,
1836 0x01, 0x00, 0x00, 0x01, 0x50, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
1837 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1840 static const uint8_t LUT_WHITE_TO_BLACK_4_2[] = {
1841 0x80, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x80, 0x0A,
1842 0x01, 0x00, 0x00, 0x01, 0x50, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
1843 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1878 for (uint8_t i : LUT_VCOM_DC_4_2)
1882 for (uint8_t i : LUT_WHITE_TO_WHITE_4_2)
1886 for (uint8_t i : LUT_BLACK_TO_WHITE_4_2)
1890 for (uint8_t i : LUT_WHITE_TO_BLACK_4_2)
1894 for (uint8_t i : LUT_BLACK_TO_BLACK_4_2)
1932 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1933 ESP_LOGCONFIG(TAG,
" Model: 4.2in");
1935 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1936 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1937 LOG_UPDATE_INTERVAL(
this);
1988 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1989 ESP_LOGCONFIG(TAG,
" Model: 4.2in (B V2)");
1991 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1992 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1993 LOG_UPDATE_INTERVAL(
this);
2054 uint8_t temp1 = this->
buffer_[i];
2055 for (uint8_t j = 0; j < 8; j++) {
2085 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2086 ESP_LOGCONFIG(TAG,
" Model: 5.83in");
2088 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2089 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2090 LOG_UPDATE_INTERVAL(
this);
2166 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2167 ESP_LOGCONFIG(TAG,
" Model: 5.83inv2");
2169 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2170 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2171 LOG_UPDATE_INTERVAL(
this);
2242 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2243 ESP_LOGCONFIG(TAG,
" Model: 7.5in-bv2");
2245 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2246 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2247 LOG_UPDATE_INTERVAL(
this);
2256 const uint32_t start =
millis();
2260 ESP_LOGI(TAG,
"Timeout while displaying image!");
2325 uint8_t lut_vcom_7_i_n5_v2[] = {
2326 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0xF, 0x1, 0xF, 0x1, 0x2, 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
2327 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2330 uint8_t lut_ww_7_i_n5_v2[] = {
2331 0x10, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x20, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
2332 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2335 uint8_t lut_bw_7_i_n5_v2[] = {
2336 0x10, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x20, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
2337 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2340 uint8_t lut_wb_7_i_n5_v2[] = {
2341 0x80, 0xF, 0xF, 0x0, 0x0, 0x3, 0x84, 0xF, 0x1, 0xF, 0x1, 0x4, 0x40, 0xF, 0xF, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0,
2342 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2345 uint8_t lut_bb_7_i_n5_v2[] = {
2346 0x80, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x40, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
2347 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2352 for (count = 0; count < 42; count++)
2353 this->
data(lut_vcom_7_i_n5_v2[count]);
2356 for (count = 0; count < 42; count++)
2357 this->
data(lut_ww_7_i_n5_v2[count]);
2360 for (count = 0; count < 42; count++)
2361 this->
data(lut_bw_7_i_n5_v2[count]);
2364 for (count = 0; count < 42; count++)
2365 this->
data(lut_wb_7_i_n5_v2[count]);
2368 for (count = 0; count < 42; count++)
2369 this->
data(lut_bb_7_i_n5_v2[count]);
2376 for (uint32_t i = 0; i < buf_len; i++) {
2382 for (uint32_t i = 0; i < buf_len; i++) {
2394 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2395 ESP_LOGCONFIG(TAG,
" Model: 7.5in-bv3");
2397 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2398 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2399 LOG_UPDATE_INTERVAL(
this);
2408 const uint32_t start =
millis();
2412 ESP_LOGI(TAG,
"Timeout while displaying image!");
2483 for (uint32_t i = 0; i < buf_len; i++) {
2489 for (uint32_t i = 0; i < buf_len; i++) {
2501 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2502 ESP_LOGCONFIG(TAG,
" Model: 7.5in-bv3 BWR-Mode");
2504 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2505 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2506 LOG_UPDATE_INTERVAL(
this);
2556 uint8_t temp1 = this->
buffer_[i];
2557 for (uint8_t j = 0; j < 8; j++) {
2584 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2585 ESP_LOGCONFIG(TAG,
" Model: 7.5in");
2587 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2588 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2589 LOG_UPDATE_INTERVAL(
this);
2596 const uint32_t start =
millis();
2600 ESP_LOGE(TAG,
"Timeout while displaying image!");
2655 ESP_LOGI(TAG,
"Power on the display and hat");
2667 for (uint32_t i = 0; i < buf_len; i++) {
2679 ESP_LOGV(TAG,
"Before command(0x02) (>> power off)");
2682 ESP_LOGV(TAG,
"After command(0x02) (>> power off)");
2689 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2690 ESP_LOGCONFIG(TAG,
" Model: 7.5inV2rev2");
2692 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2693 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2694 LOG_UPDATE_INTERVAL(
this);
2703 const uint32_t start =
millis();
2707 ESP_LOGI(TAG,
"Timeout while displaying image!");
2773 uint8_t lut_vcom_7_i_n5_v2[] = {
2774 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0xF, 0x1, 0xF, 0x1, 0x2, 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
2775 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2778 uint8_t lut_ww_7_i_n5_v2[] = {
2779 0x10, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x20, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
2780 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2783 uint8_t lut_bw_7_i_n5_v2[] = {
2784 0x10, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x20, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
2785 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2788 uint8_t lut_wb_7_i_n5_v2[] = {
2789 0x80, 0xF, 0xF, 0x0, 0x0, 0x3, 0x84, 0xF, 0x1, 0xF, 0x1, 0x4, 0x40, 0xF, 0xF, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0,
2790 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2793 uint8_t lut_bb_7_i_n5_v2[] = {
2794 0x80, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x40, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
2795 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
2800 for (count = 0; count < 42; count++)
2801 this->
data(lut_vcom_7_i_n5_v2[count]);
2804 for (count = 0; count < 42; count++)
2805 this->
data(lut_ww_7_i_n5_v2[count]);
2808 for (count = 0; count < 42; count++)
2809 this->
data(lut_bw_7_i_n5_v2[count]);
2812 for (count = 0; count < 42; count++)
2813 this->
data(lut_wb_7_i_n5_v2[count]);
2816 for (count = 0; count < 42; count++)
2817 this->
data(lut_bb_7_i_n5_v2[count]);
2821 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2822 ESP_LOGCONFIG(TAG,
" Model: 7.5inV2");
2824 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2825 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2826 LOG_UPDATE_INTERVAL(
this);
2888 uint8_t eight_pixels = this->
buffer_[i];
2890 for (uint8_t j = 0; j < 8; j += 2) {
2894 uint8_t left_nibble = (eight_pixels & 0x80) ? 0x30 : 0x00;
2896 uint8_t right_nibble = (eight_pixels & 0x80) ? 0x03 : 0x00;
2898 this->
write_byte(left_nibble | right_nibble);
2917 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2918 ESP_LOGCONFIG(TAG,
" Model: 7.5in-bc");
2920 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2921 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2922 LOG_UPDATE_INTERVAL(
this);
3018 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
3019 ESP_LOGCONFIG(TAG,
" Model: 7.5in-HD-b");
3021 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3022 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3023 LOG_UPDATE_INTERVAL(
this);
3026 static const uint8_t LUT_SIZE_TTGO_DKE_PART = 153;
3028 static const uint8_t PART_UPDATE_LUT_TTGO_DKE[LUT_SIZE_TTGO_DKE_PART] = {
3029 0x0, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
3030 0x0, 0x0, 0x0, 0x0, 0x40, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0,
3031 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
3032 0xF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
3033 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
3034 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
3035 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
3036 0x0, 0x0, 0x0, 0x0, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x0, 0x0, 0x0,
3046 ESP_LOGI(TAG,
"Performing partial e-paper update.");
3048 ESP_LOGI(TAG,
"Performing full e-paper update.");
3085 this->
write_array(PART_UPDATE_LUT_TTGO_DKE,
sizeof(PART_UPDATE_LUT_TTGO_DKE));
3137 ESP_LOGI(TAG,
"Completed e-paper update.");
3144 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
3145 ESP_LOGCONFIG(TAG,
" Model: 2.13inDKE");
3146 LOG_PIN(
" CS Pin: ", this->
cs_);
3148 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3149 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3150 LOG_UPDATE_INTERVAL(
this);
3188 this->
data(0 & 0xFF);
3189 this->
data((0 >> 8) & 0x03);
3194 this->
data(0 & 0xFF);
3195 this->
data((0 >> 8) & 0x03);
3208 this->
data(0 & 0xFF);
3209 this->
data((0 >> 8) & 0x03);
3212 this->
data(0 & 0xFF);
3213 this->
data((0 >> 8) & 0x03);
3232 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
3233 ESP_LOGCONFIG(TAG,
" Model: 13.3inK");
3235 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3236 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3237 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
int get_height_internal() 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)
void initialize() override
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
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 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 initialize() 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 dump_config() override
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
int get_height_internal() override
int get_width_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
An STL allocator that uses SPI or internal RAM.
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