12static const uint8_t LUT_SIZE_WAVESHARE = 30;
14static const uint8_t FULL_UPDATE_LUT[LUT_SIZE_WAVESHARE] = {0x02, 0x02, 0x01, 0x11, 0x12, 0x12, 0x22, 0x22, 0x66, 0x69,
15 0x69, 0x59, 0x58, 0x99, 0x99, 0x88, 0x00, 0x00, 0x00, 0x00,
16 0xF8, 0xB4, 0x13, 0x51, 0x35, 0x51, 0x51, 0x19, 0x01, 0x00};
18static const uint8_t PARTIAL_UPDATE_LUT[LUT_SIZE_WAVESHARE] = {
19 0x10, 0x18, 0x18, 0x08, 0x18, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
20 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x14, 0x44, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
22static const uint8_t LUT_SIZE_TTGO = 70;
24static const uint8_t FULL_UPDATE_LUT_TTGO[LUT_SIZE_TTGO] = {
25 0x80, 0x60, 0x40, 0x00, 0x00, 0x00, 0x00,
26 0x10, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00,
27 0x80, 0x60, 0x40, 0x00, 0x00, 0x00, 0x00,
28 0x10, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00,
29 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
30 0x03, 0x03, 0x00, 0x00, 0x02,
31 0x09, 0x09, 0x00, 0x00, 0x02,
32 0x03, 0x03, 0x00, 0x00, 0x02,
33 0x00, 0x00, 0x00, 0x00, 0x00,
34 0x00, 0x00, 0x00, 0x00, 0x00,
35 0x00, 0x00, 0x00, 0x00, 0x00,
36 0x00, 0x00, 0x00, 0x00, 0x00,
39static const uint8_t PARTIAL_UPDATE_LUT_TTGO[LUT_SIZE_TTGO] = {
40 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
41 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
42 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
43 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
44 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
45 0x0A, 0x00, 0x00, 0x00, 0x00,
46 0x00, 0x00, 0x00, 0x00, 0x00,
47 0x00, 0x00, 0x00, 0x00, 0x00,
48 0x00, 0x00, 0x00, 0x00, 0x00,
49 0x00, 0x00, 0x00, 0x00, 0x00,
50 0x00, 0x00, 0x00, 0x00, 0x00,
51 0x00, 0x00, 0x00, 0x00, 0x00,
54static const uint8_t LUT_SIZE_TTGO_B73 = 100;
56static const uint8_t FULL_UPDATE_LUT_TTGO_B73[LUT_SIZE_TTGO_B73] = {
57 0xA0, 0x90, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x90, 0xA0, 0x00, 0x00, 0x00, 0x00,
58 0x00, 0x00, 0x00, 0xA0, 0x90, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x90, 0xA0, 0x00,
59 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
61 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x03, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00,
62 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
63 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
66static const uint8_t PARTIAL_UPDATE_LUT_TTGO_B73[LUT_SIZE_TTGO_B73] = {
67 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
68 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
69 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
71 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
72 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
73 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
76static const uint8_t LUT_SIZE_TTGO_B1 = 29;
78static const uint8_t FULL_UPDATE_LUT_TTGO_B1[LUT_SIZE_TTGO_B1] = {
79 0x22, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
80 0x00, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x01, 0x00, 0x00, 0x00, 0x00};
82static const uint8_t PARTIAL_UPDATE_LUT_TTGO_B1[LUT_SIZE_TTGO_B1] = {
83 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
84 0x00, 0x0F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
88static const uint8_t PARTIAL_UPD_2IN9_LUT_SIZE = 159;
89static const uint8_t PARTIAL_UPD_2IN9_LUT[PARTIAL_UPD_2IN9_LUT_SIZE] =
91 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
92 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
93 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
94 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
95 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
96 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
97 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
98 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
99 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
100 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
101 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
102 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
103 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
104 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
105 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
106 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
107 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
108 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0x00,
109 0x22, 0x17, 0x41, 0xB0, 0x32, 0x36,
162 ESP_LOGE(TAG,
"Timeout while displaying image!");
176 Display::fill(color);
181 const uint8_t
fill = color.
is_on() ? 0x00 : 0xFF;
199 ESP_LOGE(TAG,
"Could not allocate buffer %d for display!", i);
211 if (color.
red > 127) {
212 if (color.
green > 170) {
213 if (color.
blue > 127) {
218 }
else if (color.
green > 85) {
224 if (color.
green > 127) {
225 if (color.
blue > 127) {
231 if (color.
blue > 127) {
256 ESP_LOGE(TAG,
"Buffer unavailable!");
260 for (
uint32_t buffer_pos = 0; buffer_pos < small_buffer_length; buffer_pos += 3) {
264 buffer[buffer_pos + 0] = pixel_color << 5 | pixel_color << 2 | pixel_color >> 1;
265 buffer[buffer_pos + 1] = pixel_color << 7 | pixel_color << 4 | pixel_color << 1 | pixel_color >> 2;
266 buffer[buffer_pos + 2] = pixel_color << 6 | pixel_color << 3 | pixel_color << 0;
274 ESP_LOGE(TAG,
"Buffer unavailable!");
279 uint8_t byte_to_send;
281 for (
uint32_t buffer_pos = 0; buffer_pos < small_buffer_length; buffer_pos += 3) {
282 std::bitset<24> triplet =
283 buffer[buffer_pos + 0] << 16 |
buffer[buffer_pos + 1] << 8 |
buffer[buffer_pos + 2] << 0;
287 byte_to_send = ((triplet >> 17).to_ulong() & 0b01110000) | ((triplet >> 18).to_ulong() & 0b00000111);
288 this->
data(byte_to_send);
290 byte_to_send = ((triplet >> 11).to_ulong() & 0b01110000) | ((triplet >> 12).to_ulong() & 0b00000111);
291 this->
data(byte_to_send);
293 byte_to_send = ((triplet >> 5).to_ulong() & 0b01110000) | ((triplet >> 6).to_ulong() & 0b00000111);
294 this->
data(byte_to_send);
296 byte_to_send = ((triplet << 1).to_ulong() & 0b01110000) | ((triplet << 0).to_ulong() & 0b00000111);
297 this->
data(byte_to_send);
318 const uint8_t subpos =
x & 0x07;
320 if (!color.
is_on()) {
347 const uint8_t subpos =
x & 0x07;
356 if (((color.
red > 0) && (color.
green == 0) && (color.
blue == 0))) {
357 this->
buffer_[pos + buf_half_len] |= 0x80 >> subpos;
359 this->
buffer_[pos + buf_half_len] &= ~(0x80 >> subpos);
369 uint32_t first_bit_position = pixel_position * 3;
370 uint32_t byte_position = first_bit_position / 8u;
371 uint32_t byte_subposition = first_bit_position % 8u;
372 uint32_t buffer_position = byte_position / small_buffer_length;
373 uint32_t buffer_subposition = byte_position % small_buffer_length;
375 if (byte_subposition <= 5) {
376 this->
buffers_[buffer_position][buffer_subposition] =
377 (this->
buffers_[buffer_position][buffer_subposition] & (0xFF ^ (0b111 << (5 - byte_subposition)))) |
378 (pixel_bits << (5 - byte_subposition));
380 this->
buffers_[buffer_position][buffer_subposition + 0] =
381 (this->
buffers_[buffer_position][buffer_subposition + 0] & (0xFF ^ (0b111 >> (byte_subposition - 5)))) |
382 (pixel_bits >> (byte_subposition - 5));
384 this->
buffers_[buffer_position][buffer_subposition + 1] = (this->
buffers_[buffer_position][buffer_subposition + 1] &
385 (0xFF ^ (0xFF & (0b111 << (13 - byte_subposition))))) |
386 (pixel_bits << (13 - byte_subposition));
416 ESP_LOGI(TAG,
"Set the display to deep sleep");
481 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
484 ESP_LOGCONFIG(TAG,
" Model: 1.54in");
487 ESP_LOGCONFIG(TAG,
" Model: 1.54inV2");
490 ESP_LOGCONFIG(TAG,
" Model: 2.13in");
493 ESP_LOGCONFIG(TAG,
" Model: 2.13inV2");
496 ESP_LOGCONFIG(TAG,
" Model: 2.13in (TTGO)");
499 ESP_LOGCONFIG(TAG,
" Model: 2.13in (TTGO B73)");
502 ESP_LOGCONFIG(TAG,
" Model: 2.13in (TTGO B74)");
505 ESP_LOGCONFIG(TAG,
" Model: 2.13in (TTGO B1)");
508 ESP_LOGCONFIG(TAG,
" Model: 2.9in");
511 ESP_LOGCONFIG(TAG,
" Model: 2.9inV2");
516 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
518 LOG_UPDATE_INTERVAL(
this);
522 bool prev_full_update = this->
at_update_ == 1;
525 ESP_LOGI(TAG,
"Wake up the display");
537 if (full_update != prev_full_update) {
542 this->
write_lut_(full_update ? FULL_UPDATE_LUT_TTGO : PARTIAL_UPDATE_LUT_TTGO, LUT_SIZE_TTGO);
545 this->
write_lut_(full_update ? FULL_UPDATE_LUT_TTGO_B73 : PARTIAL_UPDATE_LUT_TTGO_B73, LUT_SIZE_TTGO_B73);
551 this->
write_lut_(full_update ? FULL_UPDATE_LUT_TTGO_B1 : PARTIAL_UPDATE_LUT_TTGO_B1, LUT_SIZE_TTGO_B1);
554 this->
write_lut_(full_update ? FULL_UPDATE_LUT : PARTIAL_UPDATE_LUT, LUT_SIZE_WAVESHARE);
563 this->
data(full_update ? 0x55 : 0x26);
585 this->
data(full_update ? 0x05 : 0x80);
589 this->
data(full_update ? 0x03 : 0x01);
651 for (
int j = 0; j < wb; j++) {
677 this->
data(full_update ? 0xF7 : 0xFF);
683 this->
data(full_update ? 0xC7 : 0x0C);
698 ESP_LOGI(TAG,
"Set the display back to deep sleep");
755 for (uint8_t i = 0; i <
size; i++)
782static const uint8_t LUT_VCOM_DC_2_7[44] = {
783 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x00, 0x32, 0x32, 0x00, 0x00, 0x02, 0x00,
784 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
785 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
788static const uint8_t LUT_WHITE_TO_WHITE_2_7[42] = {
789 0x50, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x60, 0x32, 0x32, 0x00, 0x00, 0x02, 0xA0, 0x0F,
790 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
791 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
794static const uint8_t LUT_BLACK_TO_WHITE_2_7[42] = {
795 0x50, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x60, 0x32, 0x32, 0x00, 0x00, 0x02, 0xA0, 0x0F,
796 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
797 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
800static const uint8_t LUT_WHITE_TO_BLACK_2_7[] = {
801 0xA0, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x60, 0x32, 0x32, 0x00, 0x00, 0x02, 0x50, 0x0F,
802 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
803 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
806static const uint8_t LUT_BLACK_TO_BLACK_2_7[42] = {
807 0xA0, 0x0F, 0x0F, 0x00, 0x00, 0x05, 0x60, 0x32, 0x32, 0x00, 0x00, 0x02, 0x50, 0x0F,
808 0x0F, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
809 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
872 for (uint8_t i : LUT_VCOM_DC_2_7)
877 for (uint8_t i : LUT_WHITE_TO_WHITE_2_7)
881 for (uint8_t i : LUT_BLACK_TO_WHITE_2_7)
885 for (uint8_t i : LUT_WHITE_TO_BLACK_2_7)
889 for (uint8_t i : LUT_BLACK_TO_BLACK_2_7)
898 for (
uint32_t i = 0; i < buf_len; i++) {
906 for (
uint32_t i = 0; i < buf_len; i++) {
916 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
917 ESP_LOGCONFIG(TAG,
" Model: 2.7in");
919 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
921 LOG_UPDATE_INTERVAL(
this);
969 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
970 ESP_LOGCONFIG(TAG,
" Model: 2.7in V2");
972 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
974 LOG_UPDATE_INTERVAL(
this);
1032 for (
uint32_t i = 0; i < buf_len_half; i++) {
1040 for (
uint32_t i = buf_len_half; i < buf_len_half * 2u; i++) {
1053 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1054 ESP_LOGCONFIG(TAG,
" Model: 1.54in V2 B");
1056 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1057 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1058 LOG_UPDATE_INTERVAL(
this);
1068static const uint8_t LUT_VCOM_DC_2_7B[44] = {0x00, 0x00, 0x00, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x0A,
1069 0x00, 0x00, 0x08, 0x00, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x00, 0x0A,
1070 0x0A, 0x00, 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x05, 0x00,
1071 0x03, 0x0E, 0x00, 0x00, 0x0A, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01};
1073static const uint8_t LUT_WHITE_TO_WHITE_2_7B[42] = {0x90, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x40, 0x0A, 0x0A, 0x00, 0x00,
1074 0x08, 0x84, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x80, 0x0A, 0x0A, 0x00,
1075 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x05, 0x00, 0x03, 0x0E,
1076 0x00, 0x00, 0x0A, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01};
1078static const uint8_t LUT_BLACK_TO_WHITE_2_7B[42] = {0xA0, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x0A, 0x00, 0x00,
1079 0x08, 0x84, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x90, 0x0A, 0x0A, 0x00,
1080 0x00, 0x08, 0xB0, 0x04, 0x10, 0x00, 0x00, 0x05, 0xB0, 0x03, 0x0E,
1081 0x00, 0x00, 0x0A, 0xC0, 0x23, 0x00, 0x00, 0x00, 0x01};
1083static const uint8_t LUT_WHITE_TO_BLACK_2_7B[] = {0x90, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x20, 0x0A, 0x0A, 0x00, 0x00,
1084 0x08, 0x84, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x10, 0x0A, 0x0A, 0x00,
1085 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x05, 0x00, 0x03, 0x0E,
1086 0x00, 0x00, 0x0A, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01};
1088static const uint8_t LUT_BLACK_TO_BLACK_2_7B[42] = {0x90, 0x1A, 0x1A, 0x00, 0x00, 0x01, 0x40, 0x0A, 0x0A, 0x00, 0x00,
1089 0x08, 0x84, 0x0E, 0x01, 0x0E, 0x01, 0x10, 0x80, 0x0A, 0x0A, 0x00,
1090 0x00, 0x08, 0x00, 0x04, 0x10, 0x00, 0x00, 0x05, 0x00, 0x03, 0x0E,
1091 0x00, 0x00, 0x0A, 0x00, 0x23, 0x00, 0x00, 0x00, 0x01};
1150 for (uint8_t i : LUT_VCOM_DC_2_7B)
1154 for (uint8_t i : LUT_WHITE_TO_WHITE_2_7B)
1158 for (uint8_t i : LUT_BLACK_TO_WHITE_2_7B)
1162 for (uint8_t i : LUT_WHITE_TO_BLACK_2_7B) {
1168 for (uint8_t i : LUT_BLACK_TO_BLACK_2_7B) {
1189 for (
uint32_t i = 0; i < buf_len_half; i++) {
1198 for (
uint32_t i = buf_len_half; i < buf_len_half * 2u; i++) {
1214 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1215 ESP_LOGCONFIG(TAG,
" Model: 2.7in B");
1217 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1218 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1219 LOG_UPDATE_INTERVAL(
this);
1251 this->
data((xend >> 3) & 0xff);
1256 this->
data(yend & 0xff);
1257 this->
data((yend >> 8) & 0xff);
1272 for (
uint32_t i = 0; i < buf_len; i++) {
1280 for (
uint32_t i = 0; i < buf_len; i++) {
1293 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1294 ESP_LOGCONFIG(TAG,
" Model: 2.7in B V2");
1296 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1297 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1298 LOG_UPDATE_INTERVAL(
this);
1372 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1373 ESP_LOGCONFIG(TAG,
" Model: 2.9in (B)");
1375 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1376 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1377 LOG_UPDATE_INTERVAL(
this);
1459 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1460 ESP_LOGCONFIG(TAG,
" Model: 2.9in (D)");
1462 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1463 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1464 LOG_UPDATE_INTERVAL(
this);
1470static const uint8_t LUT_SIZE_DKE = 70;
1471static const uint8_t UPDATE_LUT_DKE[LUT_SIZE_DKE] = {
1472 0xA0, 0x90, 0x50, 0x0, 0x0, 0x0, 0x0, 0x50, 0x90, 0xA0, 0x0, 0x0, 0x0, 0x0, 0xA0, 0x90, 0x50, 0x0,
1473 0x0, 0x0, 0x0, 0x50, 0x90, 0xA0, 0x0, 0x0, 0x0, 0x0, 0x00, 0x00, 0x00, 0x0, 0x0, 0x0, 0x0, 0xF,
1474 0xF, 0x0, 0x0, 0x0, 0xF, 0xF, 0x0, 0x0, 0x02, 0xF, 0xF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1475 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
1477static const uint8_t PART_UPDATE_LUT_DKE[LUT_SIZE_DKE] = {
1478 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xa0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x50, 0x10, 0x00, 0x00,
1479 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
1480 0x05, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1481 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
1482static const uint8_t FULL_UPDATE_LUT_DKE[LUT_SIZE_DKE] = {
1483 0x90, 0x50, 0xa0, 0x50, 0x50, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa0, 0xa0, 0x80, 0x00, 0x90, 0x50, 0xa0, 0x50,
1484 0x50, 0x00, 0x00, 0x00, 0x00, 0x10, 0xa0, 0xa0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17,
1485 0x04, 0x00, 0x00, 0x00, 0x0b, 0x04, 0x00, 0x00, 0x00, 0x06, 0x05, 0x00, 0x00, 0x00, 0x04, 0x05, 0x00, 0x00,
1486 0x00, 0x01, 0x0e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
1550 for (uint8_t v : FULL_UPDATE_LUT_DKE)
1555 ESP_LOGI(TAG,
"Performing e-paper update.");
1581 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1582 ESP_LOGCONFIG(TAG,
" Model: 2.9in DKE");
1584 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1585 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1586 LOG_UPDATE_INTERVAL(
this);
1653 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1654 ESP_LOGCONFIG(TAG,
" Model: 2.9in (B) V3");
1656 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1657 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1658 LOG_UPDATE_INTERVAL(
this);
1709void WaveshareEPaper2P9InV2R2::reset_() {
1721 ESP_LOGE(TAG,
"fail idle 1");
1760 this->
write_lut_(PARTIAL_UPD_2IN9_LUT, PARTIAL_UPD_2IN9_LUT_SIZE);
1782 ESP_LOGE(TAG,
"fail idle 2");
1821 for (uint8_t i = 0; i <
size; i++)
1826 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
1828 " Model: 2.9inV2R2\n"
1829 " Full Update Every: %" PRIu32,
1832 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1833 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1834 LOG_UPDATE_INTERVAL(
this);
1914 LOG_DISPLAY(
"",
"E-Paper (Good Display)",
this);
1915 ESP_LOGCONFIG(TAG,
" Model: 2.9in GDEY029T94");
1917 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
1918 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
1919 LOG_UPDATE_INTERVAL(
this);
1932static const uint8_t LUT_20_VCOMDC_29_5[] = {
1933 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x60, 0x28, 0x28, 0x00, 0x00, 0x01, 0x00, 0x14, 0x00,
1934 0x00, 0x00, 0x01, 0x00, 0x12, 0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1935 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1938static const uint8_t LUT_21_WW_29_5[] = {
1939 0x40, 0x08, 0x00, 0x00, 0x00, 0x02, 0x90, 0x28, 0x28, 0x00, 0x00, 0x01, 0x40, 0x14,
1940 0x00, 0x00, 0x00, 0x01, 0xA0, 0x12, 0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
1941 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1944static const uint8_t LUT_22_BW_29_5[] = {
1945 0x40, 0x08, 0x00, 0x00, 0x00, 0x02, 0x90, 0x28, 0x28, 0x00, 0x00, 0x01, 0x40, 0x14,
1946 0x00, 0x00, 0x00, 0x01, 0xA0, 0x12, 0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
1947 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1950static const uint8_t LUT_23_WB_29_5[] = {
1951 0x80, 0x08, 0x00, 0x00, 0x00, 0x02, 0x90, 0x28, 0x28, 0x00, 0x00, 0x01, 0x80, 0x14,
1952 0x00, 0x00, 0x00, 0x01, 0x50, 0x12, 0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
1953 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1956static const uint8_t LUT_24_BB_29_5[] = {
1957 0x80, 0x08, 0x00, 0x00, 0x00, 0x02, 0x90, 0x28, 0x28, 0x00, 0x00, 0x01, 0x80, 0x14,
1958 0x00, 0x00, 0x00, 0x01, 0x50, 0x12, 0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
1959 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1963static const uint8_t LUT_20_VCOMDC_PARTIAL_29_5[] = {
1964 0x00, 0x20, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1965 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1966 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1969static const uint8_t LUT_21_WW_PARTIAL_29_5[] = {
1970 0x00, 0x20, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1971 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1972 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1975static const uint8_t LUT_22_BW_PARTIAL_29_5[] = {
1976 0x80, 0x20, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1977 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1978 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1981static const uint8_t LUT_23_WB_PARTIAL_29_5[] = {
1982 0x40, 0x20, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1983 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1984 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1987static const uint8_t LUT_24_BB_PARTIAL_29_5[] = {
1988 0x00, 0x20, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1989 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1990 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1994 if (!this->power_is_on_) {
1998 this->power_is_on_ =
true;
2004 this->power_is_on_ =
false;
2009 if (this->deep_sleep_between_updates_) {
2012 ESP_LOGD(TAG,
"go to deep sleep");
2013 this->is_deep_sleep_ =
true;
2021 if (this->deep_sleep_between_updates_ && this->is_deep_sleep_) {
2022 ESP_LOGI(TAG,
"wake up from deep sleep");
2024 this->is_deep_sleep_ =
false;
2052 this->
data(0b10111111);
2061 ESP_LOGD(TAG,
"panel setting done");
2067 this->deep_sleep_between_updates_ =
true;
2072 if (this->old_buffer_ ==
nullptr) {
2073 ESP_LOGE(TAG,
"Could not allocate old buffer for display!");
2077 this->old_buffer_[i] = 0xFF;
2089 this->
write_lut_(LUT_20_VCOMDC_29_5,
sizeof(LUT_20_VCOMDC_29_5));
2091 this->
write_lut_(LUT_21_WW_29_5,
sizeof(LUT_21_WW_29_5));
2093 this->
write_lut_(LUT_22_BW_29_5,
sizeof(LUT_22_BW_29_5));
2095 this->
write_lut_(LUT_23_WB_29_5,
sizeof(LUT_23_WB_29_5));
2097 this->
write_lut_(LUT_24_BB_29_5,
sizeof(LUT_24_BB_29_5));
2098 ESP_LOGD(TAG,
"initialized full update");
2109 this->
write_lut_(LUT_20_VCOMDC_PARTIAL_29_5,
sizeof(LUT_20_VCOMDC_PARTIAL_29_5));
2111 this->
write_lut_(LUT_21_WW_PARTIAL_29_5,
sizeof(LUT_21_WW_PARTIAL_29_5));
2113 this->
write_lut_(LUT_22_BW_PARTIAL_29_5,
sizeof(LUT_22_BW_PARTIAL_29_5));
2115 this->
write_lut_(LUT_23_WB_PARTIAL_29_5,
sizeof(LUT_23_WB_PARTIAL_29_5));
2117 this->
write_lut_(LUT_24_BB_PARTIAL_29_5,
sizeof(LUT_24_BB_PARTIAL_29_5));
2118 ESP_LOGD(TAG,
"initialized partial update");
2122 bool full_update = this->at_update_ == 0;
2156 this->old_buffer_[i] = this->
buffer_[i];
2167 ESP_LOGD(TAG,
"full update done");
2170 ESP_LOGD(TAG,
"partial update done");
2173 this->at_update_ = (this->at_update_ + 1) % this->full_update_every_;
2181 for (uint8_t i = 0; i <
size; i++)
2189 LOG_DISPLAY(
"",
"Waveshare E-Paper (Good Display)",
this);
2190 ESP_LOGCONFIG(TAG,
" Model: 2.9in Greyscale GDEW029T5");
2192 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2193 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2194 ESP_LOGCONFIG(TAG,
" Full Update Every: %" PRIu32, this->full_update_every_);
2195 LOG_UPDATE_INTERVAL(
this);
2212 this->init_internal_();
2215 if (this->lastbuff_ !=
nullptr) {
2221void GDEW0154M09::reset_() {
2231void GDEW0154M09::init_internal_() {
2242 const uint8_t panel_setting_1 = 0b11011111;
2249 const uint8_t panel_setting_2 = 0b01110;
2251 const uint8_t wf_t0154_cz_b3_list[] = {
2253 CMD_PSR_PANEL_SETTING, 2, panel_setting_1, panel_setting_2,
2254 CMD_UNDOCUMENTED_0x4D, 1, 0x55,
2255 CMD_UNDOCUMENTED_0xAA, 1, 0x0f,
2256 CMD_UNDOCUMENTED_0xE9, 1, 0x02,
2257 CMD_UNDOCUMENTED_0xB6, 1, 0x11,
2258 CMD_UNDOCUMENTED_0xF3, 1, 0x0a,
2259 CMD_TRES_RESOLUTION_SETTING, 3, 0xc8, 0x00, 0xc8,
2260 CMD_TCON_TCONSETTING, 1, 0x00,
2261 CMD_CDI_VCOM_DATA_INTERVAL, 1, 0xd7,
2262 CMD_PWS_POWER_SAVING, 1, 0x00,
2267 this->write_init_list_(wf_t0154_cz_b3_list);
2272void GDEW0154M09::write_init_list_(
const uint8_t *list) {
2273 uint8_t list_limit = list[0];
2274 uint8_t *start_ptr = ((uint8_t *) list + 1);
2275 for (uint8_t i = 0; i < list_limit; i++) {
2276 this->
command(*(start_ptr + 0));
2277 for (uint8_t dnum = 0; dnum < *(start_ptr + 1); dnum++) {
2278 this->
data(*(start_ptr + 2 + dnum));
2280 start_ptr += (*(start_ptr + 1) + 2);
2284void GDEW0154M09::clear_() {
2286 for (uint8_t j = 0;
j < 2;
j++) {
2287 this->
command(CMD_DTM1_DATA_START_TRANS);
2291 this->
command(CMD_DTM2_DATA_START_TRANS2);
2295 this->
command(CMD_DISPLAY_REFRESH);
2302 this->init_internal_();
2304 this->
command(CMD_DTM1_DATA_START_TRANS);
2308 this->
command(CMD_DTM2_DATA_START_TRANS2);
2312 this->
command(CMD_DISPLAY_REFRESH);
2320 this->
command(CMD_POF_POWER_OFF);
2323 this->
command(CMD_DSLP_DEEP_SLEEP);
2324 this->
data(DATA_DSLP_DEEP_SLEEP);
2330 LOG_DISPLAY(
"",
"M5Stack CoreInk E-Paper (Good Display)",
this);
2331 ESP_LOGCONFIG(TAG,
" Model: 1.54in Greyscale GDEW0154M09");
2333 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2334 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2335 LOG_UPDATE_INTERVAL(
this);
2352 this->init_display_();
2353 ESP_LOGD(TAG,
"Initialization complete, set the display to deep sleep");
2366void GDEY042T81::reset_() {
2375void GDEY042T81::init_display_() {
2421void GDEY042T81::update_full_() {
2442void GDEY042T81::update_part_() {
2455 ESP_LOGD(TAG,
"Wake up the display");
2456 this->init_display_();
2460 ESP_LOGE(TAG,
"Failed to perform update, display is busy");
2466 ESP_LOGD(TAG,
"Full update");
2474 this->update_full_();
2480 ESP_LOGD(TAG,
"Update");
2493 this->update_full_();
2502 ESP_LOGD(TAG,
"Partial update");
2506 ESP_LOGE(TAG,
"Failed to perform partial update, display is busy");
2516 this->update_part_();
2521 ESP_LOGD(TAG,
"Set the display back to deep sleep");
2528 LOG_DISPLAY(
"",
"GoodDisplay E-Paper",
this);
2530 " Model: 4.2in B/W GDEY042T81\n"
2531 " Full Update Every: %" PRIu32,
2534 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2535 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2536 LOG_UPDATE_INTERVAL(
this);
2539static const uint8_t LUT_VCOM_DC_4_2[] = {
2540 0x00, 0x17, 0x00, 0x00, 0x00, 0x02, 0x00, 0x17, 0x17, 0x00, 0x00, 0x02, 0x00, 0x0A, 0x01,
2541 0x00, 0x00, 0x01, 0x00, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2542 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2544static const uint8_t LUT_WHITE_TO_WHITE_4_2[] = {
2545 0x40, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x40, 0x0A,
2546 0x01, 0x00, 0x00, 0x01, 0xA0, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
2547 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2549static const uint8_t LUT_BLACK_TO_WHITE_4_2[] = {
2550 0x40, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x40, 0x0A,
2551 0x01, 0x00, 0x00, 0x01, 0xA0, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
2552 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2555static const uint8_t LUT_BLACK_TO_BLACK_4_2[] = {
2556 0x80, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x80, 0x0A,
2557 0x01, 0x00, 0x00, 0x01, 0x50, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
2558 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2561static const uint8_t LUT_WHITE_TO_BLACK_4_2[] = {
2562 0x80, 0x17, 0x00, 0x00, 0x00, 0x02, 0x90, 0x17, 0x17, 0x00, 0x00, 0x02, 0x80, 0x0A,
2563 0x01, 0x00, 0x00, 0x01, 0x50, 0x0E, 0x0E, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
2564 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2599 for (uint8_t i : LUT_VCOM_DC_4_2)
2603 for (uint8_t i : LUT_WHITE_TO_WHITE_4_2)
2607 for (uint8_t i : LUT_BLACK_TO_WHITE_4_2)
2611 for (uint8_t i : LUT_WHITE_TO_BLACK_4_2)
2615 for (uint8_t i : LUT_BLACK_TO_BLACK_4_2)
2653 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2654 ESP_LOGCONFIG(TAG,
" Model: 4.2in");
2656 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2657 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2658 LOG_UPDATE_INTERVAL(
this);
2709 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2710 ESP_LOGCONFIG(TAG,
" Model: 4.2in (B V2)");
2712 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2713 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2714 LOG_UPDATE_INTERVAL(
this);
2745 for (
uint32_t i = 0; i < buf_len; ++i) {
2751 for (
uint32_t i = 0; i < buf_len; ++i) {
2767 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2768 ESP_LOGCONFIG(TAG,
" Model: 4.2in (B V2) BWR-Mode");
2770 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2771 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2772 LOG_UPDATE_INTERVAL(
this);
2833 uint8_t temp1 = this->
buffer_[i];
2834 for (uint8_t j = 0; j < 8; j++) {
2864 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2865 ESP_LOGCONFIG(TAG,
" Model: 5.83in");
2867 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2868 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2869 LOG_UPDATE_INTERVAL(
this);
2945 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
2946 ESP_LOGCONFIG(TAG,
" Model: 5.83inv2");
2948 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
2949 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
2950 LOG_UPDATE_INTERVAL(
this);
2970 if (this->old_buffer_ ==
nullptr) {
2971 ESP_LOGE(TAG,
"Could not allocate old buffer for display!");
2983void GDEY0583T81::power_on_() {
2984 if (!this->power_is_on_) {
2988 this->power_is_on_ =
true;
2989 this->is_deep_sleep_ =
false;
2992void GDEY0583T81::power_off_() {
2995 this->power_is_on_ =
false;
2999 if (this->is_deep_sleep_) {
3013 this->is_deep_sleep_ =
true;
3016void GDEY0583T81::reset_() {
3026void GDEY0583T81::init_full_() {
3027 this->init_display_();
3045void GDEY0583T81::init_partial_() {
3046 this->init_display_();
3057void GDEY0583T81::init_display_() {
3086 bool full_update = this->at_update_ == 0;
3090 this->init_partial_();
3134 this->old_buffer_[i] = this->
buffer_[i];
3143 ESP_LOGD(TAG,
"Full update done");
3147 ESP_LOGD(TAG,
"Partial update done, next full update after %" PRIu32
" cycles",
3148 this->full_update_every_ - this->at_update_ - 1);
3151 this->at_update_ = (this->at_update_ + 1) % this->full_update_every_;
3160 LOG_DISPLAY(
"",
"GoodDisplay E-Paper",
this);
3162 " Model: 5.83in B/W GDEY0583T81\n"
3163 " Full Update Every: %" PRIu32,
3164 this->full_update_every_);
3166 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3167 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3168 LOG_UPDATE_INTERVAL(
this);
3239 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
3240 ESP_LOGCONFIG(TAG,
" Model: 7.5in-bv2");
3242 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3243 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3244 LOG_UPDATE_INTERVAL(
this);
3257 ESP_LOGI(TAG,
"Timeout while displaying image!");
3322 uint8_t lut_vcom_7_i_n5_v2[] = {
3323 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0xF, 0x1, 0xF, 0x1, 0x2, 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
3324 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
3327 uint8_t lut_ww_7_i_n5_v2[] = {
3328 0x10, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x20, 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_bw_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_wb_7_i_n5_v2[] = {
3338 0x80, 0xF, 0xF, 0x0, 0x0, 0x3, 0x84, 0xF, 0x1, 0xF, 0x1, 0x4, 0x40, 0xF, 0xF, 0x0, 0x0, 0x3, 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_bb_7_i_n5_v2[] = {
3343 0x80, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x40, 0xF, 0xF, 0x0, 0x0, 0x1, 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,
3373 for (
uint32_t i = 0; i < buf_len; i++) {
3379 for (
uint32_t i = 0; i < buf_len; i++) {
3391 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
3392 ESP_LOGCONFIG(TAG,
" Model: 7.5in-bv3");
3394 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3395 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3396 LOG_UPDATE_INTERVAL(
this);
3409 ESP_LOGI(TAG,
"Timeout while displaying image!");
3473 for (
uint32_t i = 0; i < buf_len; i++) {
3479 for (
uint32_t i = 0; i < buf_len; i++) {
3491 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
3492 ESP_LOGCONFIG(TAG,
" Model: 7.5in-bv3 BWR-Mode");
3494 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3495 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3496 LOG_UPDATE_INTERVAL(
this);
3546 uint8_t temp1 = this->
buffer_[i];
3547 for (uint8_t j = 0; j < 8; j++) {
3574 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
3575 ESP_LOGCONFIG(TAG,
" Model: 7.5in");
3577 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3578 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3579 LOG_UPDATE_INTERVAL(
this);
3584namespace cmddata_5P65InF {
3593static const uint8_t R00_CMD_PSR[] = {0x00, 0xEF, 0x08};
3597static const uint8_t R01_CMD_PWR[] = {0x01, 0x07, 0x00, 0x00, 0x00};
3600static const uint8_t R02_CMD_POF[] = {0x02};
3604static const uint8_t R03_CMD_PFS[] = {0x03, 0x00};
3607static const uint8_t R04_CMD_PON[] = {0x04};
3610static const uint8_t R06_CMD_BTST[] = {0x06, 0xC7, 0xC7, 0x1D};
3615static const uint8_t R07_CMD_DSLP[] = {0x07, 0xA5};
3619static const uint8_t R10_CMD_DTM1[] = {0x10};
3622static const uint8_t R11_CMD_DSP[] = {0x11};
3625static const uint8_t R12_CMD_DRF[] = {0x12};
3628static const uint8_t R13_CMD_IPC[] = {0x13, 0x00};
3632static const uint8_t R30_CMD_PLL[] = {0x30, 0x3C};
3636static const uint8_t R41_CMD_TSE[] = {0x41, 0x00};
3641static const uint8_t R50_CMD_CDI[] = {0x50, 0x37};
3646static const uint8_t R60_CMD_TCON[] = {0x60, 0x22};
3651static const uint8_t R61_CMD_TRES[] = {0x61, 0x02, 0x58, 0x01, 0xC0};
3654static const uint8_t RE3_CMD_PWS[] = {0xE3, 0xAA};
3658 if (this->
buffers_[0] ==
nullptr) {
3659 ESP_LOGE(TAG,
"Buffer unavailable!");
3667 using namespace cmddata_5P65InF;
3669 this->
cmd_data(R00_CMD_PSR,
sizeof(R00_CMD_PSR));
3670 this->
cmd_data(R01_CMD_PWR,
sizeof(R01_CMD_PWR));
3671 this->
cmd_data(R03_CMD_PFS,
sizeof(R03_CMD_PFS));
3672 this->
cmd_data(R06_CMD_BTST,
sizeof(R06_CMD_BTST));
3673 this->
cmd_data(R30_CMD_PLL,
sizeof(R30_CMD_PLL));
3674 this->
cmd_data(R41_CMD_TSE,
sizeof(R41_CMD_TSE));
3675 this->
cmd_data(R50_CMD_CDI,
sizeof(R50_CMD_CDI));
3676 this->
cmd_data(R60_CMD_TCON,
sizeof(R60_CMD_TCON));
3677 this->
cmd_data(R61_CMD_TRES,
sizeof(R61_CMD_TRES));
3678 this->
cmd_data(RE3_CMD_PWS,
sizeof(RE3_CMD_PWS));
3681 this->
cmd_data(R50_CMD_CDI,
sizeof(R50_CMD_CDI));
3683 ESP_LOGI(TAG,
"Display initialized successfully");
3688 ESP_LOGI(TAG,
"Initialise the display");
3691 using namespace cmddata_5P65InF;
3694 ESP_LOGI(TAG,
"Sending data to the display");
3695 this->
cmd_data(R61_CMD_TRES,
sizeof(R61_CMD_TRES));
3696 this->
cmd_data(R10_CMD_DTM1,
sizeof(R10_CMD_DTM1));
3700 ESP_LOGI(TAG,
"Power on the display");
3701 this->
cmd_data(R04_CMD_PON,
sizeof(R04_CMD_PON));
3705 ESP_LOGI(TAG,
"Refresh the display");
3706 this->
cmd_data(R12_CMD_DRF,
sizeof(R12_CMD_DRF));
3710 ESP_LOGI(TAG,
"Power off the display");
3711 this->
cmd_data(R02_CMD_POF,
sizeof(R02_CMD_POF));
3715 ESP_LOGI(TAG,
"Set the display to deep sleep");
3716 this->
cmd_data(R07_CMD_DSLP,
sizeof(R07_CMD_DSLP));
3725 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
3726 ESP_LOGCONFIG(TAG,
" Model: 5.65in-F");
3728 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3729 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3730 LOG_UPDATE_INTERVAL(
this);
3741 ESP_LOGE(TAG,
"Timeout while displaying image!");
3751 if (this->
buffers_[0] ==
nullptr) {
3752 ESP_LOGE(TAG,
"Buffer unavailable!");
3851 ESP_LOGI(TAG,
"Display initialized successfully");
3855 ESP_LOGI(TAG,
"Initialise the display");
3859 ESP_LOGI(TAG,
"Sending data to the display");
3864 ESP_LOGI(TAG,
"Power on the display");
3869 ESP_LOGI(TAG,
"Refresh the display");
3875 ESP_LOGI(TAG,
"Power off the display");
3881 ESP_LOGI(TAG,
"Set the display to deep sleep");
3890 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
3891 ESP_LOGCONFIG(TAG,
" Model: 7.3in-F");
3893 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
3894 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
3895 LOG_UPDATE_INTERVAL(
this);
3905 ESP_LOGE(TAG,
"Timeout while displaying image!");
3923 ESP_LOGE(TAG,
"Timeout while displaying image!");
3978 ESP_LOGI(TAG,
"Power on the display and hat");
3990 for (
uint32_t i = 0; i < buf_len; i++) {
4002 ESP_LOGV(TAG,
"Before command(0x02) (>> power off)");
4005 ESP_LOGV(TAG,
"After command(0x02) (>> power off)");
4012 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
4013 ESP_LOGCONFIG(TAG,
" Model: 7.5inV2rev2");
4015 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
4016 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
4017 LOG_UPDATE_INTERVAL(
this);
4030 ESP_LOGI(TAG,
"Timeout while displaying image!");
4096 uint8_t lut_vcom_7_i_n5_v2[] = {
4097 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0xF, 0x1, 0xF, 0x1, 0x2, 0x0, 0xF, 0xF, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0,
4098 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4101 uint8_t lut_ww_7_i_n5_v2[] = {
4102 0x10, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x20, 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_bw_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_wb_7_i_n5_v2[] = {
4112 0x80, 0xF, 0xF, 0x0, 0x0, 0x3, 0x84, 0xF, 0x1, 0xF, 0x1, 0x4, 0x40, 0xF, 0xF, 0x0, 0x0, 0x3, 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_bb_7_i_n5_v2[] = {
4117 0x80, 0xF, 0xF, 0x0, 0x0, 0x1, 0x84, 0xF, 0x1, 0xF, 0x1, 0x2, 0x40, 0xF, 0xF, 0x0, 0x0, 0x1, 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,
4144 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
4145 ESP_LOGCONFIG(TAG,
" Model: 7.5inV2");
4147 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
4148 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
4149 LOG_UPDATE_INTERVAL(
this);
4162 ESP_LOGE(TAG,
"Timeout while displaying image!");
4171void WaveshareEPaper7P5InV2P::reset_() {
4182void WaveshareEPaper7P5InV2P::turn_on_display_() {
4248 ESP_LOGI(TAG,
"Power on the display and hat");
4256 for (
uint32_t i = 0; i < buf_len; i++) {
4260 this->turn_on_display_();
4280 for (
uint32_t i = 0; i < buf_len; i++) {
4289 for (
uint32_t i = 0; i < buf_len; i++) {
4296 this->turn_on_display_();
4321 for (
uint32_t i = 0; i < buf_len; i++) {
4328 this->turn_on_display_();
4331 ESP_LOGV(TAG,
"Before command(0x02) (>> power off)");
4334 ESP_LOGV(TAG,
"After command(0x02) (>> power off)");
4343 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
4345 " Model: 7.50inv2p\n"
4346 " Full Update Every: %" PRIu32,
4349 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
4350 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
4351 LOG_UPDATE_INTERVAL(
this);
4416 uint8_t eight_pixels = this->
buffer_[i];
4418 for (uint8_t j = 0; j < 8; j += 2) {
4422 uint8_t left_nibble = (eight_pixels & 0x80) ? 0x30 : 0x00;
4424 uint8_t right_nibble = (eight_pixels & 0x80) ? 0x03 : 0x00;
4426 this->
write_byte(left_nibble | right_nibble);
4445 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
4446 ESP_LOGCONFIG(TAG,
" Model: 7.5in-bc");
4448 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
4449 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
4450 LOG_UPDATE_INTERVAL(
this);
4546 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
4547 ESP_LOGCONFIG(TAG,
" Model: 7.5in-HD-b");
4549 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
4550 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
4551 LOG_UPDATE_INTERVAL(
this);
4554static const uint8_t LUT_SIZE_TTGO_DKE_PART = 153;
4556static const uint8_t PART_UPDATE_LUT_TTGO_DKE[LUT_SIZE_TTGO_DKE_PART] = {
4557 0x0, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4558 0x0, 0x0, 0x0, 0x0, 0x40, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0x0, 0x0,
4559 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4560 0xF, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4561 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4562 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4563 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
4564 0x0, 0x0, 0x0, 0x0, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x0, 0x0, 0x0,
4574 ESP_LOGI(TAG,
"Performing partial e-paper update.");
4576 ESP_LOGI(TAG,
"Performing full e-paper update.");
4613 this->
write_array(PART_UPDATE_LUT_TTGO_DKE,
sizeof(PART_UPDATE_LUT_TTGO_DKE));
4665 ESP_LOGI(TAG,
"Completed e-paper update.");
4672 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
4673 ESP_LOGCONFIG(TAG,
" Model: 2.13inDKE");
4674 LOG_PIN(
" CS Pin: ", this->
cs_);
4676 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
4677 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
4678 LOG_UPDATE_INTERVAL(
this);
4716 this->
data(0 & 0xFF);
4717 this->
data((0 >> 8) & 0x03);
4722 this->
data(0 & 0xFF);
4723 this->
data((0 >> 8) & 0x03);
4736 this->
data(0 & 0xFF);
4737 this->
data((0 >> 8) & 0x03);
4740 this->
data(0 & 0xFF);
4741 this->
data((0 >> 8) & 0x03);
4760 LOG_DISPLAY(
"",
"Waveshare E-Paper",
this);
4761 ESP_LOGCONFIG(TAG,
" Model: 13.3inK");
4763 LOG_PIN(
" DC Pin: ", this->
dc_pin_);
4764 LOG_PIN(
" Busy Pin: ", this->
busy_pin_);
4765 LOG_UPDATE_INTERVAL(
this);
void feed_wdt()
Feed the task watchdog.
void status_set_warning()
void status_clear_warning()
virtual void digital_write(bool value)=0
virtual bool digital_read()=0
An STL allocator that uses SPI or internal RAM.
void deallocate(T *p, size_t n)
int get_width() override
Get the width of the image in pixels with rotation applied.
void init_internal_(uint32_t buffer_length)
int get_height() override
Get the height of the image in pixels with rotation applied.
virtual void clear()
Clear the entire screen by filling it with OFF pixels.
virtual void fill(Color color)
Fill the entire screen with the given color.
virtual int get_width_internal()=0
virtual int get_height_internal()=0
Rect get_clipping() const
Get the current the clipping rectangle.
void filled_rectangle(int x1, int y1, int width, int height, Color color=COLOR_ON)
Fill a rectangle with the top left point at [x1,y1] and the bottom right point at [x1+width,...
void spi_setup() override
void write_byte(uint8_t data)
void write_array(const uint8_t *data, size_t length)
void deep_sleep() override
int get_height_internal() override
int get_width_internal() override
void initialize() override
void dump_config() override
void 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
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
int get_height_internal() override
void initialize() override
uint32_t idle_timeout_() override
void dump_config() override
int get_height_internal() override
int get_width_internal() override
int get_height_internal() override
int get_width_internal() override
void deep_sleep() override
void initialize() override
void dump_config() override
uint32_t full_update_every_
int get_width_internal() override
void set_full_update_every(uint32_t full_update_every)
uint32_t idle_timeout_() override
int get_height_internal() override
void dump_config() override
void initialize() override
int get_width_internal() override
void deep_sleep() override
void dump_config() override
void initialize() override
int get_height_internal() override
int get_width_internal() override
void dump_config() override
int get_height_internal() override
void initialize() override
void initialize() override
void dump_config() override
int get_width_internal() override
int get_height_internal() override
int get_width_internal() override
void dump_config() override
int get_height_internal() override
void initialize() override
int get_height_internal() override
void initialize() override
void dump_config() override
int get_width_internal() override
void dump_config() override
int get_height_internal() override
void initialize() override
int get_width_internal() override
int get_height_internal() override
void dump_config() override
int get_width_internal() override
void initialize() override
void dump_config() override
int get_height_internal() override
int get_width_internal() override
void initialize() override
void set_full_update_every(uint32_t full_update_every)
uint32_t full_update_every_
int get_width_controller() override
int get_height_internal() override
void initialize() override
uint32_t full_update_every_
WaveshareEPaper2P9InV2R2()
int get_width_internal() override
void write_lut_(const uint8_t *lut, uint8_t size)
void dump_config() override
void set_full_update_every(uint32_t full_update_every)
void deep_sleep() override
int get_width_internal() override
void dump_config() override
void initialize() override
int get_height_internal() override
void initialize() override
void dump_config() override
int get_height_internal() override
int get_width_internal() override
void initialize() override
int get_height_internal() override
int get_width_internal() override
void dump_config() override
int get_width_internal() override
void initialize() override
void dump_config() override
uint32_t idle_timeout_() override
int get_height_internal() override
bool deep_sleep_between_updates_
bool wait_until_(WaitForState state)
int get_height_internal() override
int get_width_internal() override
void initialize() override
void dump_config() override
int get_width_internal() override
int get_height_internal() override
void initialize() override
void dump_config() override
void init_internal_7c_(uint32_t buffer_length)
void draw_absolute_pixel_internal(int x, int y, Color color) override
uint8_t * buffers_[NUM_BUFFERS]
uint8_t color_to_hex(Color color)
void fill(Color color) override
uint32_t get_buffer_length_() override
static const int NUM_BUFFERS
void initialize() override
bool deep_sleep_between_updates_
int get_height_internal() override
void dump_config() override
uint32_t idle_timeout_() override
int get_width_internal() override
void dump_config() override
void initialize() override
int get_height_internal() override
int get_width_internal() override
void dump_config() override
void deep_sleep() override
void initialize() override
int get_height_internal() override
int get_width_internal() override
void deep_sleep() override
void initialize() override
void dump_config() override
int get_width_internal() override
int get_height_internal() override
void deep_sleep() override
int get_height_internal() override
void dump_config() override
void initialize() override
int get_width_internal() override
void dump_config() override
int get_height_internal() override
void initialize() override
int get_width_internal() override
void dump_config() override
int get_height_internal() override
void initialize() override
int get_width_internal() override
int get_width_internal() override
uint32_t idle_timeout_() override
int get_height_internal() override
void initialize() override
void dump_config() override
void dump_config() override
int get_width_internal() override
int get_height_internal() override
void initialize() override
uint32_t idle_timeout_() override
void set_full_update_every(uint32_t full_update_every)
uint32_t full_update_every_
void dump_config() override
void initialize() override
uint32_t get_buffer_length_() override
void draw_absolute_pixel_internal(int x, int y, Color color) override
void fill(Color color) override
float get_setup_priority() const override
void command(uint8_t value)
virtual void initialize()=0
void on_safe_shutdown() override
void cmd_data(const uint8_t *data, size_t length)
virtual uint32_t idle_timeout_()
virtual int get_width_controller()
virtual void deep_sleep()=0
virtual uint32_t get_buffer_length_()=0
uint32_t get_buffer_length_() override
void fill(Color color) override
void draw_absolute_pixel_internal(int x, int y, Color color) override
int get_width_controller() override
void set_full_update_every(uint32_t full_update_every)
WaveshareEPaperTypeA(WaveshareEPaperTypeAModel model)
void write_lut_(const uint8_t *lut, uint8_t size)
uint32_t idle_timeout_() override
void dump_config() override
bool deep_sleep_between_updates_
int get_height_internal() override
void initialize() override
void deep_sleep() override
WaveshareEPaperTypeAModel model_
uint32_t full_update_every_
int get_width_internal() override
constexpr float PROCESSOR
For components that use data from sensors like displays.
ESPHOME_LOG_TAG(TAG, "waveshare_2.13v3")
WaveshareEPaperTypeAModel
@ WAVESHARE_EPAPER_2_9_IN
@ WAVESHARE_EPAPER_2_13_IN_V2
@ TTGO_EPAPER_2_13_IN_B73
@ TTGO_EPAPER_2_13_IN_B74
@ WAVESHARE_EPAPER_2_13_IN
@ WAVESHARE_EPAPER_2_9_IN_V2
@ WAVESHARE_EPAPER_1_54_IN
@ WAVESHARE_EPAPER_1_54_IN_V2
void IRAM_ATTR HOT delayMicroseconds(uint32_t us)
void HOT delay(uint32_t ms)
uint32_t IRAM_ATTR HOT millis()
Application App
Global storage of Application pointer - only one Application can exist.
bool is_on() ESPHOME_ALWAYS_INLINE