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