Paperd.Ink Library 0.0.5
Library for interacting with Paperd.Ink devices.
Loading...
Searching...
No Matches
GxEPD2_583c Class Reference

#include <GxEPD2_583c.h>

Inheritance diagram for GxEPD2_583c:
GxEPD2_EPD

Public Member Functions

 GxEPD2_583c (int16_t cs, int16_t dc, int16_t rst, int16_t busy)
 
void clearScreen (uint8_t value=0x33)
 
void clearScreen (uint8_t black_value, uint8_t red_value)
 
void writeScreenBuffer (uint8_t value=0x33)
 
void writeScreenBuffer (uint8_t black_value, uint8_t red_value)
 
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 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 writeImage (const uint8_t *black, const uint8_t *color, int16_t x, int16_t y, int16_t w, int16_t h, bool invert=false, bool mirror_y=false, bool pgm=false)
 
void 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, int16_t x, int16_t y, int16_t w, int16_t h, bool invert=false, bool mirror_y=false, bool pgm=false)
 
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 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 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 *black, const uint8_t *color, 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 *black, const uint8_t *color, 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 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 refresh (bool partial_update_mode=false)
 
void refresh (int16_t x, int16_t y, int16_t w, int16_t h)
 
void powerOff ()
 
void hibernate ()
 
- Public Member Functions inherited from GxEPD2_EPD
 GxEPD2_EPD (int16_t cs, int16_t dc, int16_t rst, int16_t busy, int16_t busy_level, uint32_t busy_timeout, uint16_t w, uint16_t h, GxEPD2::Panel p, bool c, bool pu, bool fpu)
 
virtual void init (uint32_t serial_diag_bitrate=0)
 
virtual void init (uint32_t serial_diag_bitrate, bool initial, uint16_t reset_duration=10, bool pulldown_rst_mode=false)
 
virtual void writeImageForFullRefresh (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)
 
virtual void writeScreenBufferAgain (uint8_t value=0xFF)
 
virtual void writeImageAgain (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)
 
virtual void writeImagePartAgain (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)
 
virtual void setPaged ()
 
void setBusyCallback (void(*busyCallback)(const void *), const void *busy_callback_parameter=0)
 
void selectSPI (SPIClass &spi, SPISettings spi_settings)
 

Static Public Attributes

static const uint16_t WIDTH = 600
 
static const uint16_t WIDTH_VISIBLE = WIDTH
 
static const uint16_t HEIGHT = 448
 
static const GxEPD2::Panel panel = GxEPD2::GDEW0583Z21
 
static const bool hasColor = true
 
static const bool hasPartialUpdate = true
 
static const bool hasFastPartialUpdate = false
 
static const uint16_t power_on_time = 70
 
static const uint16_t power_off_time = 50
 
static const uint16_t full_refresh_time = 32000
 
static const uint16_t partial_refresh_time = 32000
 

Additional Inherited Members

- Static Public Member Functions inherited from GxEPD2_EPD
static uint16_t gx_uint16_min (uint16_t a, uint16_t b)
 
static uint16_t gx_uint16_max (uint16_t a, uint16_t b)
 
- Public Attributes inherited from GxEPD2_EPD
const uint16_t WIDTH
 
const uint16_t HEIGHT
 
const GxEPD2::Panel panel
 
const bool hasColor
 
const bool hasPartialUpdate
 
const bool hasFastPartialUpdate
 
- Protected Member Functions inherited from GxEPD2_EPD
void _reset ()
 
void _waitWhileBusy (const char *comment=0, uint16_t busy_time=5000)
 
void _writeCommand (uint8_t c)
 
void _writeData (uint8_t d)
 
void _writeData (const uint8_t *data, uint16_t n)
 
void _writeDataPGM (const uint8_t *data, uint16_t n, int16_t fill_with_zeroes=0)
 
void _writeDataPGM_sCS (const uint8_t *data, uint16_t n, int16_t fill_with_zeroes=0)
 
void _writeCommandData (const uint8_t *pCommandData, uint8_t datalen)
 
void _writeCommandDataPGM (const uint8_t *pCommandData, uint8_t datalen)
 
