7 namespace waveshare_epaper {
9 static const char *
const TAG =
"waveshare_epaper";
11 static const uint8_t LUT_SIZE_WAVESHARE = 30;
13 static const uint8_t FULL_UPDATE_LUT[LUT_SIZE_WAVESHARE] = {0x02, 0x02, 0x01, 0x11, 0x12, 0x12, 0x22, 0x22, 0x66, 0x69,
14 0x69, 0x59, 0x58, 0x99, 0x99, 0x88, 0x00, 0x00, 0x00, 0x00,
15 0xF8, 0xB4, 0x13, 0x51, 0x35, 0x51, 0x51, 0x19, 0x01, 0x00};
17 static const uint8_t PARTIAL_UPDATE_LUT[LUT_SIZE_WAVESHARE] = {
18 0x10, 0x18, 0x18, 0x08, 0x18, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
19 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x14, 0x44, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
21 static const uint8_t LUT_SIZE_TTGO = 70;
23 static const uint8_t FULL_UPDATE_LUT_TTGO[LUT_SIZE_TTGO] = {
24 0x80, 0x60, 0x40, 0x00, 0x00, 0x00, 0x00,
25 0x10, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00,
26 0x80, 0x60, 0x40, 0x00, 0x00, 0x00, 0x00,
27 0x10, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00,
28 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
29 0x03, 0x03, 0x00, 0x00, 0x02,
30 0x09, 0x09, 0x00, 0x00, 0x02,
31 0x03, 0x03, 0x00, 0x00, 0x02,
32 0x00, 0x00, 0x00, 0x00, 0x00,
33 0x00, 0x00, 0x00, 0x00, 0x00,
34 0x00, 0x00, 0x00, 0x00, 0x00,
35 0x00, 0x00, 0x00, 0x00, 0x00,
38 static const uint8_t PARTIAL_UPDATE_LUT_TTGO[LUT_SIZE_TTGO] = {
39 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
40 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
41 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
42 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
43 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
44 0x0A, 0x00, 0x00, 0x00, 0x00,
45 0x00, 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,
53 static const uint8_t LUT_SIZE_TTGO_B73 = 100;
55 static const uint8_t FULL_UPDATE_LUT_TTGO_B73[LUT_SIZE_TTGO_B73] = {
56 0xA0, 0x90, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x90, 0xA0, 0x00, 0x00, 0x00, 0x00,
57 0x00, 0x00, 0x00, 0xA0, 0x90, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x90, 0xA0, 0x00,
58 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
60 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x03, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00,
61 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
62 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
65 static const uint8_t PARTIAL_UPDATE_LUT_TTGO_B73[LUT_SIZE_TTGO_B73] = {
66 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
67 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
68 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
70 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
71 0x00, 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,
75 static const uint8_t LUT_SIZE_TTGO_B1 = 29;
77 static const uint8_t FULL_UPDATE_LUT_TTGO_B1[LUT_SIZE_TTGO_B1] = {
78 0x22, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
79 0x00, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x01, 0x00, 0x00, 0x00, 0x00};
81 static const uint8_t PARTIAL_UPDATE_LUT_TTGO_B1[LUT_SIZE_TTGO_B1] = {
82 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
83 0x00, 0x0F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
116 const uint32_t start =
millis();
119 ESP_LOGE(TAG,
"Timeout while displaying image!");
132 const uint8_t
fill = color.
is_on() ? 0x00 : 0xFF;
141 const uint8_t subpos = x & 0x07;
143 if (!color.
is_on()) {
144 this->
buffer_[pos] |= 0x80 >> subpos;
146 this->
buffer_[pos] &= ~(0x80 >> subpos);
204 switch (this->model_) {
221 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
222 switch (this->model_) {
224 ESP_LOGCONFIG(TAG,
" Model: 1.54in");
227 ESP_LOGCONFIG(TAG,
" Model: 1.54inV2");
230 ESP_LOGCONFIG(TAG,
" Model: 2.13in");
233 ESP_LOGCONFIG(TAG,
" Model: 2.13in (TTGO)");
236 ESP_LOGCONFIG(TAG,
" Model: 2.13in (TTGO B73)");
239 ESP_LOGCONFIG(TAG,
" Model: 2.13in (TTGO B74)");
242 ESP_LOGCONFIG(TAG,
" Model: 2.13in (TTGO B1)");
245 ESP_LOGCONFIG(TAG,
" Model: 2.9in");
248 ESP_LOGCONFIG(TAG,
" Model: 2.9inV2");
251 ESP_LOGCONFIG(TAG,
" Full Update Every: %u", this->full_update_every_);
253 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
255 LOG_UPDATE_INTERVAL(
this);
258 bool full_update = this->at_update_ == 0;
259 bool prev_full_update = this->at_update_ == 1;
266 if (this->full_update_every_ >= 1) {
267 if (full_update != prev_full_update) {
268 switch (this->model_) {
270 this->write_lut_(full_update ? FULL_UPDATE_LUT_TTGO : PARTIAL_UPDATE_LUT_TTGO, LUT_SIZE_TTGO);
273 this->write_lut_(full_update ? FULL_UPDATE_LUT_TTGO_B73 : PARTIAL_UPDATE_LUT_TTGO_B73, LUT_SIZE_TTGO_B73);
279 this->write_lut_(full_update ? FULL_UPDATE_LUT_TTGO_B1 : PARTIAL_UPDATE_LUT_TTGO_B1, LUT_SIZE_TTGO_B1);
282 this->write_lut_(full_update ? FULL_UPDATE_LUT : PARTIAL_UPDATE_LUT, LUT_SIZE_WAVESHARE);
285 this->at_update_ = (this->at_update_ + 1) % this->full_update_every_;
289 switch (this->model_) {
314 this->
data(full_update ? 0x05 : 0x80);
346 switch (this->model_) {
350 for (
int j = 0; j < wb; j++) {
364 switch (this->model_) {
368 this->
data(full_update ? 0xF7 : 0xFF);
386 switch (this->model_) {
402 switch (this->model_) {
421 for (uint8_t i = 0; i < size; i++)
445 static const uint8_t LUT_VCOM_DC_2_7[44] = {
446 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x00, 0x32, 0x32, 0x00, 0x00, 0x02, 0x00,
447 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
448 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
451 static const uint8_t LUT_WHITE_TO_WHITE_2_7[42] = {
452 0x50, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x60, 0x32, 0x32, 0x00, 0x00, 0x02, 0xA0, 0x0F,
453 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
454 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
457 static const uint8_t LUT_BLACK_TO_WHITE_2_7[42] = {
458 0x50, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x60, 0x32, 0x32, 0x00, 0x00, 0x02, 0xA0, 0x0F,
459 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
460 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
463 static const uint8_t LUT_WHITE_TO_BLACK_2_7[] = {
464 0xA0, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x60, 0x32, 0x32, 0x00, 0x00, 0x02, 0x50, 0x0F,
465 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
466 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
469 static const uint8_t LUT_BLACK_TO_BLACK_2_7[42] = {
470 0xA0, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x60, 0x32, 0x32, 0x00, 0x00, 0x02, 0x50, 0x0F,
471 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
472 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
535 for (uint8_t i : LUT_VCOM_DC_2_7)
540 for (uint8_t i : LUT_WHITE_TO_WHITE_2_7)
544 for (uint8_t i : LUT_BLACK_TO_WHITE_2_7)
548 for (uint8_t i : LUT_WHITE_TO_BLACK_2_7)
552 for (uint8_t i : LUT_BLACK_TO_BLACK_2_7)
561 for (uint32_t i = 0; i < buf_len; i++) {
569 for (uint32_t i = 0; i < buf_len; i++) {
579 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
580 ESP_LOGCONFIG(TAG,
" Model: 2.7in");
582 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
584 LOG_UPDATE_INTERVAL(
this);
658 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
659 ESP_LOGCONFIG(TAG,
" Model: 2.9in (B)");
661 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
663 LOG_UPDATE_INTERVAL(
this);
666 static const uint8_t LUT_VCOM_DC_4_2[] = {
667 0x00, 0x17, 0x00, 0x00, 0x00, 0x02, 0x00, 0x17, 0x17, 0x00, 0x00, 0x02, 0x00, 0x0A, 0x01,
668 0x00, 0x00, 0x01, 0x00, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
669 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
671 static const uint8_t LUT_WHITE_TO_WHITE_4_2[] = {
672 0x40, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x40, 0x0A,
673 0x01, 0x00, 0x00, 0x01, 0xA0, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
674 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
676 static const uint8_t LUT_BLACK_TO_WHITE_4_2[] = {
677 0x40, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x40, 0x0A,
678 0x01, 0x00, 0x00, 0x01, 0xA0, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
679 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
682 static const uint8_t LUT_BLACK_TO_BLACK_4_2[] = {
683 0x80, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x80, 0x0A,
684 0x01, 0x00, 0x00, 0x01, 0x50, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
685 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
688 static const uint8_t LUT_WHITE_TO_BLACK_4_2[] = {
689 0x80, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x80, 0x0A,
690 0x01, 0x00, 0x00, 0x01, 0x50, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
691 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
726 for (uint8_t i : LUT_VCOM_DC_4_2)
730 for (uint8_t i : LUT_WHITE_TO_WHITE_4_2)
734 for (uint8_t i : LUT_BLACK_TO_WHITE_4_2)
738 for (uint8_t i : LUT_WHITE_TO_BLACK_4_2)
742 for (uint8_t i : LUT_BLACK_TO_BLACK_4_2)
780 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
781 ESP_LOGCONFIG(TAG,
" Model: 4.2in");
783 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
785 LOG_UPDATE_INTERVAL(
this);
836 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
837 ESP_LOGCONFIG(TAG,
" Model: 4.2in (B V2)");
839 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
841 LOG_UPDATE_INTERVAL(
this);
902 uint8_t temp1 = this->
buffer_[i];
903 for (uint8_t j = 0; j < 8; j++) {
933 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
934 ESP_LOGCONFIG(TAG,
" Model: 5.83in");
936 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
938 LOG_UPDATE_INTERVAL(
this);
1001 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1002 ESP_LOGCONFIG(TAG,
" Model: 7.5in-bv2");
1004 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1005 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1006 LOG_UPDATE_INTERVAL(
this);
1055 uint8_t temp1 = this->
buffer_[i];
1056 for (uint8_t j = 0; j < 8; j++) {
1083 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1084 ESP_LOGCONFIG(TAG,
" Model: 7.5in");
1086 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1087 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1088 LOG_UPDATE_INTERVAL(
this);
1127 for (uint32_t i = 0; i < buf_len; i++) {
1140 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1141 ESP_LOGCONFIG(TAG,
" Model: 7.5inV2rev2");
1143 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1144 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1145 LOG_UPDATE_INTERVAL(
this);
1154 const uint32_t start =
millis();
1158 ESP_LOGI(TAG,
"Timeout while displaying image!");
1229 uint8_t lut_vcom_7_i_n5_v2[] = {
1230 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0xF, 0x1, 0xF, 0x1, 0x2, 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
1231 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1234 uint8_t lut_ww_7_i_n5_v2[] = {
1235 0x10, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x20, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
1236 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1239 uint8_t lut_bw_7_i_n5_v2[] = {
1240 0x10, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x20, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
1241 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1244 uint8_t lut_wb_7_i_n5_v2[] = {
1245 0x80, 0xF, 0xF, 0x0, 0x0, 0x3, 0x84, 0xF, 0x1, 0xF, 0x1, 0x4, 0x40, 0xF, 0xF, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0,
1246 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1249 uint8_t lut_bb_7_i_n5_v2[] = {
1250 0x80, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x40, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
1251 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1256 for (count = 0; count < 42; count++)
1257 this->
data(lut_vcom_7_i_n5_v2[count]);
1260 for (count = 0; count < 42; count++)
1261 this->
data(lut_ww_7_i_n5_v2[count]);
1264 for (count = 0; count < 42; count++)
1265 this->
data(lut_bw_7_i_n5_v2[count]);
1268 for (count = 0; count < 42; count++)
1269 this->
data(lut_wb_7_i_n5_v2[count]);
1272 for (count = 0; count < 42; count++)
1273 this->
data(lut_bb_7_i_n5_v2[count]);
1277 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1278 ESP_LOGCONFIG(TAG,
" Model: 7.5inV2");
1280 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1281 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1282 LOG_UPDATE_INTERVAL(
this);
1344 uint8_t eight_pixels = this->
buffer_[i];
1346 for (uint8_t j = 0; j < 8; j += 2) {
1350 uint8_t left_nibble = (eight_pixels & 0x80) ? 0x30 : 0x00;
1352 uint8_t right_nibble = (eight_pixels & 0x80) ? 0x03 : 0x00;
1354 this->
write_byte(left_nibble | right_nibble);
1373 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1374 ESP_LOGCONFIG(TAG,
" Model: 7.5in-bc");
1376 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1377 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1378 LOG_UPDATE_INTERVAL(
this);
1474 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1475 ESP_LOGCONFIG(TAG,
" Model: 7.5in-HD-b");
1477 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1478 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1479 LOG_UPDATE_INTERVAL(
this);
1482 static const uint8_t LUT_SIZE_TTGO_DKE_PART = 153;
1484 static const uint8_t PART_UPDATE_LUT_TTGO_DKE[LUT_SIZE_TTGO_DKE_PART] = {
1485 0x0, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1486 0x0, 0x0, 0x0, 0x0, 0x40, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0,
1487 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1488 0xF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1489 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1490 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1491 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1492 0x0, 0x0, 0x0, 0x0, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x0, 0x0, 0x0,
1502 ESP_LOGI(TAG,
"Performing partial e-paper update.");
1504 ESP_LOGI(TAG,
"Performing full e-paper update.");
1540 for (uint8_t v : PART_UPDATE_LUT_TTGO_DKE)
1594 ESP_LOGI(TAG,
"Completed e-paper update.");
1601 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1602 ESP_LOGCONFIG(TAG,
" Model: 2.13inDKE");
1604 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1605 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1606 LOG_UPDATE_INTERVAL(
this);
void initialize() override
int get_width_internal() override
virtual void digital_write(bool value)=0
void dump_config() override
int get_height_internal() override
virtual uint32_t idle_timeout_()
void initialize() override
void dump_config() override
void dump_config() override
void dump_config() override
void write_lut_(const uint8_t *lut, uint8_t size)
int get_width_internal() override
uint32_t idle_timeout_() override
void draw_absolute_pixel_internal(int x, int y, Color color) override
int get_height_internal() override
void initialize() override
void dump_config() override
void set_full_update_every(uint32_t full_update_every)
virtual int get_width_internal()=0
int get_width_internal() override
WaveshareEPaperTypeA(WaveshareEPaperTypeAModel model)
int get_width_internal() override
void write_byte(uint8_t data)
void fill(Color color) override
void command(uint8_t value)
uint32_t IRAM_ATTR HOT millis()
void initialize() override
uint32_t idle_timeout_() override
int get_width_internal() override
void initialize() override
void init_internal_(uint32_t buffer_length)
int get_width_internal() override
virtual void deep_sleep()=0
int get_width_internal() override
void dump_config() override
void initialize() override
void dump_config() override
int get_width_internal() override
void dump_config() override
WaveshareEPaperTypeAModel model_
void dump_config() override
void initialize() override
void on_safe_shutdown() override
int get_width_internal() override
WaveshareEPaperTypeAModel
void status_clear_warning()
void dump_config() override
void initialize() override
int get_height_internal() override
const float PROCESSOR
For components that use data from sensors like displays.
Application App
Global storage of Application pointer - only one Application can exist.
void status_set_warning()
void dump_config() override
virtual bool digital_read()=0
void initialize() override
int get_height_internal() override
void initialize() override
void initialize() override
int get_height_internal() override
int get_height_internal() override
int get_width_internal() override
virtual int get_height_internal()=0
void write_array(const uint8_t *data, size_t length)
int get_width_internal() override
int get_height_internal() override
int get_width_internal() override
void initialize() override
uint32_t full_update_every_
void initialize() override
bool is_on() ALWAYS_INLINE
int get_height_internal() override
int get_height_internal() override
int get_height_internal() override
float get_setup_priority() const override
void dump_config() override
int get_height_internal() override
void set_full_update_every(uint32_t full_update_every)
int get_height_internal() override
uint32_t get_buffer_length_()
void dump_config() override
void IRAM_ATTR HOT delay(uint32_t ms)