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

#include <GxEPD2_154c.h>

Inheritance diagram for GxEPD2_154c:
GxEPD2_EPD

Public Member Functions

 GxEPD2_154c (int16_t cs, int16_t dc, int16_t rst, int16_t busy)
 
void init (uint32_t serial_diag_bitrate=0)
 
void init (uint32_t serial_diag_bitrate, bool initial, uint16_t reset_duration=20, bool pulldown_rst_mode=false)
 
void clearScreen (uint8_t value=0xFF)
 
void clearScreen (uint8_t black_value, uint8_t color_value)
 
void writeScreenBuffer (uint8_t value=0xFF)
 
void writeScreenBuffer (uint8_t black_value, uint8_t color_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 ()
 
void setPaged ()
 
- 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 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)
 
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 = 200
 
static const uint16_t WIDTH_VISIBLE = WIDTH
 
static const uint16_t HEIGHT = 200
 
static const GxEPD2::Panel panel = GxEPD2::GDEW0154Z04
 
static const bool hasColor = true
 
static const bool hasPartialUpdate = false
 
static const bool hasFastPartialUpdate = false
 
static const uint16_t power_on_time = 20
 
static const uint16_t power_off_time = 20
 
static const uint16_t full_refresh_time = 7500
 
static const uint16_t partial_refresh_time = 7500
 

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_154c.h.

Constructor & Destructor Documentation

◆ GxEPD2_154c()

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

Definition at line 23 of file GxEPD2_154c.cpp.

23 :
24 GxEPD2_EPD(cs, dc, rst, busy, LOW, 20000000, WIDTH, HEIGHT, panel, hasColor, hasPartialUpdate, hasFastPartialUpdate)
25{
26 _paged = false;
27 _second_phase = false;
28}
static const uint16_t HEIGHT
Definition GxEPD2_154c.h:24
static const bool hasFastPartialUpdate
Definition GxEPD2_154c.h:28
static const GxEPD2::Panel panel
Definition GxEPD2_154c.h:25
static const bool hasPartialUpdate
Definition GxEPD2_154c.h:27
static const bool hasColor
Definition GxEPD2_154c.h:26
static const uint16_t WIDTH
Definition GxEPD2_154c.h:22
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_154c::clearScreen ( uint8_t black_value,
uint8_t color_value )

Definition at line 49 of file GxEPD2_154c.cpp.

50{
51 _Init_Full();
52 _writeCommand(0x10);
53 for (uint32_t i = 0; i < uint32_t(WIDTH) * uint32_t(HEIGHT) / 8; i++)
54 {
55 _writeData(bw2grey[(black_value & 0xF0) >> 4]);
56 _writeData(bw2grey[black_value & 0x0F]);
57 }
58 _writeCommand(0x13);
59 for (uint32_t i = 0; i < uint32_t(WIDTH) * uint32_t(HEIGHT) / 8; i++)
60 {
61 _writeData(color_value);
62 }
63 _Update_Full();
64}
void _writeCommand(uint8_t c)
void _writeData(uint8_t d)

◆ clearScreen() [2/2]

void GxEPD2_154c::clearScreen ( uint8_t value = 0xFF)
virtual

Implements GxEPD2_EPD.

Definition at line 44 of file GxEPD2_154c.cpp.

45{
46 clearScreen(value, 0xFF);
47}
void clearScreen(uint8_t value=0xFF)

◆ drawImage() [1/2]

void GxEPD2_154c::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 316 of file GxEPD2_154c.cpp.

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

◆ drawImage() [2/2]

void GxEPD2_154c::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 303 of file GxEPD2_154c.cpp.

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

◆ drawImagePart() [1/2]

void GxEPD2_154c::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 322 of file GxEPD2_154c.cpp.