void _startTransfer ()
 
void _transfer (uint8_t value)
 
void _endTransfer ()
 
- Protected Attributes inherited from GxEPD2_EPD
int16_t _cs
 
int16_t _dc
 
int16_t _rst
 
int16_t _busy
 
int16_t _busy_level
 
uint32_t _busy_timeout
 
bool _diag_enabled
 
bool _pulldown_rst_mode
 
SPIClass * _pSPIx
 
SPISettings _spi_settings
 
bool _initial_write
 
bool _initial_refresh
 
bool _power_is_on
 
bool _using_partial_mode
 
bool _hibernating
 
uint16_t _reset_duration
 
void(* _busy_callback )(const void *)
 
const void * _busy_callback_parameter
 

Detailed Description

Definition at line 18 of file GxEPD2_583c.h.

Constructor & Destructor Documentation

◆ GxEPD2_583c()

GxEPD2_583c::GxEPD2_583c ( int16_t cs,
int16_t dc,
int16_t rst,
int16_t busy )

Definition at line 15 of file GxEPD2_583c.cpp.

15 :
16 GxEPD2_EPD(cs, dc, rst, busy, LOW, 40000000, WIDTH, HEIGHT, panel, hasColor, hasPartialUpdate, hasFastPartialUpdate)
17{
18}
static const uint16_t HEIGHT
Definition GxEPD2_583c.h:24
static const bool hasColor
Definition GxEPD2_583c.h:26
static const uint16_t WIDTH
Definition GxEPD2_583c.h:22
static const bool hasFastPartialUpdate
Definition GxEPD2_583c.h:28
static const GxEPD2::Panel panel
Definition GxEPD2_583c.h:25
static const bool hasPartialUpdate
Definition GxEPD2_583c.h:27
GxEPD2_EPD(int16_t cs, int16_t dc, int16_t rst, int16_t busy, int16_t busy_level, uint32_t busy_timeout, uint16_t w, uint16_t h, GxEPD2::Panel p, bool c, bool pu, bool fpu)

Member Function Documentation

◆ clearScreen() [1/2]

void GxEPD2_583c::clearScreen ( uint8_t black_value,
uint8_t red_value )

Definition at line 38 of file GxEPD2_583c.cpp.

39{
40 _initial_write = false; // initial full screen buffer clean done
41 _Init_Part();
42 _writeCommand(0x91); // partial in
43 _setPartialRamArea(0, 0, WIDTH, HEIGHT);
44 _writeCommand(0x10);
46 for (uint32_t i = 0; i < uint32_t(WIDTH) * uint32_t(HEIGHT) / 8; i++)
47 {
48 _send8pixel(~black_value, ~color_value);
49 }
51 _Update_Part();
52 _writeCommand(0x92); // partial out
53}
void _endTransfer()
void _writeCommand(uint8_t c)
void _startTransfer()
bool _initial_write
Definition GxEPD2_EPD.h:117

◆ clearScreen() [2/2]

void GxEPD2_583c::clearScreen ( uint8_t value = 0x33)
virtual

Implements GxEPD2_EPD.

Definition at line 20 of file GxEPD2_583c.cpp.

21{
22 _initial_write = false; // initial full screen buffer clean done
23 if (value == 0xFF) value = 0x33; // white value for this controller
24 _Init_Part();
25 _writeCommand(0x91); // partial in
26 _setPartialRamArea(0, 0, WIDTH, HEIGHT);
27 _writeCommand(0x10);
29 for (uint32_t i = 0; i < uint32_t(WIDTH) * uint32_t(HEIGHT) / 2; i++)
30 {
31 _transfer(value);
32 }
34 _Update_Part();
35 _writeCommand(0x92); // partial out
36}
void _transfer(uint8_t value)

◆ drawImage() [1/2]

void GxEPD2_583c::drawImage ( const uint8_t * black,
const uint8_t * color,
int16_t x,
int16_t y,
int16_t w,
int16_t h,
bool invert = false,
bool mirror_y = false,
bool pgm = false )

Definition at line 317 of file GxEPD2_583c.cpp.

