Paperd.Ink Library 0.0.5
Library for interacting with Paperd.Ink devices.
Loading...
Searching...
No Matches
GxEPD2_154_T8.cpp
Go to the documentation of this file.
1// Display Library for SPI e-paper panels from Dalian Good Display and boards from Waveshare.
2// Requires HW SPI and Adafruit_GFX. Caution: the e-paper panels require 3.3V supply AND data lines!
3//
4// based on Demo Example from Good Display, available here: http://www.e-paper-display.com/download_detail/downloadsId=806.html
5// Panel: GDEW0154T8 : http://www.e-paper-display.com/products_detail/productId=345.html
6// Controller: IL0373 : http://www.e-paper-display.com/download_detail/downloadsId=535.html
7//
8// Author: Jean-Marc Zingg
9//
10// Version: see library.properties
11//
12// Library: https://github.com/ZinggJM/GxEPD2
13
14#include "GxEPD2_154_T8.h"
15
16GxEPD2_154_T8::GxEPD2_154_T8(int16_t cs, int16_t dc, int16_t rst, int16_t busy) :
17 GxEPD2_EPD(cs, dc, rst, busy, LOW, 10000000, WIDTH, HEIGHT, panel, hasColor, hasPartialUpdate, hasFastPartialUpdate)
18{
19}
20
21void GxEPD2_154_T8::clearScreen(uint8_t value)
22{
23 writeScreenBuffer(value);
24 refresh(true);
25 writeScreenBuffer(value);
26}
27
29{
30 _initial_write = false; // initial full screen buffer clean done
31 if (!_using_partial_mode) _Init_Part();
32 _writeCommand(0x13); // set current
33 for (uint32_t i = 0; i < uint32_t(WIDTH) * uint32_t(HEIGHT) / 8; i++)
34 {
35 _writeData(value);
36 }
38 {
39 _writeCommand(0x10); // preset previous
40 for (uint32_t i = 0; i < uint32_t(WIDTH) * uint32_t(HEIGHT) / 8; i++)
41 {
42 _writeData(0xFF); // 0xFF is white
43 }
44 }
45}
46
47void GxEPD2_154_T8::writeImage(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
48{
49 if (_initial_write) writeScreenBuffer(); // initial full screen buffer clean
50 delay(1); // yield() to avoid WDT on ESP8266 and ESP32
51 int16_t wb = (w + 7) / 8; // width bytes, bitmaps are padded
52 x -= x % 8; // byte boundary
53 w = wb * 8; // byte boundary
54 int16_t x1 = x < 0 ? 0 : x; // limit
55 int16_t y1 = y < 0 ? 0 : y; // limit
56 int16_t w1 = x + w < int16_t(WIDTH) ? w : int16_t(WIDTH) - x; // limit
57 int16_t h1 = y + h < int16_t(HEIGHT) ? h : int16_t(HEIGHT) - y; // limit
58 int16_t dx = x1 - x;
59 int16_t dy = y1 - y;
60 w1 -= dx;
61 h1 -= dy;
62 if ((w1 <= 0) || (h1 <= 0)) return;
63 if (!_using_partial_mode) _Init_Part();
64 _writeCommand(0x91); // partial in
65 _setPartialRamArea(x1, y1, w1, h1);
66 _writeCommand(0x13);
67 for (int16_t i = 0; i < h1; i++)
68 {
69 for (int16_t j = 0; j < w1 / 8; j++)
70 {
71 uint8_t data;
72 // use wb, h of bitmap for index!
73 int16_t idx = mirror_y ? j + dx / 8 + ((h - 1 - (i + dy))) * wb : j + dx / 8 + (i + dy) * wb;
74 if (pgm)
75 {
76#if defined(__AVR) || defined(ESP8266) || defined(ESP32)
77 data = pgm_read_byte(&bitmap[idx]);
78#else
79 data = bitmap[idx];
80#endif
81 }
82 else
83 {
84 data = bitmap[idx];
85 }
86 if (invert) data = ~data;
87 _writeData(data);
88 }
89 }
90 _writeCommand(0x92); // partial out
91 delay(1); // yield() to avoid WDT on ESP8266 and ESP32
92}
93
94void GxEPD2_154_T8::writeImagePart(const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
95 int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
96{
97 if (_initial_write) writeScreenBuffer(); // initial full screen buffer clean
98 delay(1); // yield() to avoid WDT on ESP8266 and ESP32
99 if ((w_bitmap < 0) || (h_bitmap < 0) || (w < 0) || (h < 0)) return;
100 if ((x_part < 0) || (x_part >= w_bitmap)) return;
101 if ((y_part < 0) || (y_part >= h_bitmap)) return;
102 int16_t wb_bitmap = (w_bitmap + 7) / 8; // width bytes, bitmaps are padded
103 x_part -= x_part % 8; // byte boundary
104 w = w_bitmap - x_part < w ? w_bitmap - x_part : w; // limit
105 h = h_bitmap - y_part < h ? h_bitmap - y_part : h; // limit
106 x -= x % 8; // byte boundary
107 w = 8 * ((w + 7) / 8); // byte boundary, bitmaps are padded
108 int16_t x1 = x < 0 ? 0 : x; // limit
109 int16_t y1 = y < 0 ? 0 : y; // limit
110 int16_t w1 = x + w < int16_t(WIDTH) ? w : int16_t(WIDTH) - x; // limit
111 int16_t h1 = y + h < int16_t(HEIGHT) ? h : int16_t(HEIGHT) - y; // limit
112 int16_t dx = x1 - x;
113 int16_t dy = y1 - y;
114 w1 -= dx;
115 h1 -= dy;
116 if ((w1 <= 0) || (h1 <= 0)) return;
117 if (!_using_partial_mode) _Init_Part();
118 _writeCommand(0x91); // partial in
119 _setPartialRamArea(x1, y1, w1, h1);
120 _writeCommand(0x13);
121 for (int16_t i = 0; i < h1; i++)
122 {
123 for (int16_t j = 0; j < w1 / 8; j++)
124 {
125 uint8_t data;
126 // use wb_bitmap, h_bitmap of bitmap for index!
127 int16_t idx = mirror_y ? x_part / 8 + j + dx / 8 + ((h_bitmap - 1 - (y_part + i + dy))) * wb_bitmap : x_part / 8 + j + dx / 8 + (y_part + i + dy) * wb_bitmap;
128 if (pgm)
129 {
130#if defined(__AVR) || defined(ESP8266) || defined(ESP32)
131 data = pgm_read_byte(&bitmap[idx]);
132#else
133 data = bitmap[idx];
134#endif
135 }
136 else
137 {
138 data = bitmap[idx];
139 }
140 if (invert) data = ~data;
141 _writeData(data);
142 }
143 }
144 _writeCommand(0x92); // partial out
145 delay(1); // yield() to avoid WDT on ESP8266 and ESP32
146}
147
148void GxEPD2_154_T8::writeImage(const uint8_t* black, const uint8_t* color, int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
149{
150 if (black)
151 {
152 writeImage(black, x, y, w, h, invert, mirror_y, pgm);
153 }
154}
155
156void GxEPD2_154_T8::writeImagePart(const uint8_t* black, const uint8_t* color, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
157 int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
158{
159 if (black)
160 {
161 writeImagePart(black, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
162 }
163}
164
165void GxEPD2_154_T8::writeNative(const uint8_t* data1, const uint8_t* data2, int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
166{
167 if (data1)
168 {
169 writeImage(data1, x, y, w, h, invert, mirror_y, pgm);
170 }
171}
172
173void GxEPD2_154_T8::drawImage(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
174{
175 writeImage(bitmap, x, y, w, h, invert, mirror_y, pgm);
176 refresh(x, y, w, h);
177 writeImage(bitmap, x, y, w, h, invert, mirror_y, pgm);
178}
179
180void GxEPD2_154_T8::drawImagePart(const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
181 int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
182{
183 writeImagePart(bitmap, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
184 refresh(x, y, w, h);
185 writeImagePart(bitmap, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
186}
187
188void GxEPD2_154_T8::drawImage(const uint8_t* black, const uint8_t* color, int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
189{
190 writeImage(black, color, x, y, w, h, invert, mirror_y, pgm);
191 refresh(x, y, w, h);
192 writeImage(black, color, x, y, w, h, invert, mirror_y, pgm);
193}
194
195void GxEPD2_154_T8::drawImagePart(const uint8_t* black, const uint8_t* color, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
196 int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
197{
198 writeImagePart(black, color, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
199 refresh(x, y, w, h);
200 writeImagePart(black, color, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
201}
202
203void GxEPD2_154_T8::drawNative(const uint8_t* data1, const uint8_t* data2, int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
204{
205 writeNative(data1, data2, x, y, w, h, invert, mirror_y, pgm);
206 refresh(x, y, w, h);
207 writeNative(data1, data2, x, y, w, h, invert, mirror_y, pgm);
208}
209
210void GxEPD2_154_T8::refresh(bool partial_update_mode)
211{
212 if (partial_update_mode) refresh(0, 0, WIDTH, HEIGHT);
213 else
214 {
215 if (_using_partial_mode) _Init_Full();
216 _Update_Full();
217 _initial_refresh = false; // initial full update done
218 }
219}
220
221void GxEPD2_154_T8::refresh(int16_t x, int16_t y, int16_t w, int16_t h)
222{
223 if (_initial_refresh) return refresh(false); // initial update needs be full update
224 // intersection with screen
225 int16_t w1 = x < 0 ? w + x : w; // reduce
226 int16_t h1 = y < 0 ? h + y : h; // reduce
227 int16_t x1 = x < 0 ? 0 : x; // limit
228 int16_t y1 = y < 0 ? 0 : y; // limit
229 w1 = x1 + w1 < int16_t(WIDTH) ? w1 : int16_t(WIDTH) - x1; // limit
230 h1 = y1 + h1 < int16_t(HEIGHT) ? h1 : int16_t(HEIGHT) - y1; // limit
231 if ((w1 <= 0) || (h1 <= 0)) return;
232 // make x1, w1 multiple of 8
233 w1 += x1 % 8;
234 if (w1 % 8 > 0) w1 += 8 - w1 % 8;
235 x1 -= x1 % 8;
236 if (!_using_partial_mode) _Init_Part();
237 _writeCommand(0x91); // partial in
238 _setPartialRamArea(x1, y1, w1, h1);
239 _Update_Part();
240 _writeCommand(0x92); // partial out
241}
242
244{
245 _PowerOff();
246}
247
249{
250 _PowerOff();
251 if (_rst >= 0)
252 {
253 _writeCommand(0x07); // deep sleep
254 _writeData(0xA5); // check code
255 _hibernating = true;
256 }
257}
258
259void GxEPD2_154_T8::_setPartialRamArea(uint16_t x, uint16_t y, uint16_t w, uint16_t h)
260{
261 uint16_t xe = (x + w - 1) | 0x0007; // byte boundary inclusive (last byte)
262 uint16_t ye = y + h - 1;
263 x &= 0xFFF8; // byte boundary
264 _writeCommand(0x90); // partial window
265 //_writeData(x / 256);
266 _writeData(x % 256);
267 //_writeData(xe / 256);
268 _writeData(xe % 256);
269 _writeData(y / 256);
270 _writeData(y % 256);
271 _writeData(ye / 256);
272 _writeData(ye % 256);
273 _writeData(0x01); // don't see any difference
274 //_writeData(0x00); // don't see any difference
275}
276
277void GxEPD2_154_T8::_PowerOn()
278{
279 if (!_power_is_on)
280 {
281 _writeCommand(0x04);
282 _waitWhileBusy("_PowerOn", power_on_time);
283 }
284 _power_is_on = true;
285}
286
287void GxEPD2_154_T8::_PowerOff()
288{
289 _writeCommand(0x02); // power off
290 _waitWhileBusy("_PowerOff", power_off_time);
291 _power_is_on = false;
292 _using_partial_mode = false;
293}
294
295void GxEPD2_154_T8::_InitDisplay()
296{
297 if (_hibernating) _reset();
298 _writeCommand(0x01); //POWER SETTING
299 _writeData (0x03);
300 _writeData (0x00);
301 _writeData (0x2b);
302 _writeData (0x2b);
303 _writeData (0x03);
304 _writeCommand(0x06); //boost soft start
305 _writeData (0x17); //A
306 _writeData (0x17); //B
307 _writeData (0x17); //C
308 _writeCommand(0x00); //panel setting
309 //_writeData(0xbf); //LUT from register, 128x296
310 //_writeData(0x1f); //LUT from OTP, 128x296
311 _writeData(hasFastPartialUpdate ? 0xbf : 0x1f); // for test with OTP LUT
312 _writeData(0x0d); //VCOM to 0V fast
313 _writeCommand(0x30); //PLL setting
314 _writeData (0x3a); // 3a 100HZ 29 150Hz 39 200HZ 31 171HZ
315 _writeCommand(0x61); //resolution setting
317 _writeData (HEIGHT >> 8);
318 _writeData (HEIGHT & 0xFF);
319}
320
321//full screen update LUT
322const unsigned char GxEPD2_154_T8::lut_20_vcomDC[] PROGMEM =
323{
324 0x00, 0x08, 0x00, 0x00, 0x00, 0x02,
325 0x60, 0x28, 0x28, 0x00, 0x00, 0x01,
326 0x00, 0x14, 0x00, 0x00, 0x00, 0x01,
327 0x00, 0x12, 0x12, 0x00, 0x00, 0x01,
328 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
329 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
330 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
331 0x00, 0x00,
332};
333
334const unsigned char GxEPD2_154_T8::lut_21_ww[] PROGMEM =
335{
336 0x40, 0x08, 0x00, 0x00, 0x00, 0x02,
337 0x90, 0x28, 0x28, 0x00, 0x00, 0x01,
338 0x40, 0x14, 0x00, 0x00, 0x00, 0x01,
339 0xA0, 0x12, 0x12, 0x00, 0x00, 0x01,
340 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
341 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
342 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
343};
344
345const unsigned char GxEPD2_154_T8::lut_22_bw[] PROGMEM =
346{
347 0x40, 0x08, 0x00, 0x00, 0x00, 0x02,
348 0x90, 0x28, 0x28, 0x00, 0x00, 0x01,
349 0x40, 0x14, 0x00, 0x00, 0x00, 0x01,
350 0xA0, 0x12, 0x12, 0x00, 0x00, 0x01,
351 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
352 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
353 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
354};
355
356const unsigned char GxEPD2_154_T8::lut_23_wb[] PROGMEM =
357{
358 0x80, 0x08, 0x00, 0x00, 0x00, 0x02,
359 0x90, 0x28, 0x28, 0x00, 0x00, 0x01,
360 0x80, 0x14, 0x00, 0x00, 0x00, 0x01,
361 0x50, 0x12, 0x12, 0x00, 0x00, 0x01,
362 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
363 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
364 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
365};
366
367const unsigned char GxEPD2_154_T8::lut_24_bb[] PROGMEM =
368{
369 0x80, 0x08, 0x00, 0x00, 0x00, 0x02,
370 0x90, 0x28, 0x28, 0x00, 0x00, 0x01,
371 0x80, 0x14, 0x00, 0x00, 0x00, 0x01,
372 0x50, 0x12, 0x12, 0x00, 0x00, 0x01,
373 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
374 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
375 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
376};
377
378//partial screen update LUT
379//#define Tx19 0x19 // original value is 25 (phase length)
380#define Tx19 0x20 // new value for test is 32 (phase length)
381const unsigned char GxEPD2_154_T8::lut_20_vcomDC_partial[] PROGMEM =
382{
383 0x00, Tx19, 0x01, 0x00, 0x00, 0x01,
384 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
385 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
386 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
387 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
388 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
389 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
390 0x00, 0x00,
391};
392
393const unsigned char GxEPD2_154_T8::lut_21_ww_partial[] PROGMEM =
394{
395 0x00, Tx19, 0x01, 0x00, 0x00, 0x01,
396 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
397 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
398 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
399 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
400 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
401 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
402};
403
404const unsigned char GxEPD2_154_T8::lut_22_bw_partial[] PROGMEM =
405{
406 0x80, Tx19, 0x01, 0x00, 0x00, 0x01,
407 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
408 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
409 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
410 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
411 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
412 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
413};
414
415const unsigned char GxEPD2_154_T8::lut_23_wb_partial[] PROGMEM =
416{
417 0x40, Tx19, 0x01, 0x00, 0x00, 0x01,
418 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
419 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
420 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
421 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
422 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
423 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
424};
425
426const unsigned char GxEPD2_154_T8::lut_24_bb_partial[] PROGMEM =
427{
428 0x00, Tx19, 0x01, 0x00, 0x00, 0x01,
429 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
430 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
431 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
432 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
433 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
434 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
435};
436
437void GxEPD2_154_T8::_Init_Full()
438{
439 _InitDisplay();
440 _writeCommand(0x82); //vcom_DC setting
441 _writeData (0x08);
442 _writeCommand(0X50); //VCOM AND DATA INTERVAL SETTING
443 _writeData(0x97); //WBmode:VBDF 17|D7 VBDW 97 VBDB 57 WBRmode:VBDF F7 VBDW 77 VBDB 37 VBDR B7
444 _writeCommand(0x20);
445 _writeDataPGM(lut_20_vcomDC, sizeof(lut_20_vcomDC));
446 _writeCommand(0x21);
447 _writeDataPGM(lut_21_ww, sizeof(lut_21_ww));
448 _writeCommand(0x22);
449 _writeDataPGM(lut_22_bw, sizeof(lut_22_bw));
450 _writeCommand(0x23);
451 _writeDataPGM(lut_23_wb, sizeof(lut_23_wb));
452 _writeCommand(0x24);
453 _writeDataPGM(lut_24_bb, sizeof(lut_24_bb));
454 _PowerOn();
455 _using_partial_mode = false;
456}
457
458void GxEPD2_154_T8::_Init_Part()
459{
460 _InitDisplay();
461 _writeCommand(0x82); //vcom_DC setting
462 _writeData (0x08);
463 _writeCommand(0X50);
464 _writeData(0x17); //WBmode:VBDF 17|D7 VBDW 97 VBDB 57 WBRmode:VBDF F7 VBDW 77 VBDB 37 VBDR B7
465 _writeCommand(0x20);
466 _writeDataPGM(lut_20_vcomDC_partial, sizeof(lut_20_vcomDC_partial));
467 _writeCommand(0x21);
468 _writeDataPGM(lut_21_ww_partial, sizeof(lut_21_ww_partial));
469 _writeCommand(0x22);
470 _writeDataPGM(lut_22_bw_partial, sizeof(lut_22_bw_partial));
471 _writeCommand(0x23);
472 _writeDataPGM(lut_23_wb_partial, sizeof(lut_23_wb_partial));
473 _writeCommand(0x24);
474 _writeDataPGM(lut_24_bb_partial, sizeof(lut_24_bb_partial));
475 _PowerOn();
476 _using_partial_mode = true;
477}
478
479void GxEPD2_154_T8::_Update_Full()
480{
481 _writeCommand(0x12); //display refresh
482 _waitWhileBusy("_Update_Full", full_refresh_time);
483}
484
485void GxEPD2_154_T8::_Update_Part()
486{
487 _writeCommand(0x12); //display refresh
488 _waitWhileBusy("_Update_Part", partial_refresh_time);
489}
#define Tx19
const unsigned char GxEPD2_154_T8::lut_20_vcomDC[] PROGMEM
GxEPD2_154_T8(int16_t cs, int16_t dc, int16_t rst, int16_t busy)
void writeScreenBuffer(uint8_t value=0xFF)
static const uint16_t HEIGHT
static const uint16_t full_refresh_time
void drawNative(const uint8_t *data1, const uint8_t *data2, int16_t x, int16_t y, int16_t w, int16_t h, bool invert=false, bool mirror_y=false, bool pgm=false)
void drawImage(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert=false, bool mirror_y=false, bool pgm=false)
void writeImage(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert=false, bool mirror_y=false, bool pgm=false)
static const uint16_t partial_refresh_time
void clearScreen(uint8_t value=0xFF)
static const uint16_t power_on_time
void writeImagePart(const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, int16_t x, int16_t y, int16_t w, int16_t h, bool invert=false, bool mirror_y=false, bool pgm=false)
void refresh(bool partial_update_mode=false)
static const uint16_t power_off_time
static const bool hasFastPartialUpdate
void writeNative(const uint8_t *data1, const uint8_t *data2, int16_t x, int16_t y, int16_t w, int16_t h, bool invert=false, bool mirror_y=false, bool pgm=false)
void drawImagePart(const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, int16_t x, int16_t y, int16_t w, int16_t h, bool invert=false, bool mirror_y=false, bool pgm=false)
static const uint16_t WIDTH
void _writeCommand(uint8_t c)
void _writeData(uint8_t d)
bool _using_partial_mode
Definition GxEPD2_EPD.h:118
void _waitWhileBusy(const char *comment=0, uint16_t busy_time=5000)
bool _power_is_on
Definition GxEPD2_EPD.h:118
bool _initial_refresh
Definition GxEPD2_EPD.h:117
void _reset()
bool _initial_write
Definition GxEPD2_EPD.h:117
int16_t _rst
Definition GxEPD2_EPD.h:112
bool _hibernating
Definition GxEPD2_EPD.h:118
void _writeDataPGM(const uint8_t *data, uint16_t n, int16_t fill_with_zeroes=0)