324{
325 writeImagePart(black, color, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
326 refresh(x, y, w, h);
327}
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_154c::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 309 of file GxEPD2_154c.cpp.

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

◆ drawNative()

void GxEPD2_154c::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 329 of file GxEPD2_154c.cpp.

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

Implements GxEPD2_EPD.

Definition at line 351 of file GxEPD2_154c.cpp.

352{
353 _PowerOff();
354 if (_rst >= 0)
355 {
356 // check if it supports this command!
357 _writeCommand(0x07); // deep sleep
358 _writeData(0xA5); // check code
359 _hibernating = true;
360 }
361}
int16_t _rst
Definition GxEPD2_EPD.h:112
bool _hibernating
Definition GxEPD2_EPD.h:118

◆ init() [1/2]

void GxEPD2_154c::init ( uint32_t serial_diag_bitrate,
bool initial,
uint16_t reset_duration = 20,
bool pulldown_rst_mode = false )
virtual

Reimplemented from GxEPD2_EPD.

Definition at line 37 of file GxEPD2_154c.cpp.

38{
39 GxEPD2_EPD::init(serial_diag_bitrate, initial, reset_duration, pulldown_rst_mode);
40 _paged = false;
41 _second_phase = false;
42}
virtual void init(uint32_t serial_diag_bitrate=0)

◆ init() [2/2]

void GxEPD2_154c::init ( uint32_t serial_diag_bitrate = 0)
virtual

Reimplemented from GxEPD2_EPD.

Definition at line 30 of file GxEPD2_154c.cpp.

31{
32 GxEPD2_EPD::init(serial_diag_bitrate);
33 _paged = false;
34 _second_phase = false;
35}

◆ powerOff()

void GxEPD2_154c::powerOff ( void )
virtual

Implements GxEPD2_EPD.

Definition at line 346 of file GxEPD2_154c.cpp.

347{
348 _PowerOff();
349}

◆ refresh() [1/2]

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

Implements GxEPD2_EPD.

Definition at line 335 of file GxEPD2_154c.cpp.

336{
337 if (_paged) return;
338 _Update_Full();
339}

◆ refresh() [2/2]

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

Implements GxEPD2_EPD.

Definition at line 341 of file GxEPD2_154c.cpp.

342{
343 _Update_Full();
344}

◆ setPaged()

void GxEPD2_154c::setPaged ( )
virtual

Reimplemented from GxEPD2_EPD.

Definition at line 394 of file GxEPD2_154c.cpp.

395{
396 _paged = true;
397 _second_phase = false;
398 _Init_Full();
399 _writeCommand(0x10);
400}

◆ writeImage() [1/2]

void GxEPD2_154c::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 92 of file GxEPD2_154c.cpp.

93{
94 //Serial.print("writeImage("); Serial.print(x); Serial.print(", "); Serial.print(y); Serial.print(", ");
95 //Serial.print(w); Serial.print(", "); Serial.print(h); Serial.println(")");
96 delay(1); // yield() to avoid WDT on ESP8266 and ESP32
97 if (_paged && (x == 0) && (w == int16_t(WIDTH)) && (h < int16_t(HEIGHT)))
98 {
99 //Serial.println("paged");
100 if (!_second_phase)
101 {
102 for (uint32_t i = 0; i < uint32_t(WIDTH) * uint32_t(h) / 8; i++)
103 {
104 _writeData(bw2grey[(black[i] & 0xF0) >> 4]);
105 _writeData(bw2grey[black[i] & 0x0F]);
106 }
107 if (y + h == HEIGHT) // last page
108 {
109 //Serial.println("phase 1 ended");
110 _second_phase = true;
111 _writeCommand(0x13);
112 }
113 }
114 else
115 {
116 for (uint32_t i = 0; i < uint32_t(WIDTH) * uint32_t(h) / 8; i++)
117 {
118 _writeData(color[i]);
119 }
120 if (y + h == HEIGHT) // last page
121 {
122 //Serial.println("phase 2 ended");
123 _second_phase = false;
124 _paged = false;
125 }
126 }
127 }
128 else
129 {
130 _paged = false;
131 uint16_t wb = (w + 7) / 8; // width bytes, bitmaps are padded
132 x -= x % 8; // byte boundary
133 w = wb * 8; // byte boundary
134 if ((w <= 0) || (h <= 0)) return;
135 _Init_Full();
136 _writeCommand(0x10);
137 for (int16_t i = 0; i < int16_t(HEIGHT); i++)
138 {
139 for (int16_t j = 0; j < int16_t(WIDTH); j += 8)
140 {
141 uint8_t data = 0xFF;
142 if (black)
143 {
144 if ((j >= x) && (j <= x + w) && (i >= y) && (i < y + h))
145 {
146 uint16_t idx = mirror_y ? (j - x) / 8 + ((h - 1 - (i - y))) * wb : (j - x) / 8 + (i - y) * wb;
147 if (pgm)
148 {
149#if defined(__AVR) || defined(ESP8266) || defined(ESP32)
150 data = pgm_read_byte(&black[idx]);
151#else
152 data = black[idx];
153#endif
154 }
155 else
156 {
157 data = black[idx];
158 }
159 if (invert) data = ~data;
160 }
161 }
162 //_writeData(data);
163 _writeData(bw2grey[(data & 0xF0) >> 4]);
164 _writeData(bw2grey[data & 0x0F]);
165 }
166 }
167 _writeCommand(0x13);
168 for (int16_t i = 0; i < int16_t(HEIGHT); i++)
169 {
170 for (int16_t j = 0; j < int16_t(WIDTH); j += 8)
171 {
172 uint8_t data = 0xFF;
173 if (color)
174 {
175 if ((j >= x) && (j <= x + w) && (i >= y) && (i < y + h))
176 {
177 uint16_t idx = mirror_y ? (j - x) / 8 + ((h - 1 - (i - y))) * wb : (j - x) / 8 + (i - y) * wb;
178 if (pgm)
179 {
180#if defined(__AVR) || defined(ESP8266) || defined(ESP32)
181 data = pgm_read_byte(&color[idx]);
182#else
183 data = color[idx];
184#endif
185 }
186 else
187 {
188 data = color[idx];
189 }
190 if (invert) data = ~data;
191 }
192 }
193 _writeData(data);
194 }
195 }
196 }
197 delay(1); // yield() to avoid WDT on ESP8266 and ESP32
198}

◆ writeImage() [2/2]

void GxEPD2_154c::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 87 of file GxEPD2_154c.cpp.

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

◆ writeImagePart() [1/2]

void GxEPD2_154c::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 206 of file GxEPD2_154c.cpp.

208{
209 delay(1); // yield() to avoid WDT on ESP8266 and ESP32
210 if ((w_bitmap < 0) || (h_bitmap < 0) || (w < 0) || (h < 0)) return;
211 if ((x_part < 0) || (x_part >= w_bitmap)) return;
212 if ((y_part < 0) || (y_part >= h_bitmap)) return;
213 int16_t wb_bitmap = (w_bitmap + 7) / 8; // width bytes, bitmaps are padded
214 x_part -= x_part % 8; // byte boundary
215 w = w_bitmap - x_part < w ? w_bitmap - x_part : w; // limit
216 h = h_bitmap - y_part < h ? h_bitmap - y_part : h; // limit
217 x -= x % 8; // byte boundary
218 w = 8 * ((w + 7) / 8); // byte boundary, bitmaps are padded
219 int16_t x1 = x < 0 ? 0 : x; // limit
220 int16_t y1 = y < 0 ? 0 : y; // limit
221 int16_t w1 = x + w < int16_t(WIDTH) ? w : int16_t(WIDTH) - x; // limit
222 int16_t h1 = y + h < int16_t(HEIGHT) ? h : int16_t(HEIGHT) - y; // limit
223 int16_t dx = x1 - x;
224 int16_t dy = y1 - y;
225 w1 -= dx;
226 h1 -= dy;
227 if ((w1 <= 0) || (h1 <= 0)) return;
228 _Init_Full();
229 _writeCommand(0x10);
230 for (int16_t i = 0; i < int16_t(HEIGHT); i++)
231 {
232 for (int16_t j = 0; j < int16_t(WIDTH); j += 8)
233 {
234 uint8_t data = 0xFF;
235 if (black)
236 {
237 if ((j >= x1) && (j <= x1 + w) && (i >= y1) && (i < y1 + h))
238 {
239 // use wb_bitmap, h_bitmap of bitmap for index!
240 //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;
241 uint16_t idx = mirror_y ? (x_part + j - x1) / 8 + ((h_bitmap - 1 - (y_part + i - y1))) * wb_bitmap : (x_part + j - x1) / 8 + (y_part + i - y1) * wb_bitmap;
242 if (pgm)
243 {
244#if defined(__AVR) || defined(ESP8266) || defined(ESP32)
245 data = pgm_read_byte(&black[idx]);
246#else
247 data = black[idx];
248#endif
249 }
250 else
251 {
252 data = black[idx];
253 }
254 if (invert) data = ~data;
255 }
256 }
257 //_writeData(data);
258 _writeData(bw2grey[(data & 0xF0) >> 4]);
259 _writeData(bw2grey[data & 0x0F]);
260 }
261 }
262 _writeCommand(0x13);
263 for (int16_t i = 0; i < int16_t(HEIGHT); i++)
264 {
265 for (int16_t j = 0; j < int16_t(WIDTH); j += 8)
266 {
267 uint8_t data = 0xFF;
268 if (color)
269 {
270 if ((j >= x1) && (j <= x1 + w) && (i >= y1) && (i < y1 + h))
271 {
272 // use wb_bitmap, h_bitmap of bitmap for index!
273 uint16_t idx = mirror_y ? (x_part + j - x1) / 8 + ((h_bitmap - 1 - (y_part + i - y1))) * wb_bitmap : (x_part + j - x1) / 8 + (y_part + i - y1) * wb_bitmap;
274 if (pgm)
275 {
276#if defined(__AVR) || defined(ESP8266) || defined(ESP32)
277 data = pgm_read_byte(&color[idx]);
278#else
279 data = color[idx];
280#endif
281 }
282 else
283 {
284 data = color[idx];
285 }
286 if (invert) data = ~data;
287 }
288 }
289 _writeData(data);
290 }
291 }
292 delay(1); // yield() to avoid WDT on ESP8266 and ESP32
293}

◆ writeImagePart() [2/2]

void GxEPD2_154c::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 200 of file GxEPD2_154c.cpp.

202{
203 writeImagePart(bitmap, NULL, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
204}

◆ writeNative()

void GxEPD2_154c::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 295 of file GxEPD2_154c.cpp.

296{
297 if (data1)
298 {
299 writeImage(data1, x, y, w, h, invert, mirror_y, pgm);
300 }
301}

◆ writeScreenBuffer() [1/2]

void GxEPD2_154c::writeScreenBuffer ( uint8_t black_value,
uint8_t color_value )

Definition at line 71 of file GxEPD2_154c.cpp.

72{
73 _Init_Full();
74 _writeCommand(0x10);
75 for (uint32_t i = 0; i < uint32_t(WIDTH) * uint32_t(HEIGHT) / 8; i++)
76 {
77 _writeData(bw2grey[(black_value & 0xF0) >> 4]);
78 _writeData(bw2grey[black_value & 0x0F]);
79 }
80 _writeCommand(0x13);
81 for (uint32_t i = 0; i < uint32_t(WIDTH) * uint32_t(HEIGHT) / 8; i++)
82 {
83 _writeData(color_value);
84 }
85}

◆ writeScreenBuffer() [2/2]

void GxEPD2_154c::writeScreenBuffer ( uint8_t value = 0xFF)
virtual

Implements GxEPD2_EPD.

Definition at line 66 of file GxEPD2_154c.cpp.

67{
68 writeScreenBuffer(value, 0xFF);
69}
void writeScreenBuffer(uint8_t value=0xFF)

Member Data Documentation

◆ full_refresh_time

const uint16_t GxEPD2_154c::full_refresh_time = 7500
static

Definition at line 31 of file GxEPD2_154c.h.

◆ hasColor

const bool GxEPD2_154c::hasColor = true
static

Definition at line 26 of file GxEPD2_154c.h.

◆ hasFastPartialUpdate

const bool GxEPD2_154c::hasFastPartialUpdate = false
static

Definition at line 28 of file GxEPD2_154c.h.

◆ hasPartialUpdate

const bool GxEPD2_154c::hasPartialUpdate = false
static

Definition at line 27 of file GxEPD2_154c.h.

◆ HEIGHT

const uint16_t GxEPD2_154c::HEIGHT = 200
static

Definition at line 24 of file GxEPD2_154c.h.

◆ panel

const GxEPD2::Panel GxEPD2_154c::panel = GxEPD2::GDEW0154Z04
static

Definition at line 25 of file GxEPD2_154c.h.

◆ partial_refresh_time

const uint16_t GxEPD2_154c::partial_refresh_time = 7500
static

Definition at line 32 of file GxEPD2_154c.h.

◆ power_off_time

const uint16_t GxEPD2_154c::power_off_time = 20
static

Definition at line 30 of file GxEPD2_154c.h.

◆ power_on_time

const uint16_t GxEPD2_154c::power_on_time = 20
static

Definition at line 29 of file GxEPD2_154c.h.

◆ WIDTH

const uint16_t GxEPD2_154c::WIDTH = 200
static

Definition at line 22 of file GxEPD2_154c.h.

◆ WIDTH_VISIBLE

const uint16_t GxEPD2_154c::WIDTH_VISIBLE = WIDTH
static

Definition at line 23 of file GxEPD2_154c.h.


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