318{
319 writeImage(black, color, x, y, w, h, invert, mirror_y, pgm);
320 refresh(x, y, w, h);
321}
void refresh(bool partial_update_mode=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)

◆ drawImage() [2/2]

void GxEPD2_583c::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 )

Definition at line 304 of file GxEPD2_583c.cpp.

305{
306 writeImage(bitmap, x, y, w, h, invert, mirror_y, pgm);
307 refresh(x, y, w, h);
308}

◆ drawImagePart() [1/2]

void GxEPD2_583c::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,
int16_t x,
int16_t y,
int16_t w,
int16_t h,
bool invert = false,
bool mirror_y = false,
bool pgm = false )

Definition at line 323 of file GxEPD2_583c.cpp.

325{
326 writeImagePart(black, color, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
327 refresh(x, y, w, h);
328}
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)

◆ drawImagePart() [2/2]

void GxEPD2_583c::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 )

Definition at line 310 of file GxEPD2_583c.cpp.

312{
313 writeImagePart(bitmap, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
314 refresh(x, y, w, h);
315}

◆ drawNative()

void GxEPD2_583c::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 )

Definition at line 330 of file GxEPD2_583c.cpp.

331{
332 writeNative(data1, data2, x, y, w, h, invert, mirror_y, pgm);
333 refresh(x, y, w, h);
334}
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)

◆ hibernate()

void GxEPD2_583c::hibernate ( )
virtual

Implements GxEPD2_EPD.

Definition at line 366 of file GxEPD2_583c.cpp.

367{
368 _PowerOff();
369 if (_rst >= 0)
370 {
371 // check if it supports this command!
372 _writeCommand(0x07); // deep sleep
373 _writeData(0xA5); // check code
374 _hibernating = true;
375 }
376}
void _writeData(uint8_t d)
int16_t _rst
Definition GxEPD2_EPD.h:112
bool _hibernating
Definition GxEPD2_EPD.h:118

◆ powerOff()

void GxEPD2_583c::powerOff ( void )
virtual

Implements GxEPD2_EPD.

Definition at line 361 of file GxEPD2_583c.cpp.

362{
363 _PowerOff();
364}

◆ refresh() [1/2]

void GxEPD2_583c::refresh ( bool partial_update_mode = false)
virtual

Implements GxEPD2_EPD.

Definition at line 336 of file GxEPD2_583c.cpp.

337{
338 if (partial_update_mode) refresh(0, 0, WIDTH, HEIGHT);
339 else _Update_Full();
340}

◆ refresh() [2/2]

void GxEPD2_583c::refresh ( int16_t x,
int16_t y,
int16_t w,
int16_t h )
virtual

Implements GxEPD2_EPD.

Definition at line 342 of file GxEPD2_583c.cpp.

343{
344 // intersection with screen
345 int16_t w1 = x < 0 ? w + x : w; // reduce
346 int16_t h1 = y < 0 ? h + y : h; // reduce
347 int16_t x1 = x < 0 ? 0 : x; // limit
348 int16_t y1 = y < 0 ? 0 : y; // limit
349 w1 = x1 + w1 < int16_t(WIDTH) ? w1 : int16_t(WIDTH) - x1; // limit
350 h1 = y1 + h1 < int16_t(HEIGHT) ? h1 : int16_t(HEIGHT) - y1; // limit
351 if ((w1 <= 0) || (h1 <= 0)) return;
352 // make x1, w1 multiple of 8
353 w1 += x1 % 8;
354 if (w1 % 8 > 0) w1 += 8 - w1 % 8;
355 x1 -= x1 % 8;
356 _Init_Part();
357 _setPartialRamArea(x1, y1, w1, h1);
358 _Update_Part();
359}

◆ writeImage() [1/2]

void GxEPD2_583c::writeImage ( const uint8_t * black,
const uint8_t * color,
int16_t x,
int16_t y,
int16_t w,
int16_t h,
bool invert = false,
bool mirror_y = false,
bool pgm = false )

Definition at line 93 of file GxEPD2_583c.cpp.

