|
@@ -27,16 +27,16 @@ void GxEPD2_154_D67::clearScreen(uint8_t value)
|
|
|
|
|
|
|
|
void GxEPD2_154_D67::writeScreenBuffer(uint8_t value)
|
|
void GxEPD2_154_D67::writeScreenBuffer(uint8_t value)
|
|
|
{
|
|
{
|
|
|
- _initial_write = false; // initial full screen buffer clean done
|
|
|
|
|
if (!_using_partial_mode) _Init_Part();
|
|
if (!_using_partial_mode) _Init_Part();
|
|
|
|
|
+ if (_initial_write) _writeScreenBuffer(0x26, value); // set previous
|
|
|
_writeScreenBuffer(0x24, value); // set current
|
|
_writeScreenBuffer(0x24, value); // set current
|
|
|
- if (_initial_refresh) _writeScreenBuffer(0x26, value); // set previous
|
|
|
|
|
|
|
+ _initial_write = false; // initial full screen buffer clean done
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void GxEPD2_154_D67::writeScreenBufferAgain(uint8_t value)
|
|
void GxEPD2_154_D67::writeScreenBufferAgain(uint8_t value)
|
|
|
{
|
|
{
|
|
|
if (!_using_partial_mode) _Init_Part();
|
|
if (!_using_partial_mode) _Init_Part();
|
|
|
- _writeScreenBuffer(0x26, value); // set previous
|
|
|
|
|
|
|
+ _writeScreenBuffer(0x24, value); // set current
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void GxEPD2_154_D67::_writeScreenBuffer(uint8_t command, uint8_t value)
|
|
void GxEPD2_154_D67::_writeScreenBuffer(uint8_t command, uint8_t value)
|
|
@@ -53,9 +53,18 @@ void GxEPD2_154_D67::writeImage(const uint8_t bitmap[], int16_t x, int16_t y, in
|
|
|
_writeImage(0x24, bitmap, x, y, w, h, invert, mirror_y, pgm);
|
|
_writeImage(0x24, bitmap, x, y, w, h, invert, mirror_y, pgm);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+void GxEPD2_154_D67::writeImage(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm, bool for_full_refresh)
|
|
|
|
|
+{
|
|
|
|
|
+ if (for_full_refresh)
|
|
|
|
|
+ {
|
|
|
|
|
+ _writeImage(0x26, bitmap, x, y, w, h, invert, mirror_y, pgm);
|
|
|
|
|
+ }
|
|
|
|
|
+ _writeImage(0x24, bitmap, x, y, w, h, invert, mirror_y, pgm);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
void GxEPD2_154_D67::writeImageAgain(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
|
|
void GxEPD2_154_D67::writeImageAgain(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
|
|
|
{
|
|
{
|
|
|
- _writeImage(0x26, bitmap, x, y, w, h, invert, mirror_y, pgm);
|
|
|
|
|
|
|
+ _writeImage(0x24, bitmap, x, y, w, h, invert, mirror_y, pgm);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void GxEPD2_154_D67::_writeImage(uint8_t command, const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
|
|
void GxEPD2_154_D67::_writeImage(uint8_t command, const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
|
|
@@ -112,7 +121,7 @@ void GxEPD2_154_D67::writeImagePart(const uint8_t bitmap[], int16_t x_part, int1
|
|
|
void GxEPD2_154_D67::writeImagePartAgain(const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
|
|
void GxEPD2_154_D67::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, bool mirror_y, bool pgm)
|
|
int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
|
|
|
{
|
|
{
|
|
|
- _writeImagePart(0x26, bitmap, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
|
|
|
|
|
|
|
+ _writeImagePart(0x24, bitmap, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void GxEPD2_154_D67::_writeImagePart(uint8_t command, const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
|
|
void GxEPD2_154_D67::_writeImagePart(uint8_t command, const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
|
|
@@ -333,20 +342,6 @@ void GxEPD2_154_D67::_InitDisplay()
|
|
|
_writeData(0x05);
|
|
_writeData(0x05);
|
|
|
_writeCommand(0x18); // Read built-in temperature sensor
|
|
_writeCommand(0x18); // Read built-in temperature sensor
|
|
|
_writeData(0x80);
|
|
_writeData(0x80);
|
|
|
- // PingPong for mode 2 doesn't work with GxEPD2
|
|
|
|
|
- // not available for mode 1, and has some "quirks"
|
|
|
|
|
- // values as read from OTP (0x2d) 2.1.2020, except F[6]
|
|
|
|
|
- _writeCommand(0x37); //Write Register for Display Option
|
|
|
|
|
- _writeData(0x00); // A
|
|
|
|
|
- _writeData(0x00); // B
|
|
|
|
|
- _writeData(0x00); // C
|
|
|
|
|
- _writeData(0x00); // D
|
|
|
|
|
- _writeData(0xff); // E
|
|
|
|
|
- _writeData(0x00); // F F[6]=0 : disable PingPong
|
|
|
|
|
- _writeData(0x00); // G
|
|
|
|
|
- _writeData(0x00); // H
|
|
|
|
|
- _writeData(0x00); // I
|
|
|
|
|
- _writeData(0x01); // J
|
|
|
|
|
_setPartialRamArea(0, 0, WIDTH, HEIGHT);
|
|
_setPartialRamArea(0, 0, WIDTH, HEIGHT);
|
|
|
}
|
|
}
|
|
|
|
|
|