17 GxEPD2_EPD(cs, dc, rst, busy, HIGH, 25000000, WIDTH, HEIGHT, panel, hasColor, hasPartialUpdate, hasFastPartialUpdate)
44 for (uint32_t i = 0; i < uint32_t(
WIDTH) * uint32_t(
HEIGHT) / 8; i++)
51 for (uint32_t i = 0; i < uint32_t(
WIDTH) * uint32_t(
HEIGHT) / 8; i++)
60 writeImage(bitmap, NULL, x, y, w, h, invert, mirror_y, pgm);
63void GxEPD2_750c_Z90::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)
67 uint16_t wb = (w + 7) / 8;
70 int16_t x1 = x < 0 ? 0 : x;
71 int16_t y1 = y < 0 ? 0 : y;
72 int16_t w1 = x + w < int16_t(
WIDTH) ? w : int16_t(
WIDTH) - x;
73 int16_t h1 = y + h < int16_t(
HEIGHT) ? h : int16_t(
HEIGHT) - y;
78 if ((w1 <= 0) || (h1 <= 0))
return;
80 _setPartialRamArea(x1, y1, w1, h1);
83 for (int16_t i = 0; i < h1; i++)
85 for (int16_t j = 0; j < w1 / 8; j++)
91 uint16_t idx = mirror_y ? j + dx / 8 + uint16_t((h - 1 - (i + dy))) * wb : j + dx / 8 + uint16_t(i + dy) * wb;
94#if defined(__AVR) || defined(ESP8266) || defined(ESP32)
95 data = pgm_read_byte(&black[idx]);
104 if (invert) data = ~data;
112 for (int16_t i = 0; i < h1; i++)
114 for (int16_t j = 0; j < w1 / 8; j++)
120 uint16_t idx = mirror_y ? j + dx / 8 + uint16_t((h - 1 - (i + dy))) * wb : j + dx / 8 + uint16_t(i + dy) * wb;
123#if defined(__AVR) || defined(ESP8266) || defined(ESP32)
124 data = pgm_read_byte(&color[idx]);
133 if (invert) data = ~data;
143 int16_t x, int16_t y, int16_t w, int16_t h,
bool invert,
bool mirror_y,
bool pgm)
145 writeImagePart(bitmap, NULL, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
149 int16_t x, int16_t y, int16_t w, int16_t h,
bool invert,
bool mirror_y,
bool pgm)
153 if ((w_bitmap < 0) || (h_bitmap < 0) || (w < 0) || (h < 0))
return;
154 if ((x_part < 0) || (x_part >= w_bitmap))
return;
155 if ((y_part < 0) || (y_part >= h_bitmap))
return;
156 uint16_t wb_bitmap = (w_bitmap + 7) / 8;
157 x_part -= x_part % 8;
158 w = w_bitmap - x_part < w ? w_bitmap - x_part : w;
159 h = h_bitmap - y_part < h ? h_bitmap - y_part : h;
161 w = 8 * ((w + 7) / 8);
162 int16_t x1 = x < 0 ? 0 : x;
163 int16_t y1 = y < 0 ? 0 : y;
164 int16_t w1 = x + w < int16_t(
WIDTH) ? w : int16_t(
WIDTH) - x;
165 int16_t h1 = y + h < int16_t(
HEIGHT) ? h : int16_t(
HEIGHT) - y;
170 if ((w1 <= 0) || (h1 <= 0))
return;
172 _setPartialRamArea(x1, y1, w1, h1);
175 for (int16_t i = 0; i < h1; i++)
177 for (int16_t j = 0; j < w1 / 8; j++)
181 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;
184#if defined(__AVR) || defined(ESP8266) || defined(ESP32)
185 data = pgm_read_byte(&black[idx]);
194 if (invert) data = ~data;
201 for (int16_t i = 0; i < h1; i++)
203 for (int16_t j = 0; j < w1 / 8; j++)
209 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;
212#if defined(__AVR) || defined(ESP8266) || defined(ESP32)
213 data = pgm_read_byte(&color[idx]);
222 if (invert) data = ~data;
231void GxEPD2_750c_Z90::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)
235 writeImage(data1, x, y, w, h, invert, mirror_y, pgm);
241 writeImage(bitmap, x, y, w, h, invert, mirror_y, pgm);
246 int16_t x, int16_t y, int16_t w, int16_t h,
bool invert,
bool mirror_y,
bool pgm)
248 writeImagePart(bitmap, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
252void GxEPD2_750c_Z90::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)
254 writeImage(black, color, x, y, w, h, invert, mirror_y, pgm);
259 int16_t x, int16_t y, int16_t w, int16_t h,
bool invert,
bool mirror_y,
bool pgm)
261 writeImagePart(black, color, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
265void GxEPD2_750c_Z90::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)
267 writeNative(data1, data2, x, y, w, h, invert, mirror_y, pgm);
298void GxEPD2_750c_Z90::_setPartialRamArea(uint16_t x, uint16_t y, uint16_t w, uint16_t h)
310 _setRamArea(x, x + w - 1,
HEIGHT - y - 1,
HEIGHT - h - y);
311 _setRamPointer(x,
HEIGHT - y - 1);
314 _setRamArea(
WIDTH - x - 1,
WIDTH - w - x, y, y + h - 1);
315 _setRamPointer(
WIDTH - x - 1, y);
318 _setRamArea(x, x + w - 1, y, y + h - 1);
319 _setRamPointer(x, y);
323void GxEPD2_750c_Z90::_setRamArea(uint16_t xs, uint16_t xe, uint16_t ys, uint16_t ye)
338void GxEPD2_750c_Z90::_setRamPointer(uint16_t xs, uint16_t ys)
349void GxEPD2_750c_Z90::_PowerOn()
361void GxEPD2_750c_Z90::_PowerOff()
374void GxEPD2_750c_Z90::_InitDisplay()
400void GxEPD2_750c_Z90::_Init_Full()
406void GxEPD2_750c_Z90::_Init_Part()
412void GxEPD2_750c_Z90::_Update_Full()
420void GxEPD2_750c_Z90::_Update_Part()
static const uint16_t power_off_time
static const uint16_t WIDTH
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 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 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 writeScreenBuffer(uint8_t value=0xFF)
static const uint16_t full_refresh_time
static const uint8_t entry_mode
GxEPD2_750c_Z90(int16_t cs, int16_t dc, int16_t rst, int16_t busy)
static const uint16_t power_on_time
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)
void clearScreen(uint8_t value=0xFF)
static const uint16_t partial_refresh_time
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 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 HEIGHT
void _writeCommand(uint8_t c)
void _writeData(uint8_t d)
void _waitWhileBusy(const char *comment=0, uint16_t busy_time=5000)
void _transfer(uint8_t value)