94{
95 if (_initial_write) writeScreenBuffer(); // initial full screen buffer clean
96 delay(1); // yield() to avoid WDT on ESP8266 and ESP32
97 uint16_t wb = (w + 7) / 8; // width bytes, bitmaps are padded
98 x -= x % 8; // byte boundary
99 w = wb * 8; // byte boundary
100 int16_t x1 = x < 0 ? 0 : x; // limit
101 int16_t y1 = y < 0 ? 0 : y; // limit
102 int16_t w1 = x + w < int16_t(WIDTH) ? w : int16_t(WIDTH) - x; // limit
103 int16_t h1 = y + h < int16_t(HEIGHT) ? h : int16_t(HEIGHT) - y; // limit
104 int16_t dx = x1 - x;
105 int16_t dy = y1 - y;
106 w1 -= dx;
107 h1 -= dy;
108 if ((w1 <= 0) || (h1 <= 0)) return;
109 _Init_Part();
110 _writeCommand(0x91); // partial in
111 _setPartialRamArea(x1, y1, w1, h1);
112 _writeCommand(0x10);
114 for (int16_t i = 0; i < h1; i++)
115 {
116 for (int16_t j = 0; j < w1 / 8; j++)
117 {
118 uint8_t black_data = 0xFF;
119 uint8_t color_data = 0xFF;
120 if (black)
121 {
122 // use wb, h of bitmap for index!
123 uint16_t idx = mirror_y ? j + dx / 8 + uint16_t((h - 1 - (i + dy))) * wb : j + dx / 8 + uint16_t(i + dy) * wb;
124 if (pgm)
125 {
126#if defined(__AVR) || defined(ESP8266) || defined(ESP32)
127 black_data = pgm_read_byte(&black[idx]);
128#else
129 black_data = black[idx];
130#endif
131 }
132 else
133 {
134 black_data = black[idx];
135 }
136 if (invert) black_data = ~black_data;
137 }
138 if (color)
139 {
140 // use wb, h of bitmap for index!
141 uint16_t idx = mirror_y ? j + dx / 8 + uint16_t((h - 1 - (i + dy))) * wb : j + dx / 8 + uint16_t(i + dy) * wb;
142 if (pgm)
143 {
144#if defined(__AVR) || defined(ESP8266) || defined(ESP32)
145 color_data = pgm_read_byte(&color[idx]);
146#else
147 color_data = color[idx];
148#endif
149 }
150 else
151 {
152 color_data = color[idx];
153 }
154 if (invert) color_data = ~color_data;
155 }
156 _send8pixel(~black_data, ~color_data);
157 }
158#if defined(ESP8266)
159 yield();
160#endif
161 }
162 _endTransfer();
163 _writeCommand(0x92); // partial out
164 delay(1); // yield() to avoid WDT on ESP8266 and ESP32
165}
void writeScreenBuffer(uint8_t value=0x33)

◆ writeImage() [2/2]

void GxEPD2_583c::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 )
virtual

Implements GxEPD2_EPD.

Definition at line 88 of file GxEPD2_583c.cpp.

89{
90 writeImage(bitmap, NULL, x, y, w, h, invert, mirror_y, pgm);
91}

◆ writeImagePart() [1/2]

void GxEPD2_583c::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,
int16_t x,
int16_t y,
int16_t w,
int16_t h,
bool invert = false,
bool mirror_y = false,
bool pgm = false )

Definition at line 173 of file GxEPD2_583c.cpp.

