9namespace waveshare_epaper {
11static const char *
const TAG =
"waveshare_epaper";
13static const uint8_t LUT_SIZE_WAVESHARE = 30;
15static const uint8_t FULL_UPDATE_LUT[LUT_SIZE_WAVESHARE] = {0x02, 0x02, 0x01, 0x11, 0x12, 0x12, 0x22, 0x22, 0x66, 0x69,
16 0x69, 0x59, 0x58, 0x99, 0x99, 0x88, 0x00, 0x00, 0x00, 0x00,
17 0xF8, 0xB4, 0x13, 0x51, 0x35, 0x51, 0x51, 0x19, 0x01, 0x00};
19static const uint8_t PARTIAL_UPDATE_LUT[LUT_SIZE_WAVESHARE] = {
20 0x10, 0x18, 0x18, 0x08, 0x18, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
21 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x14, 0x44, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
23static const uint8_t LUT_SIZE_TTGO = 70;
25static const uint8_t FULL_UPDATE_LUT_TTGO[LUT_SIZE_TTGO] = {
26 0x80, 0x60, 0x40, 0x00, 0x00, 0x00, 0x00,
27 0x10, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00,
28 0x80, 0x60, 0x40, 0x00, 0x00, 0x00, 0x00,
29 0x10, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00,
30 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31 0x03, 0x03, 0x00, 0x00, 0x02,
32 0x09, 0x09, 0x00, 0x00, 0x02,
33 0x03, 0x03, 0x00, 0x00, 0x02,
34 0x00, 0x00, 0x00, 0x00, 0x00,
35 0x00, 0x00, 0x00, 0x00, 0x00,
36 0x00, 0x00, 0x00, 0x00, 0x00,
37 0x00, 0x00, 0x00, 0x00, 0x00,
40static const uint8_t PARTIAL_UPDATE_LUT_TTGO[LUT_SIZE_TTGO] = {
41 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
42 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
43 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
44 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
45 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
46 0x0A, 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,
52 0x00, 0x00, 0x00, 0x00, 0x00,
55static const uint8_t LUT_SIZE_TTGO_B73 = 100;
57static const uint8_t FULL_UPDATE_LUT_TTGO_B73[LUT_SIZE_TTGO_B73] = {
58 0xA0, 0x90, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x90, 0xA0, 0x00, 0x00, 0x00, 0x00,
59 0x00, 0x00, 0x00, 0xA0, 0x90, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x90, 0xA0, 0x00,
60 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
62 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x03, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00,
63 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
64 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
67static const uint8_t PARTIAL_UPDATE_LUT_TTGO_B73[LUT_SIZE_TTGO_B73] = {
68 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
69 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
70 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
72 0x0A, 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, 0x00,
74 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
77static const uint8_t LUT_SIZE_TTGO_B1 = 29;
79static const uint8_t FULL_UPDATE_LUT_TTGO_B1[LUT_SIZE_TTGO_B1] = {
80 0x22, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
81 0x00, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x01, 0x00, 0x00, 0x00, 0x00};
83static const uint8_t PARTIAL_UPDATE_LUT_TTGO_B1[LUT_SIZE_TTGO_B1] = {
84 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
85 0x00, 0x0F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
89static const uint8_t PARTIAL_UPD_2IN9_LUT_SIZE = 159;
90static const uint8_t PARTIAL_UPD_2IN9_LUT[PARTIAL_UPD_2IN9_LUT_SIZE] =
92 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
93 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
94 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
95 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
96 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
97 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
98 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
99 0x01, 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 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
109 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0x00,
110 0x22, 0x17, 0x41, 0xB0, 0x32, 0x36,
160 const uint32_t start =
millis();
163 ESP_LOGE(TAG,
"Timeout while displaying image!");
177 Display::fill(color);
182 const uint8_t
fill = color.
is_on() ? 0x00 : 0xFF;
195 uint32_t small_buffer_length = buffer_length /
NUM_BUFFERS;
200 ESP_LOGE(TAG,
"Could not allocate buffer %d for display!", i);
201 for (
auto &buffer : this->
buffers_) {
202 allocator.
deallocate(buffer, small_buffer_length);
212 if (color.
red > 127) {
213 if (color.
green > 170) {
214 if (color.
blue > 127) {
219 }
else if (color.
green > 85) {
225 if (color.
green > 127) {
226 if (color.
blue > 127) {
232 if (color.
blue > 127) {
257 ESP_LOGE(TAG,
"Buffer unavailable!");
260 for (
auto &buffer : this->
buffers_) {
261 for (uint32_t buffer_pos = 0; buffer_pos < small_buffer_length; buffer_pos += 3) {
265 buffer[buffer_pos + 0] = pixel_color << 5 | pixel_color << 2 | pixel_color >> 1;
266 buffer[buffer_pos + 1] = pixel_color << 7 | pixel_color << 4 | pixel_color << 1 | pixel_color >> 2;
267 buffer[buffer_pos + 2] = pixel_color << 6 | pixel_color << 3 | pixel_color << 0;
275 ESP_LOGE(TAG,
"Buffer unavailable!");
280 uint8_t byte_to_send;
281 for (
auto &buffer : this->
buffers_) {
282 for (uint32_t buffer_pos = 0; buffer_pos < small_buffer_length; buffer_pos += 3) {
283 std::bitset<24> triplet =
284 buffer[buffer_pos + 0] << 16 | buffer[buffer_pos + 1] << 8 | buffer[buffer_pos + 2] << 0;
288 byte_to_send = ((triplet >> 17).to_ulong() & 0b01110000) | ((triplet >> 18).to_ulong() & 0b00000111);
289 this->
data(byte_to_send);
291 byte_to_send = ((triplet >> 11).to_ulong() & 0b01110000) | ((triplet >> 12).to_ulong() & 0b00000111);
292 this->
data(byte_to_send);
294 byte_to_send = ((triplet >> 5).to_ulong() & 0b01110000) | ((triplet >> 6).to_ulong() & 0b00000111);
295 this->
data(byte_to_send);
297 byte_to_send = ((triplet << 1).to_ulong() & 0b01110000) | ((triplet << 0).to_ulong() & 0b00000111);
298 this->
data(byte_to_send);
319 const uint8_t subpos =
x & 0x07;
321 if (!color.
is_on()) {
322 this->
buffer_[pos] |= 0x80 >> subpos;
324 this->
buffer_[pos] &= ~(0x80 >> subpos);
348 const uint8_t subpos =
x & 0x07;
351 this->
buffer_[pos] |= 0x80 >> subpos;
353 this->
buffer_[pos] &= ~(0x80 >> subpos);
357 if (((color.
red > 0) && (color.
green == 0) && (color.
blue == 0))) {
358 this->
buffer_[pos + buf_half_len] |= 0x80 >> subpos;
360 this->
buffer_[pos + buf_half_len] &= ~(0x80 >> subpos);
370 uint32_t first_bit_position = pixel_position * 3;
371 uint32_t byte_position = first_bit_position / 8u;
372 uint32_t byte_subposition = first_bit_position % 8u;
373 uint32_t buffer_position = byte_position / small_buffer_length;
374 uint32_t buffer_subposition = byte_position % small_buffer_length;
376 if (byte_subposition <= 5) {
377 this->
buffers_[buffer_position][buffer_subposition] =
378 (this->
buffers_[buffer_position][buffer_subposition] & (0xFF ^ (0b111 << (5 - byte_subposition)))) |
379 (pixel_bits << (5 - byte_subposition));
381 this->
buffers_[buffer_position][buffer_subposition + 0] =
382 (this->
buffers_[buffer_position][buffer_subposition + 0] & (0xFF ^ (0b111 >> (byte_subposition - 5)))) |
383 (pixel_bits >> (byte_subposition - 5));
385 this->
buffers_[buffer_position][buffer_subposition + 1] = (this->
buffers_[buffer_position][buffer_subposition + 1] &
386 (0xFF ^ (0xFF & (0b111 << (13 - byte_subposition))))) |
387 (pixel_bits << (13 - byte_subposition));
417 ESP_LOGI(TAG,
"Set the display to deep sleep");
482 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
485 ESP_LOGCONFIG(TAG,
" Model: 1.54in");
488 ESP_LOGCONFIG(TAG,
" Model: 1.54inV2");
491 ESP_LOGCONFIG(TAG,
" Model: 2.13in");
494 ESP_LOGCONFIG(TAG,
" Model: 2.13inV2");
497 ESP_LOGCONFIG(TAG,
" Model: 2.13in (TTGO)");
500 ESP_LOGCONFIG(TAG,
" Model: 2.13in (TTGO B73)");
503 ESP_LOGCONFIG(TAG,
" Model: 2.13in (TTGO B74)");
506 ESP_LOGCONFIG(TAG,
" Model: 2.13in (TTGO B1)");
509 ESP_LOGCONFIG(TAG,
" Model: 2.9in");
512 ESP_LOGCONFIG(TAG,
" Model: 2.9inV2");
517 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
519 LOG_UPDATE_INTERVAL(
this);
523 bool prev_full_update = this->
at_update_ == 1;
526 ESP_LOGI(TAG,
"Wake up the display");
538 if (full_update != prev_full_update) {
543 this->
write_lut_(full_update ? FULL_UPDATE_LUT_TTGO : PARTIAL_UPDATE_LUT_TTGO, LUT_SIZE_TTGO);
546 this->
write_lut_(full_update ? FULL_UPDATE_LUT_TTGO_B73 : PARTIAL_UPDATE_LUT_TTGO_B73, LUT_SIZE_TTGO_B73);
552 this->
write_lut_(full_update ? FULL_UPDATE_LUT_TTGO_B1 : PARTIAL_UPDATE_LUT_TTGO_B1, LUT_SIZE_TTGO_B1);
555 this->
write_lut_(full_update ? FULL_UPDATE_LUT : PARTIAL_UPDATE_LUT, LUT_SIZE_WAVESHARE);
564 this->
data(full_update ? 0x55 : 0x26);
586 this->
data(full_update ? 0x05 : 0x80);
590 this->
data(full_update ? 0x03 : 0x01);
652 for (
int j = 0; j < wb; j++) {
678 this->
data(full_update ? 0xF7 : 0xFF);
684 this->
data(full_update ? 0xC7 : 0x0C);
699 ESP_LOGI(TAG,
"Set the display back to deep sleep");
756 for (uint8_t i = 0; i < size; i++)
783static const uint8_t LUT_VCOM_DC_2_7[44] = {
784 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x00, 0x32, 0x32, 0x00, 0x00, 0x02, 0x00,
785 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
786 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
789static const uint8_t LUT_WHITE_TO_WHITE_2_7[42] = {
790 0x50, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x60, 0x32, 0x32, 0x00, 0x00, 0x02, 0xA0, 0x0F,
791 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
792 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
795static const uint8_t LUT_BLACK_TO_WHITE_2_7[42] = {
796 0x50, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x60, 0x32, 0x32, 0x00, 0x00, 0x02, 0xA0, 0x0F,
797 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
798 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
801static const uint8_t LUT_WHITE_TO_BLACK_2_7[] = {
802 0xA0, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x60, 0x32, 0x32, 0x00, 0x00, 0x02, 0x50, 0x0F,
803 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
804 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
807static const uint8_t LUT_BLACK_TO_BLACK_2_7[42] = {
808 0xA0, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x60, 0x32, 0x32, 0x00, 0x00, 0x02, 0x50, 0x0F,
809 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
810 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
873 for (uint8_t i : LUT_VCOM_DC_2_7)
878 for (uint8_t i : LUT_WHITE_TO_WHITE_2_7)
882 for (uint8_t i : LUT_BLACK_TO_WHITE_2_7)
886 for (uint8_t i : LUT_WHITE_TO_BLACK_2_7)
890 for (uint8_t i : LUT_BLACK_TO_BLACK_2_7)
899 for (uint32_t i = 0; i < buf_len; i++) {
907 for (uint32_t i = 0; i < buf_len; i++) {
917 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
918 ESP_LOGCONFIG(TAG,
" Model: 2.7in");
920 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
922 LOG_UPDATE_INTERVAL(
this);
970 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
971 ESP_LOGCONFIG(TAG,
" Model: 2.7in V2");
973 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
975 LOG_UPDATE_INTERVAL(
this);
1033 for (uint32_t i = 0; i < buf_len_half; i++) {
1041 for (uint32_t i = buf_len_half; i < buf_len_half * 2u; i++) {
1054 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1055 ESP_LOGCONFIG(TAG,
" Model: 1.54in V2 B");
1057 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1058 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1059 LOG_UPDATE_INTERVAL(
this);
1069static const uint8_t LUT_VCOM_DC_2_7B[44] = {0x00, 0x00, 0x00, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x0A,
1070 0x00, 0x00, 0x08, 0x00, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x00, 0x0A,
1071 0x0A, 0x00, 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x05, 0x00,
1072 0x03, 0x0E, 0x00, 0x00, 0x0A, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01};
1074static const uint8_t LUT_WHITE_TO_WHITE_2_7B[42] = {0x90, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x40, 0x0A, 0x0A, 0x00, 0x00,
1075 0x08, 0x84, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x80, 0x0A, 0x0A, 0x00,
1076 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x05, 0x00, 0x03, 0x0E,
1077 0x00, 0x00, 0x0A, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01};
1079static const uint8_t LUT_BLACK_TO_WHITE_2_7B[42] = {0xA0, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x0A, 0x00, 0x00,
1080 0x08, 0x84, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x90, 0x0A, 0x0A, 0x00,
1081 0x00, 0x08, 0xB0, 0x04, 0x10, 0x00, 0x00, 0x05, 0xB0, 0x03, 0x0E,
1082 0x00, 0x00, 0x0A, 0xC0, 0x23, 0x00, 0x00, 0x00, 0x01};
1084static const uint8_t LUT_WHITE_TO_BLACK_2_7B[] = {0x90, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x20, 0x0A, 0x0A, 0x00, 0x00,
1085 0x08, 0x84, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x10, 0x0A, 0x0A, 0x00,
1086 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x05, 0x00, 0x03, 0x0E,
1087 0x00, 0x00, 0x0A, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01};
1089static const uint8_t LUT_BLACK_TO_BLACK_2_7B[42] = {0x90, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x40, 0x0A, 0x0A, 0x00, 0x00,
1090 0x08, 0x84, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x80, 0x0A, 0x0A, 0x00,
1091 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x05, 0x00, 0x03, 0x0E,
1092 0x00, 0x00, 0x0A, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01};
1151 for (uint8_t i : LUT_VCOM_DC_2_7B)
1155 for (uint8_t i : LUT_WHITE_TO_WHITE_2_7B)
1159 for (uint8_t i : LUT_BLACK_TO_WHITE_2_7B)
1163 for (uint8_t i : LUT_WHITE_TO_BLACK_2_7B) {
1169 for (uint8_t i : LUT_BLACK_TO_BLACK_2_7B) {
1190 for (uint32_t i = 0; i < buf_len_half; i++) {
1199 for (uint32_t i = buf_len_half; i < buf_len_half * 2u; i++) {
1215 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1216 ESP_LOGCONFIG(TAG,
" Model: 2.7in B");
1218 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1219 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1220 LOG_UPDATE_INTERVAL(
this);
1252 this->
data((xend >> 3) & 0xff);
1257 this->
data(yend & 0xff);
1258 this->
data((yend >> 8) & 0xff);
1273 for (uint32_t i = 0; i < buf_len; i++) {
1281 for (uint32_t i = 0; i < buf_len; i++) {
1294 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1295 ESP_LOGCONFIG(TAG,
" Model: 2.7in B V2");
1297 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1298 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1299 LOG_UPDATE_INTERVAL(
this);
1373 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1374 ESP_LOGCONFIG(TAG,
" Model: 2.9in (B)");
1376 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1377 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1378 LOG_UPDATE_INTERVAL(
this);
1460 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1461 ESP_LOGCONFIG(TAG,
" Model: 2.9in (D)");
1463 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1464 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1465 LOG_UPDATE_INTERVAL(
this);
1471static const uint8_t LUT_SIZE_DKE = 70;
1472static const uint8_t UPDATE_LUT_DKE[LUT_SIZE_DKE] = {
1473 0xA0, 0x90, 0x50, 0x0, 0x0, 0x0, 0x0, 0x50, 0x90, 0xA0, 0x0, 0x0, 0x0, 0x0, 0xA0, 0x90, 0x50, 0x0,
1474 0x0, 0x0, 0x0, 0x50, 0x90, 0xA0, 0x0, 0x0, 0x0, 0x0, 0x00, 0x00, 0x00, 0x0, 0x0, 0x0, 0x0, 0xF,
1475 0xF, 0x0, 0x0, 0x0, 0xF, 0xF, 0x0, 0x0, 0x02, 0xF, 0xF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1476 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1478static const uint8_t PART_UPDATE_LUT_DKE[LUT_SIZE_DKE] = {
1479 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xa0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x10, 0x00, 0x00,
1480 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
1481 0x05, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1482 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
1483static const uint8_t FULL_UPDATE_LUT_DKE[LUT_SIZE_DKE] = {
1484 0x90, 0x50, 0xa0, 0x50, 0x50, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa0, 0xa0, 0x80, 0x00, 0x90, 0x50, 0xa0, 0x50,
1485 0x50, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa0, 0xa0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17,
1486 0x04, 0x00, 0x00, 0x00, 0x0b, 0x04, 0x00, 0x00, 0x00, 0x06, 0x05, 0x00, 0x00, 0x00, 0x04, 0x05, 0x00, 0x00,
1487 0x00, 0x01, 0x0e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
1551 for (uint8_t v : FULL_UPDATE_LUT_DKE)
1556 ESP_LOGI(TAG,
"Performing e-paper update.");
1582 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1583 ESP_LOGCONFIG(TAG,
" Model: 2.9in DKE");
1585 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1586 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1587 LOG_UPDATE_INTERVAL(
this);
1654 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1655 ESP_LOGCONFIG(TAG,
" Model: 2.9in (B) V3");
1657 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1658 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1659 LOG_UPDATE_INTERVAL(
this);
1710void WaveshareEPaper2P9InV2R2::reset_() {
1722 ESP_LOGE(TAG,
"fail idle 1");
1761 this->
write_lut_(PARTIAL_UPD_2IN9_LUT, PARTIAL_UPD_2IN9_LUT_SIZE);
1783 ESP_LOGE(TAG,
"fail idle 2");
1822 for (uint8_t i = 0; i < size; i++)
1827 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1829 " Model: 2.9inV2R2\n"
1830 " Full Update Every: %" PRIu32,
1833 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1834 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1835 LOG_UPDATE_INTERVAL(
this);
1915 LOG_DISPLAY(
"",
"E-Paper (Good Display)",
this);
1916 ESP_LOGCONFIG(TAG,
" Model: 2.9in GDEY029T94");
1918 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1919 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1920 LOG_UPDATE_INTERVAL(
this);
1933static const uint8_t LUT_20_VCOMDC_29_5[] = {
1934 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x60, 0x28, 0x28, 0x00, 0x00, 0x01, 0x00, 0x14, 0x00,
1935 0x00, 0x00, 0x01, 0x00, 0x12, 0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1936 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1939static const uint8_t LUT_21_WW_29_5[] = {
1940 0x40, 0x08, 0x00, 0x00, 0x00, 0x02, 0x90, 0x28, 0x28, 0x00, 0x00, 0x01, 0x40, 0x14,
1941 0x00, 0x00, 0x00, 0x01, 0xA0, 0x12, 0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
1942 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1945static const uint8_t LUT_22_BW_29_5[] = {
1946 0x40, 0x08, 0x00, 0x00, 0x00, 0x02, 0x90, 0x28, 0x28, 0x00, 0x00, 0x01, 0x40, 0x14,
1947 0x00, 0x00, 0x00, 0x01, 0xA0, 0x12, 0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
1948 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1951static const uint8_t LUT_23_WB_29_5[] = {
1952 0x80, 0x08, 0x00, 0x00, 0x00, 0x02, 0x90, 0x28, 0x28, 0x00, 0x00, 0x01, 0x80, 0x14,
1953 0x00, 0x00, 0x00, 0x01, 0x50, 0x12, 0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
1954 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1957static const uint8_t LUT_24_BB_29_5[] = {
1958 0x80, 0x08, 0x00, 0x00, 0x00, 0x02, 0x90, 0x28, 0x28, 0x00, 0x00, 0x01, 0x80, 0x14,
1959 0x00, 0x00, 0x00, 0x01, 0x50, 0x12, 0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
1960 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1964static const uint8_t LUT_20_VCOMDC_PARTIAL_29_5[] = {
1965 0x00, 0x20, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1966 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1967 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1970static const uint8_t LUT_21_WW_PARTIAL_29_5[] = {
1971 0x00, 0x20, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1972 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1973 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1976static const uint8_t LUT_22_BW_PARTIAL_29_5[] = {
1977 0x80, 0x20, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1978 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1979 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1982static const uint8_t LUT_23_WB_PARTIAL_29_5[] = {
1983 0x40, 0x20, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1984 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1985 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1988static const uint8_t LUT_24_BB_PARTIAL_29_5[] = {
1989 0x00, 0x20, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1990 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1991 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1995 if (!this->power_is_on_) {
1999 this->power_is_on_ =
true;
2005 this->power_is_on_ =
false;
2010 if (this->deep_sleep_between_updates_) {
2013 ESP_LOGD(TAG,
"go to deep sleep");
2014 this->is_deep_sleep_ =
true;
2022 if (this->deep_sleep_between_updates_ && this->is_deep_sleep_) {
2023 ESP_LOGI(TAG,
"wake up from deep sleep");
2025 this->is_deep_sleep_ =
false;
2053 this->
data(0b10111111);
2062 ESP_LOGD(TAG,
"panel setting done");
2068 this->deep_sleep_between_updates_ =
true;
2073 if (this->old_buffer_ ==
nullptr) {
2074 ESP_LOGE(TAG,
"Could not allocate old buffer for display!");
2078 this->old_buffer_[i] = 0xFF;
2090 this->
write_lut_(LUT_20_VCOMDC_29_5,
sizeof(LUT_20_VCOMDC_29_5));
2092 this->
write_lut_(LUT_21_WW_29_5,
sizeof(LUT_21_WW_29_5));
2094 this->
write_lut_(LUT_22_BW_29_5,
sizeof(LUT_22_BW_29_5));
2096 this->
write_lut_(LUT_23_WB_29_5,
sizeof(LUT_23_WB_29_5));
2098 this->
write_lut_(LUT_24_BB_29_5,
sizeof(LUT_24_BB_29_5));
2099 ESP_LOGD(TAG,
"initialized full update");
2110 this->
write_lut_(LUT_20_VCOMDC_PARTIAL_29_5,
sizeof(LUT_20_VCOMDC_PARTIAL_29_5));
2112 this->
write_lut_(LUT_21_WW_PARTIAL_29_5,
sizeof(LUT_21_WW_PARTIAL_29_5));
2114 this->
write_lut_(LUT_22_BW_PARTIAL_29_5,
sizeof(LUT_22_BW_PARTIAL_29_5));
2116 this->
write_lut_(LUT_23_WB_PARTIAL_29_5,
sizeof(LUT_23_WB_PARTIAL_29_5));
2118 this->
write_lut_(LUT_24_BB_PARTIAL_29_5,
sizeof(LUT_24_BB_PARTIAL_29_5));
2119 ESP_LOGD(TAG,
"initialized partial update");
2123 bool full_update = this->at_update_ == 0;
2157 this->old_buffer_[i] = this->
buffer_[i];
2168 ESP_LOGD(TAG,
"full update done");
2171 ESP_LOGD(TAG,
"partial update done");
2174 this->at_update_ = (this->at_update_ + 1) % this->full_update_every_;
2182 for (uint8_t i = 0; i < size; i++)
2192 LOG_DISPLAY(
"",
"Waveshare E-Paper (Good Display)",
this);
2193 ESP_LOGCONFIG(TAG,
" Model: 2.9in Greyscale GDEW029T5");
2195 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2196 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2197 ESP_LOGCONFIG(TAG,
" Full Update Every: %" PRIu32, this->full_update_every_);
2198 LOG_UPDATE_INTERVAL(
this);
2215 this->init_internal_();
2218 if (this->lastbuff_ !=
nullptr) {
2224void GDEW0154M09::reset_() {
2234void GDEW0154M09::init_internal_() {
2245 const uint8_t panel_setting_1 = 0b11011111;
2252 const uint8_t panel_setting_2 = 0b01110;
2254 const uint8_t wf_t0154_cz_b3_list[] = {
2256 CMD_PSR_PANEL_SETTING, 2, panel_setting_1, panel_setting_2,
2257 CMD_UNDOCUMENTED_0x4D, 1, 0x55,
2258 CMD_UNDOCUMENTED_0xAA, 1, 0x0f,
2259 CMD_UNDOCUMENTED_0xE9, 1, 0x02,
2260 CMD_UNDOCUMENTED_0xB6, 1, 0x11,
2261 CMD_UNDOCUMENTED_0xF3, 1, 0x0a,
2262 CMD_TRES_RESOLUTION_SETTING, 3, 0xc8, 0x00, 0xc8,
2263 CMD_TCON_TCONSETTING, 1, 0x00,
2264 CMD_CDI_VCOM_DATA_INTERVAL, 1, 0xd7,
2265 CMD_PWS_POWER_SAVING, 1, 0x00,
2270 this->write_init_list_(wf_t0154_cz_b3_list);
2275void GDEW0154M09::write_init_list_(
const uint8_t *list) {
2276 uint8_t list_limit = list[0];
2277 uint8_t *start_ptr = ((uint8_t *) list + 1);
2278 for (uint8_t i = 0; i < list_limit; i++) {
2279 this->
command(*(start_ptr + 0));
2280 for (uint8_t dnum = 0; dnum < *(start_ptr + 1); dnum++) {
2281 this->
data(*(start_ptr + 2 + dnum));
2283 start_ptr += (*(start_ptr + 1) + 2);
2287void GDEW0154M09::clear_() {
2289 for (uint8_t j = 0; j < 2; j++) {
2290 this->
command(CMD_DTM1_DATA_START_TRANS);
2291 for (uint32_t count = 0; count < pixsize; count++) {
2294 this->
command(CMD_DTM2_DATA_START_TRANS2);
2295 for (uint32_t count = 0; count < pixsize; count++) {
2298 this->
command(CMD_DISPLAY_REFRESH);
2305 this->init_internal_();
2307 this->
command(CMD_DTM1_DATA_START_TRANS);
2311 this->
command(CMD_DTM2_DATA_START_TRANS2);
2315 this->
command(CMD_DISPLAY_REFRESH);
2323 this->
command(CMD_POF_POWER_OFF);
2326 this->
command(CMD_DSLP_DEEP_SLEEP);
2327 this->
data(DATA_DSLP_DEEP_SLEEP);
2333 LOG_DISPLAY(
"",
"M5Stack CoreInk E-Paper (Good Display)",
this);
2334 ESP_LOGCONFIG(TAG,
" Model: 1.54in Greyscale GDEW0154M09");
2336 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2337 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2338 LOG_UPDATE_INTERVAL(
this);
2355 this->init_display_();
2356 ESP_LOGD(TAG,
"Initialization complete, set the display to deep sleep");
2369void GDEY042T81::reset_() {
2378void GDEY042T81::init_display_() {
2424void GDEY042T81::update_full_() {
2445void GDEY042T81::update_part_() {
2458 ESP_LOGD(TAG,
"Wake up the display");
2459 this->init_display_();
2463 ESP_LOGE(TAG,
"Failed to perform update, display is busy");
2469 ESP_LOGD(TAG,
"Full update");
2477 this->update_full_();
2483 ESP_LOGD(TAG,
"Update");
2496 this->update_full_();
2505 ESP_LOGD(TAG,
"Partial update");
2509 ESP_LOGE(TAG,
"Failed to perform partial update, display is busy");
2519 this->update_part_();
2524 ESP_LOGD(TAG,
"Set the display back to deep sleep");
2532 LOG_DISPLAY(
"",
"GoodDisplay E-Paper",
this);
2534 " Model: 4.2in B/W GDEY042T81\n"
2535 " Full Update Every: %" PRIu32,
2538 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2539 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2540 LOG_UPDATE_INTERVAL(
this);
2543static const uint8_t LUT_VCOM_DC_4_2[] = {
2544 0x00, 0x17, 0x00, 0x00, 0x00, 0x02, 0x00, 0x17, 0x17, 0x00, 0x00, 0x02, 0x00, 0x0A, 0x01,
2545 0x00, 0x00, 0x01, 0x00, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2546 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2548static const uint8_t LUT_WHITE_TO_WHITE_4_2[] = {
2549 0x40, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x40, 0x0A,
2550 0x01, 0x00, 0x00, 0x01, 0xA0, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
2551 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2553static const uint8_t LUT_BLACK_TO_WHITE_4_2[] = {
2554 0x40, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x40, 0x0A,
2555 0x01, 0x00, 0x00, 0x01, 0xA0, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
2556 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2559static const uint8_t LUT_BLACK_TO_BLACK_4_2[] = {
2560 0x80, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x80, 0x0A,
2561 0x01, 0x00, 0x00, 0x01, 0x50, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
2562 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2565static const uint8_t LUT_WHITE_TO_BLACK_4_2[] = {
2566 0x80, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x80, 0x0A,
2567 0x01, 0x00, 0x00, 0x01, 0x50, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
2568 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2603 for (uint8_t i : LUT_VCOM_DC_4_2)
2607 for (uint8_t i : LUT_WHITE_TO_WHITE_4_2)
2611 for (uint8_t i : LUT_BLACK_TO_WHITE_4_2)
2615 for (uint8_t i : LUT_WHITE_TO_BLACK_4_2)
2619 for (uint8_t i : LUT_BLACK_TO_BLACK_4_2)
2657 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2658 ESP_LOGCONFIG(TAG,
" Model: 4.2in");
2660 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2661 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2662 LOG_UPDATE_INTERVAL(
this);
2713 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2714 ESP_LOGCONFIG(TAG,
" Model: 4.2in (B V2)");
2716 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2717 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2718 LOG_UPDATE_INTERVAL(
this);
2749 for (uint32_t i = 0; i < buf_len; ++i) {
2755 for (uint32_t i = 0; i < buf_len; ++i) {
2771 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2772 ESP_LOGCONFIG(TAG,
" Model: 4.2in (B V2) BWR-Mode");
2774 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2775 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2776 LOG_UPDATE_INTERVAL(
this);
2837 uint8_t temp1 = this->
buffer_[i];
2838 for (uint8_t j = 0; j < 8; j++) {
2868 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2869 ESP_LOGCONFIG(TAG,
" Model: 5.83in");
2871 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2872 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2873 LOG_UPDATE_INTERVAL(
this);
2949 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2950 ESP_LOGCONFIG(TAG,
" Model: 5.83inv2");
2952 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2953 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2954 LOG_UPDATE_INTERVAL(
this);
2974 if (this->old_buffer_ ==
nullptr) {
2975 ESP_LOGE(TAG,
"Could not allocate old buffer for display!");
2987void GDEY0583T81::power_on_() {
2988 if (!this->power_is_on_) {
2992 this->power_is_on_ =
true;
2993 this->is_deep_sleep_ =
false;
2996void GDEY0583T81::power_off_() {
2999 this->power_is_on_ =
false;
3003 if (this->is_deep_sleep_) {
3017 this->is_deep_sleep_ =
true;
3020void GDEY0583T81::reset_() {
3030void GDEY0583T81::init_full_() {
3031 this->init_display_();
3049void GDEY0583T81::init_partial_() {
3050 this->init_display_();
3061void GDEY0583T81::init_display_() {
3090 bool full_update = this->at_update_ == 0;
3094 this->init_partial_();
3138 this->old_buffer_[i] = this->
buffer_[i];
3147 ESP_LOGD(TAG,
"Full update done");
3151 ESP_LOGD(TAG,
"Partial update done, next full update after %" PRIu32
" cycles",
3152 this->full_update_every_ - this->at_update_ - 1);
3155 this->at_update_ = (this->at_update_ + 1) % this->full_update_every_;
3165 LOG_DISPLAY(
"",
"GoodDisplay E-Paper",
this);
3167 " Model: 5.83in B/W GDEY0583T81\n"
3168 " Full Update Every: %" PRIu32,
3169 this->full_update_every_);
3171 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3172 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3173 LOG_UPDATE_INTERVAL(
this);
3244 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
3245 ESP_LOGCONFIG(TAG,
" Model: 7.5in-bv2");
3247 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3248 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3249 LOG_UPDATE_INTERVAL(
this);
3258 const uint32_t start =
millis();
3262 ESP_LOGI(TAG,
"Timeout while displaying image!");
3327 uint8_t lut_vcom_7_i_n5_v2[] = {
3328 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0xF, 0x1, 0xF, 0x1, 0x2, 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
3329 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
3332 uint8_t lut_ww_7_i_n5_v2[] = {
3333 0x10, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x20, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
3334 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
3337 uint8_t lut_bw_7_i_n5_v2[] = {
3338 0x10, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x20, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
3339 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
3342 uint8_t lut_wb_7_i_n5_v2[] = {
3343 0x80, 0xF, 0xF, 0x0, 0x0, 0x3, 0x84, 0xF, 0x1, 0xF, 0x1, 0x4, 0x40, 0xF, 0xF, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0,
3344 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
3347 uint8_t lut_bb_7_i_n5_v2[] = {
3348 0x80, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x40, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
3349 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
3354 for (count = 0; count < 42; count++)
3355 this->
data(lut_vcom_7_i_n5_v2[count]);
3358 for (count = 0; count < 42; count++)
3359 this->
data(lut_ww_7_i_n5_v2[count]);
3362 for (count = 0; count < 42; count++)
3363 this->
data(lut_bw_7_i_n5_v2[count]);
3366 for (count = 0; count < 42; count++)
3367 this->
data(lut_wb_7_i_n5_v2[count]);
3370 for (count = 0; count < 42; count++)
3371 this->
data(lut_bb_7_i_n5_v2[count]);
3378 for (uint32_t i = 0; i < buf_len; i++) {
3384 for (uint32_t i = 0; i < buf_len; i++) {
3396 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
3397 ESP_LOGCONFIG(TAG,
" Model: 7.5in-bv3");
3399 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3400 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3401 LOG_UPDATE_INTERVAL(
this);
3410 const uint32_t start =
millis();
3414 ESP_LOGI(TAG,
"Timeout while displaying image!");
3478 for (uint32_t i = 0; i < buf_len; i++) {
3484 for (uint32_t i = 0; i < buf_len; i++) {
3496 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
3497 ESP_LOGCONFIG(TAG,
" Model: 7.5in-bv3 BWR-Mode");
3499 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3500 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3501 LOG_UPDATE_INTERVAL(
this);
3551 uint8_t temp1 = this->
buffer_[i];
3552 for (uint8_t j = 0; j < 8; j++) {
3579 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
3580 ESP_LOGCONFIG(TAG,
" Model: 7.5in");
3582 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3583 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3584 LOG_UPDATE_INTERVAL(
this);
3589namespace cmddata_5P65InF {
3598static const uint8_t R00_CMD_PSR[] = {0x00, 0xEF, 0x08};
3602static const uint8_t R01_CMD_PWR[] = {0x01, 0x07, 0x00, 0x00, 0x00};
3605static const uint8_t R02_CMD_POF[] = {0x02};
3609static const uint8_t R03_CMD_PFS[] = {0x03, 0x00};
3612static const uint8_t R04_CMD_PON[] = {0x04};
3615static const uint8_t R06_CMD_BTST[] = {0x06, 0xC7, 0xC7, 0x1D};
3620static const uint8_t R07_CMD_DSLP[] = {0x07, 0xA5};
3624static const uint8_t R10_CMD_DTM1[] = {0x10};
3627static const uint8_t R11_CMD_DSP[] = {0x11};
3630static const uint8_t R12_CMD_DRF[] = {0x12};
3633static const uint8_t R13_CMD_IPC[] = {0x13, 0x00};
3637static const uint8_t R30_CMD_PLL[] = {0x30, 0x3C};
3641static const uint8_t R41_CMD_TSE[] = {0x41, 0x00};
3646static const uint8_t R50_CMD_CDI[] = {0x50, 0x37};
3651static const uint8_t R60_CMD_TCON[] = {0x60, 0x22};
3656static const uint8_t R61_CMD_TRES[] = {0x61, 0x02, 0x58, 0x01, 0xC0};
3659static const uint8_t RE3_CMD_PWS[] = {0xE3, 0xAA};
3663 if (this->
buffers_[0] ==
nullptr) {
3664 ESP_LOGE(TAG,
"Buffer unavailable!");
3672 using namespace cmddata_5P65InF;
3674 this->
cmd_data(R00_CMD_PSR,
sizeof(R00_CMD_PSR));
3675 this->
cmd_data(R01_CMD_PWR,
sizeof(R01_CMD_PWR));
3676 this->
cmd_data(R03_CMD_PFS,
sizeof(R03_CMD_PFS));
3677 this->
cmd_data(R06_CMD_BTST,
sizeof(R06_CMD_BTST));
3678 this->
cmd_data(R30_CMD_PLL,
sizeof(R30_CMD_PLL));
3679 this->
cmd_data(R41_CMD_TSE,
sizeof(R41_CMD_TSE));
3680 this->
cmd_data(R50_CMD_CDI,
sizeof(R50_CMD_CDI));
3681 this->
cmd_data(R60_CMD_TCON,
sizeof(R60_CMD_TCON));
3682 this->
cmd_data(R61_CMD_TRES,
sizeof(R61_CMD_TRES));
3683 this->
cmd_data(RE3_CMD_PWS,
sizeof(RE3_CMD_PWS));
3686 this->
cmd_data(R50_CMD_CDI,
sizeof(R50_CMD_CDI));
3688 ESP_LOGI(TAG,
"Display initialized successfully");
3693 ESP_LOGI(TAG,
"Initialise the display");
3696 using namespace cmddata_5P65InF;
3699 ESP_LOGI(TAG,
"Sending data to the display");
3700 this->
cmd_data(R61_CMD_TRES,
sizeof(R61_CMD_TRES));
3701 this->
cmd_data(R10_CMD_DTM1,
sizeof(R10_CMD_DTM1));
3705 ESP_LOGI(TAG,
"Power on the display");
3706 this->
cmd_data(R04_CMD_PON,
sizeof(R04_CMD_PON));
3710 ESP_LOGI(TAG,
"Refresh the display");
3711 this->
cmd_data(R12_CMD_DRF,
sizeof(R12_CMD_DRF));
3715 ESP_LOGI(TAG,
"Power off the display");
3716 this->
cmd_data(R02_CMD_POF,
sizeof(R02_CMD_POF));
3720 ESP_LOGI(TAG,
"Set the display to deep sleep");
3721 this->
cmd_data(R07_CMD_DSLP,
sizeof(R07_CMD_DSLP));
3730 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
3731 ESP_LOGCONFIG(TAG,
" Model: 5.65in-F");
3733 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3734 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3735 LOG_UPDATE_INTERVAL(
this);
3743 const uint32_t start =
millis();
3746 ESP_LOGE(TAG,
"Timeout while displaying image!");
3756 if (this->
buffers_[0] ==
nullptr) {
3757 ESP_LOGE(TAG,
"Buffer unavailable!");
3856 ESP_LOGI(TAG,
"Display initialized successfully");
3860 ESP_LOGI(TAG,
"Initialise the display");
3864 ESP_LOGI(TAG,
"Sending data to the display");
3869 ESP_LOGI(TAG,
"Power on the display");
3874 ESP_LOGI(TAG,
"Refresh the display");
3880 ESP_LOGI(TAG,
"Power off the display");
3886 ESP_LOGI(TAG,
"Set the display to deep sleep");
3895 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
3896 ESP_LOGCONFIG(TAG,
" Model: 7.3in-F");
3898 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3899 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3900 LOG_UPDATE_INTERVAL(
this);
3907 const uint32_t start =
millis();
3910 ESP_LOGE(TAG,
"Timeout while displaying image!");
3924 const uint32_t start =
millis();
3928 ESP_LOGE(TAG,
"Timeout while displaying image!");
3983 ESP_LOGI(TAG,
"Power on the display and hat");
3995 for (uint32_t i = 0; i < buf_len; i++) {
4007 ESP_LOGV(TAG,
"Before command(0x02) (>> power off)");
4010 ESP_LOGV(TAG,
"After command(0x02) (>> power off)");
4017 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
4018 ESP_LOGCONFIG(TAG,
" Model: 7.5inV2rev2");
4020 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
4021 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
4022 LOG_UPDATE_INTERVAL(
this);
4031 const uint32_t start =
millis();
4035 ESP_LOGI(TAG,
"Timeout while displaying image!");
4101 uint8_t lut_vcom_7_i_n5_v2[] = {
4102 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0xF, 0x1, 0xF, 0x1, 0x2, 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
4103 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4106 uint8_t lut_ww_7_i_n5_v2[] = {
4107 0x10, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x20, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
4108 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4111 uint8_t lut_bw_7_i_n5_v2[] = {
4112 0x10, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x20, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
4113 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4116 uint8_t lut_wb_7_i_n5_v2[] = {
4117 0x80, 0xF, 0xF, 0x0, 0x0, 0x3, 0x84, 0xF, 0x1, 0xF, 0x1, 0x4, 0x40, 0xF, 0xF, 0x0, 0x0, 0x3, 0x0, 0x0, 0x0,
4118 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4121 uint8_t lut_bb_7_i_n5_v2[] = {
4122 0x80, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x40, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
4123 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4128 for (count = 0; count < 42; count++)
4129 this->
data(lut_vcom_7_i_n5_v2[count]);
4132 for (count = 0; count < 42; count++)
4133 this->
data(lut_ww_7_i_n5_v2[count]);
4136 for (count = 0; count < 42; count++)
4137 this->
data(lut_bw_7_i_n5_v2[count]);
4140 for (count = 0; count < 42; count++)
4141 this->
data(lut_wb_7_i_n5_v2[count]);
4144 for (count = 0; count < 42; count++)
4145 this->
data(lut_bb_7_i_n5_v2[count]);
4149 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
4150 ESP_LOGCONFIG(TAG,
" Model: 7.5inV2");
4152 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
4153 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
4154 LOG_UPDATE_INTERVAL(
this);
4163 const uint32_t start =
millis();
4167 ESP_LOGE(TAG,
"Timeout while displaying image!");
4176void WaveshareEPaper7P5InV2P::reset_() {
4187void WaveshareEPaper7P5InV2P::turn_on_display_() {
4253 ESP_LOGI(TAG,
"Power on the display and hat");
4261 for (uint32_t i = 0; i < buf_len; i++) {
4265 this->turn_on_display_();
4285 for (uint32_t i = 0; i < buf_len; i++) {
4294 for (uint32_t i = 0; i < buf_len; i++) {
4301 this->turn_on_display_();
4326 for (uint32_t i = 0; i < buf_len; i++) {
4333 this->turn_on_display_();
4336 ESP_LOGV(TAG,
"Before command(0x02) (>> power off)");
4339 ESP_LOGV(TAG,
"After command(0x02) (>> power off)");
4348 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
4350 " Model: 7.50inv2p\n"
4351 " Full Update Every: %" PRIu32,
4354 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
4355 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
4356 LOG_UPDATE_INTERVAL(
this);
4421 uint8_t eight_pixels = this->
buffer_[i];
4423 for (uint8_t j = 0; j < 8; j += 2) {
4427 uint8_t left_nibble = (eight_pixels & 0x80) ? 0x30 : 0x00;
4429 uint8_t right_nibble = (eight_pixels & 0x80) ? 0x03 : 0x00;
4431 this->
write_byte(left_nibble | right_nibble);
4450 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
4451 ESP_LOGCONFIG(TAG,
" Model: 7.5in-bc");
4453 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
4454 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
4455 LOG_UPDATE_INTERVAL(
this);
4551 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
4552 ESP_LOGCONFIG(TAG,
" Model: 7.5in-HD-b");
4554 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
4555 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
4556 LOG_UPDATE_INTERVAL(
this);
4559static const uint8_t LUT_SIZE_TTGO_DKE_PART = 153;
4561static const uint8_t PART_UPDATE_LUT_TTGO_DKE[LUT_SIZE_TTGO_DKE_PART] = {
4562 0x0, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4563 0x0, 0x0, 0x0, 0x0, 0x40, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0,
4564 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4565 0xF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 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, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4568 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4569 0x0, 0x0, 0x0, 0x0, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x0, 0x0, 0x0,
4579 ESP_LOGI(TAG,
"Performing partial e-paper update.");
4581 ESP_LOGI(TAG,
"Performing full e-paper update.");
4618 this->
write_array(PART_UPDATE_LUT_TTGO_DKE,
sizeof(PART_UPDATE_LUT_TTGO_DKE));
4670 ESP_LOGI(TAG,
"Completed e-paper update.");
4677 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
4678 ESP_LOGCONFIG(TAG,
" Model: 2.13inDKE");
4679 LOG_PIN(
" CS Pin: ", this->
cs_);
4681 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
4682 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
4683 LOG_UPDATE_INTERVAL(
this);
4721 this->
data(0 & 0xFF);
4722 this->
data((0 >> 8) & 0x03);
4727 this->
data(0 & 0xFF);
4728 this->
data((0 >> 8) & 0x03);
4741 this->
data(0 & 0xFF);
4742 this->
data((0 >> 8) & 0x03);
4745 this->
data(0 & 0xFF);
4746 this->
data((0 >> 8) & 0x03);
4765 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
4766 ESP_LOGCONFIG(TAG,
" Model: 13.3inK");
4768 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
4769 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
4770 LOG_UPDATE_INTERVAL(
this);
void feed_wdt(uint32_t time=0)
void status_set_warning(const char *message=nullptr)
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
const 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
Providing packet encoding functions for exchanging data with a remote host.
void IRAM_ATTR HOT delayMicroseconds(uint32_t us)
void IRAM_ATTR 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