175{
176 if (_initial_write) writeScreenBuffer(); // initial full screen buffer clean
177 delay(1); // yield() to avoid WDT on ESP8266 and ESP32
178 if ((w_bitmap < 0) || (h_bitmap < 0) || (w < 0) || (h < 0)) return;
179 if ((x_part < 0) || (x_part >= w_bitmap)) return;
180 if ((y_part < 0) || (y_part >= h_bitmap)) return;
181 uint16_t wb_bitmap = (w_bitmap + 7) / 8; // width bytes, bitmaps are padded
182 x_part -= x_part % 8; // byte boundary
183 w = w_bitmap - x_part < w ? w_bitmap - x_part : w; // limit
184 h = h_bitmap - y_part < h ? h_bitmap - y_part : h; // limit
185 x -= x % 8; // byte boundary
186 w = 8 * ((w + 7) / 8); // byte boundary, bitmaps are padded
187 int16_t x1 = x < 0 ? 0 : x; // limit
188 int16_t y1 = y < 0 ? 0 : y; // limit
189 int16_t w1 = x + w < int16_t(WIDTH) ? w : int16_t(WIDTH) - x; // limit
190 int16_t h1 = y + h < int16_t(HEIGHT) ? h : int16_t(HEIGHT) - y; // limit
191 int16_t dx = x1 - x;
192 int16_t dy = y1 - y;
193 w1 -= dx;
194 h1 -= dy;
195 if ((w1 <= 0) || (h1 <= 0)) return;
196 if (!_using_partial_mode) _Init_Part();
197 _writeCommand(0x91); // partial in
198 _setPartialRamArea(x1, y1, w1, h1);
199 _writeCommand(0x10);
201 for (int16_t i = 0; i < h1; i++)
202 {
203 for (int16_t j = 0; j < w1 / 8; j++)
204 {
205 uint8_t black_data = 0xFF;
206 uint8_t color_data = 0xFF;
207 // use wb_bitmap, h_bitmap of bitmap for index!
208 uint16_t idx = mirror_y ? x_part / 8 + j + dx / 8 + uint16_t((h_bitmap - 1 - (y_part + i + dy))) * wb_bitmap : x_part / 8 + j + dx / 8 + uint16_t(y_part + i + dy) * wb_bitmap;
209 if (black)
210 {
211 if (pgm)
212 {
213#if defined(__AVR) || defined(ESP8266) || defined(ESP32)
214 black_data = pgm_read_byte(&black[idx]);
215#else
216 black_data = black[idx];
217#endif
218 }
219 else
220 {
221 black_data = black[idx];
222 }
223 if (invert) black_data = ~black_data;
224 }
225 if (color)
226 {
227 if (pgm)
228 {
229#if defined(__AVR) || defined(ESP8266) || defined(ESP32)
230 color_data = pgm_read_byte(&color[idx]);
231#else
232 color_data = color[idx];
233#endif
234 }
235 else
236 {
237 color_data = color[idx];
238 }
239 if (invert) color_data = ~color_data;
240 }
241 _send8pixel(~black_data, ~color_data);
242 }
243#if defined(ESP8266)
244 yield();
245#endif
246 }
247 _endTransfer();
248 _writeCommand(0x92); // partial out
249 delay(1); // yield() to avoid WDT on ESP8266 and ESP32
250}
bool _using_partial_mode
Definition GxEPD2_EPD.h:118

◆ writeImagePart() [2/2]

void GxEPD2_583c::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 )
virtual

Implements GxEPD2_EPD.

Definition at line 167 of file GxEPD2_583c.cpp.

169{
170 writeImagePart(bitmap, NULL, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
171}

◆ writeNative()

void GxEPD2_583c::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 )

Definition at line 252 of file GxEPD2_583c.cpp.

253{
254 if (data1)
255 {
256 if (_initial_write) writeScreenBuffer(); // initial full screen buffer clean
257 delay(1); // yield() to avoid WDT on ESP8266 and ESP32
258 uint16_t wb = (w + 1) / 2; // width bytes, bitmaps are padded
259 x -= x % 2; // byte boundary
260 w = wb * 2; // byte boundary
261 int16_t x1 = x < 0 ? 0 : x; // limit
262 int16_t y1 = y < 0 ? 0 : y; // limit
263 int16_t w1 = x + w < int16_t(WIDTH) ? w : int16_t(WIDTH) - x; // limit
264 int16_t h1 = y + h < int16_t(HEIGHT) ? h : int16_t(HEIGHT) - y; // limit
265 int16_t dx = x1 - x;
266 int16_t dy = y1 - y;
267 w1 -= dx;
268 h1 -= dy;
269 if ((w1 <= 0) || (h1 <= 0)) return;
270 _Init_Part();
271 _writeCommand(0x91); // partial in
272 _setPartialRamArea(x1, y1, w1, h1);
273 _writeCommand(0x10);
275 for (int16_t i = 0; i < h1; i++)
276 {
277 for (int16_t j = 0; j < w1 / 2; j++)
278 {
279 uint8_t data;
280 // use wb, h of bitmap for index!
281 uint16_t idx = mirror_y ? j + dx / 2 + uint16_t((h - 1 - (i + dy))) * wb : j + dx / 2 + uint16_t(i + dy) * wb;
282 if (pgm)
283 {
284#if defined(__AVR) || defined(ESP8266) || defined(ESP32)
285 data = pgm_read_byte(&data1[idx]);
286#else
287 data = data1[idx];
288#endif
289 }
290 else
291 {
292 data = data1[idx];
293 }
294 if (invert) data = ~data;
295 _transfer(data);
296 }
297 }
298 _endTransfer();
299 _writeCommand(0x92); // partial out
300 delay(1); // yield() to avoid WDT on ESP8266 and ESP32
301 }
302}

◆ writeScreenBuffer() [1/2]

void GxEPD2_583c::writeScreenBuffer ( uint8_t black_value,
uint8_t red_value )

Definition at line 72 of file GxEPD2_583c.cpp.

73{
74 _initial_write = false; // initial full screen buffer clean done
75 _Init_Part();
76 _writeCommand(0x91); // partial in
77 _setPartialRamArea(0, 0, WIDTH, HEIGHT);
78 _writeCommand(0x10);
80 for (uint32_t i = 0; uint32_t(WIDTH) * uint32_t(HEIGHT) / 8; i++)
81 {
82 _send8pixel(~black_value, ~color_value);
83 }
85 _writeCommand(0x92); // partial out
86}

◆ writeScreenBuffer() [2/2]

void GxEPD2_583c::writeScreenBuffer ( uint8_t value = 0x33)
virtual

Implements GxEPD2_EPD.

Definition at line 55 of file GxEPD2_583c.cpp.

56{
57 _initial_write = false; // initial full screen buffer clean done
58 if (value == 0xFF) value = 0x33; // white value for this controller
59 _Init_Part();
60 _writeCommand(0x91); // partial in
61 _setPartialRamArea(0, 0, WIDTH, HEIGHT);
62 _writeCommand(0x10);
64 for (uint32_t i = 0; i < uint32_t(WIDTH) * uint32_t(HEIGHT) / 2; i++)
65 {
66 _transfer(value);
67 }
69 _writeCommand(0x92); // partial out
70}

Member Data Documentation

◆ full_refresh_time

const uint16_t GxEPD2_583c::full_refresh_time = 32000
static

Definition at line 31 of file GxEPD2_583c.h.

◆ hasColor

const bool GxEPD2_583c::hasColor = true
static

Definition at line 26 of file GxEPD2_583c.h.

◆ hasFastPartialUpdate

const bool GxEPD2_583c::hasFastPartialUpdate = false
static

Definition at line 28 of file GxEPD2_583c.h.

◆ hasPartialUpdate

const bool GxEPD2_583c::hasPartialUpdate = true
static

Definition at line 27 of file GxEPD2_583c.h.

◆ HEIGHT

const uint16_t GxEPD2_583c::HEIGHT = 448
static

Definition at line 24 of file GxEPD2_583c.h.

◆ panel

const GxEPD2::Panel GxEPD2_583c::panel = GxEPD2::GDEW0583Z21
static

Definition at line 25 of file GxEPD2_583c.h.

◆ partial_refresh_time

const uint16_t GxEPD2_583c::partial_refresh_time = 32000
static

Definition at line 32 of file GxEPD2_583c.h.

◆ power_off_time

const uint16_t GxEPD2_583c::power_off_time = 50
static

Definition at line 30 of file GxEPD2_583c.h.

◆ power_on_time

const uint16_t GxEPD2_583c::power_on_time = 70
static

Definition at line 29 of file GxEPD2_583c.h.

◆ WIDTH

const uint16_t GxEPD2_583c::WIDTH = 600
static

Definition at line 22 of file GxEPD2_583c.h.

◆ WIDTH_VISIBLE

const uint16_t GxEPD2_583c::WIDTH_VISIBLE = WIDTH
static

Definition at line 23 of file GxEPD2_583c.h.


The documentation for this class was generated from the following files: