|
|
@@ -100,7 +100,7 @@ void GxEPD2_420_SE0420NQ04::writeImage(const uint8_t bitmap[], int16_t x, int16_
|
|
|
}
|
|
|
|
|
|
void GxEPD2_420_SE0420NQ04::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, bool mirror_y, bool pgm)
|
|
|
+ int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
|
|
|
{
|
|
|
if (_initial_write) writeScreenBuffer(); // initial full screen buffer clean
|
|
|
delay(1); // yield() to avoid WDT on ESP8266 and ESP32
|
|
|
@@ -164,7 +164,7 @@ void GxEPD2_420_SE0420NQ04::writeImage(const uint8_t* black, const uint8_t* colo
|
|
|
}
|
|
|
|
|
|
void GxEPD2_420_SE0420NQ04::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, bool mirror_y, bool pgm)
|
|
|
+ int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
|
|
|
{
|
|
|
if (black)
|
|
|
{
|
|
|
@@ -188,7 +188,7 @@ void GxEPD2_420_SE0420NQ04::drawImage(const uint8_t bitmap[], int16_t x, int16_t
|
|
|
}
|
|
|
|
|
|
void GxEPD2_420_SE0420NQ04::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, 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(bitmap, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
|
|
|
refresh(x, y, w, h);
|
|
|
@@ -203,7 +203,7 @@ void GxEPD2_420_SE0420NQ04::drawImage(const uint8_t* black, const uint8_t* color
|
|
|
}
|
|
|
|
|
|
void GxEPD2_420_SE0420NQ04::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, 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(black, color, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
|
|
|
refresh(x, y, w, h);
|
|
|
@@ -296,8 +296,11 @@ void GxEPD2_420_SE0420NQ04::_PowerOn()
|
|
|
|
|
|
void GxEPD2_420_SE0420NQ04::_PowerOff()
|
|
|
{
|
|
|
- _writeCommand(0x02); // power off
|
|
|
- _waitWhileBusy("_PowerOff", power_off_time);
|
|
|
+ if (_power_is_on)
|
|
|
+ {
|
|
|
+ _writeCommand(0x02); // power off
|
|
|
+ _waitWhileBusy("_PowerOff", power_off_time);
|
|
|
+ }
|
|
|
_power_is_on = false;
|
|
|
_using_partial_mode = false;
|
|
|
}
|
|
|
@@ -332,120 +335,69 @@ void GxEPD2_420_SE0420NQ04::_InitDisplay()
|
|
|
_writeData(0x01);
|
|
|
_writeData(0x2C);
|
|
|
_writeCommand (0x50); // Border
|
|
|
- _writeData(0xb7); //
|
|
|
+ _writeData(0xb7); // white
|
|
|
}
|
|
|
|
|
|
+// full update waveform (taken form GxEPD2_420, adapted for UC8276C)
|
|
|
+
|
|
|
const unsigned char GxEPD2_420_SE0420NQ04::lut_20_vcom0_full[] PROGMEM =
|
|
|
{
|
|
|
- 0x01, 0x19, 0x19, 0x19, 0x19, 0x01, 0x01,
|
|
|
- 0x01, 0x19, 0x19, 0x19, 0x01, 0x01, 0x01,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
+ 0x01, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00,
|
|
|
+ //0x60, 0x28, 0x28, 0x00, 0x00, 0x01, 0x00,
|
|
|
+ 0x01, 0x40 + 0x28, 0x80 + 0x28, 0x00, 0x00, 0x01, 0x00,
|
|
|
+ 0x01, 0x14, 0x00, 0x00, 0x00, 0x01, 0x00,
|
|
|
+ 0x01, 0x12, 0x12, 0x00, 0x00, 0x01, 0x00,
|
|
|
};
|
|
|
|
|
|
const unsigned char GxEPD2_420_SE0420NQ04::lut_21_ww_full[] PROGMEM =
|
|
|
{
|
|
|
- 0x01, 0x59, 0x99, 0x59, 0x99, 0x01, 0x01,
|
|
|
- 0x01, 0x59, 0x99, 0x19, 0x01, 0x01, 0x01,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
+ // 0x40, 0x08, 0x00, 0x00, 0x00, 0x02,
|
|
|
+ 0x01, 0x40 + 0x08, 0x00, 0x00, 0x00, 0x02, 0x00,
|
|
|
+ // 0x90, 0x28, 0x28, 0x00, 0x00, 0x01,
|
|
|
+ 0x01, 0x80 + 0x28, 0x40 + 0x28, 0x00, 0x00, 0x01, 0x00,
|
|
|
+ // 0x40, 0x14, 0x00, 0x00, 0x00, 0x01,
|
|
|
+ 0x01, 0x40 + 0x14, 0x00, 0x00, 0x00, 0x01, 0x00,
|
|
|
+ // 0xA0, 0x12, 0x12, 0x00, 0x00, 0x01,
|
|
|
+ 0x01, 0x80 + 0x12, 0x80 + 0x12, 0x00, 0x00, 0x01, 0x00,
|
|
|
};
|
|
|
|
|
|
const unsigned char GxEPD2_420_SE0420NQ04::lut_22_bw_full[] PROGMEM =
|
|
|
{
|
|
|
- 0x01, 0x59, 0x99, 0x59, 0x99, 0x01, 0x01,
|
|
|
- 0x01, 0x59, 0x99, 0x19, 0x01, 0x01, 0x01,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
+ // 0x40, 0x08, 0x00, 0x00, 0x00, 0x02,
|
|
|
+ 0x01, 0x40 + 0x08, 0x00, 0x00, 0x00, 0x02, 0x00,
|
|
|
+ // 0x90, 0x28, 0x28, 0x00, 0x00, 0x01,
|
|
|
+ 0x01, 0x80 + 0x28, 0x40 + 0x28, 0x00, 0x00, 0x01, 0x00,
|
|
|
+ // 0x40, 0x14, 0x00, 0x00, 0x00, 0x01,
|
|
|
+ 0x01, 0x40 + 0x14, 0x00, 0x00, 0x00, 0x01, 0x00,
|
|
|
+ // 0xA0, 0x12, 0x12, 0x00, 0x00, 0x01,
|
|
|
+ 0x01, 0x80 + 0x12, 0x80 + 0x12, 0x00, 0x00, 0x01, 0x00,
|
|
|
};
|
|
|
|
|
|
const unsigned char GxEPD2_420_SE0420NQ04::lut_23_wb_full[] PROGMEM =
|
|
|
{
|
|
|
- 0x01, 0x19, 0x99, 0x59, 0x99, 0x01, 0x01,
|
|
|
- 0x01, 0x59, 0x99, 0x59, 0x01, 0x01, 0x01,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
+ // 0x80, 0x08, 0x00, 0x00, 0x00, 0x02,
|
|
|
+ 0x01, 0x80 + 0x08, 0x00, 0x00, 0x00, 0x02, 0x00,
|
|
|
+ // 0x90, 0x28, 0x28, 0x00, 0x00, 0x01,
|
|
|
+ 0x01, 0x80 + 0x28, 0x40 + 0x28, 0x00, 0x00, 0x01, 0x00,
|
|
|
+ // 0x80, 0x14, 0x00, 0x00, 0x00, 0x01,
|
|
|
+ 0x01, 0x80 + 0x14, 0x00, 0x00, 0x00, 0x01, 0x00,
|
|
|
+ // 0x50, 0x12, 0x12, 0x00, 0x00, 0x01,
|
|
|
+ 0x01, 0x40 + 0x12, 0x40 + 0x12, 0x00, 0x00, 0x01, 0x00,
|
|
|
};
|
|
|
|
|
|
const unsigned char GxEPD2_420_SE0420NQ04::lut_24_bb_full[] PROGMEM =
|
|
|
{
|
|
|
- 0x01, 0x19, 0x99, 0x59, 0x99, 0x01, 0x01,
|
|
|
- 0x01, 0x59, 0x99, 0x59, 0x01, 0x01, 0x01,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
-};
|
|
|
-
|
|
|
-// partial update waveform
|
|
|
-
|
|
|
-#if 0
|
|
|
-
|
|
|
-const unsigned char GxEPD2_420_SE0420NQ04::lut_20_vcom0_partial[] PROGMEM =
|
|
|
-{
|
|
|
- 0x01, 0x14, 0x02, 0x00, 0x00, 0x01, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
-};
|
|
|
-
|
|
|
-const unsigned char GxEPD2_420_SE0420NQ04::lut_21_ww_partial[] PROGMEM =
|
|
|
-{
|
|
|
- 0x01, 0x14, 0x82, 0x00, 0x00, 0x01, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
-};
|
|
|
-
|
|
|
-const unsigned char GxEPD2_420_SE0420NQ04::lut_22_bw_partial[] PROGMEM =
|
|
|
-{
|
|
|
- 0x01, 0x94, 0x82, 0x00, 0x00, 0x01, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
-};
|
|
|
-
|
|
|
-const unsigned char GxEPD2_420_SE0420NQ04::lut_23_wb_partial[] PROGMEM =
|
|
|
-{
|
|
|
- 0x01, 0x54, 0x42, 0x00, 0x00, 0x01, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
-};
|
|
|
-
|
|
|
-const unsigned char GxEPD2_420_SE0420NQ04::lut_24_bb_partial[] PROGMEM =
|
|
|
-{
|
|
|
- 0x01, 0x14, 0x02, 0x00, 0x00, 0x01, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
+ // 0x80, 0x08, 0x00, 0x00, 0x00, 0x02,
|
|
|
+ 0x01, 0x80 + 0x08, 0x00, 0x00, 0x00, 0x02, 0x00,
|
|
|
+ // 0x90, 0x28, 0x28, 0x00, 0x00, 0x01,
|
|
|
+ 0x01, 0x80 + 0x28, 0x40 + 0x28, 0x00, 0x00, 0x01, 0x00,
|
|
|
+ // 0x80, 0x14, 0x00, 0x00, 0x00, 0x01,
|
|
|
+ 0x01, 0x80 + 0x14, 0x00, 0x00, 0x00, 0x01, 0x00,
|
|
|
+ // 0x50, 0x12, 0x12, 0x00, 0x00, 0x01,
|
|
|
+ 0x01, 0x40 + 0x12, 0x40 + 0x12, 0x00, 0x00, 0x01, 0x00,
|
|
|
};
|
|
|
|
|
|
-#else
|
|
|
+// partial update waveform (taken form GxEPD2_420, adapted for UC8276C)
|
|
|
|
|
|
// same waveform as by demo code from Good Display
|
|
|
//#define T1 0 // color change charge balance pre-phase
|
|
|
@@ -483,16 +435,11 @@ const unsigned char GxEPD2_420_SE0420NQ04::lut_20_vcom0_partial[] PROGMEM =
|
|
|
0x00 + T4,
|
|
|
0x01, // State 1 repeat times
|
|
|
0x00, // State 2 repeat times
|
|
|
- 0x00 + 1, // gnd phase
|
|
|
- 0x00,
|
|
|
- 0x00,
|
|
|
- 0x00,
|
|
|
- 0x01,
|
|
|
- 0x00,
|
|
|
+ 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, // gnd phase
|
|
|
};
|
|
|
|
|
|
const unsigned char GxEPD2_420_SE0420NQ04::lut_21_ww_partial[] PROGMEM =
|
|
|
-{
|
|
|
+{
|
|
|
// LUT format of UC8176
|
|
|
// 10 w
|
|
|
// 0x18, T1, T2, T3, T4, 1, // 00 01 10 00
|
|
|
@@ -500,23 +447,12 @@ const unsigned char GxEPD2_420_SE0420NQ04::lut_21_ww_partial[] PROGMEM =
|
|
|
//
|
|
|
// LUT format of UC8276
|
|
|
// 00b : 0V, 01b : VSH, 10b : VSL, 11b : VDHR
|
|
|
- 0x01, // Group Repeat Times
|
|
|
- 0x00 + T1,
|
|
|
- 0x80 + T2,
|
|
|
- 0x40 + T3,
|
|
|
- 0x00 + T4,
|
|
|
- 0x01, // State 1 repeat times
|
|
|
- 0x00, // State 2 repeat times
|
|
|
- 0x00 + 1, // gnd phase
|
|
|
- 0x00,
|
|
|
- 0x00,
|
|
|
- 0x00,
|
|
|
- 0x01,
|
|
|
- 0x00,
|
|
|
+ 0x01, 0x00 + T1, 0x80 + T2, 0x40 + T3, 0x00 + T4, 0x01, 0x00,
|
|
|
+ 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, // gnd phase
|
|
|
};
|
|
|
|
|
|
const unsigned char GxEPD2_420_SE0420NQ04::lut_22_bw_partial[] PROGMEM =
|
|
|
-{
|
|
|
+{
|
|
|
// LUT format of UC8176
|
|
|
// 10 w
|
|
|
// 0x5A, T1, T2, T3, T4, 1, // 01 01 10 10
|
|
|
@@ -524,23 +460,12 @@ const unsigned char GxEPD2_420_SE0420NQ04::lut_22_bw_partial[] PROGMEM =
|
|
|
//
|
|
|
// LUT format of UC8276
|
|
|
// 00b : 0V, 01b : VSH, 10b : VSL, 11b : VDHR
|
|
|
- 0x01, // Group Repeat Times
|
|
|
- 0x80 + T1,
|
|
|
- 0x80 + T2,
|
|
|
- 0x40 + T3,
|
|
|
- 0x40 + T4,
|
|
|
- 0x01, // State 1 repeat times
|
|
|
- 0x00, // State 2 repeat times
|
|
|
- 0x00 + 1, // gnd phase
|
|
|
- 0x00,
|
|
|
- 0x00,
|
|
|
- 0x00,
|
|
|
- 0x01,
|
|
|
- 0x00,
|
|
|
+ 0x01, 0x80 + T1, 0x80 + T2, 0x40 + T3, 0x40 + T4, 0x01, 0x00,
|
|
|
+ 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, // gnd phase
|
|
|
};
|
|
|
|
|
|
const unsigned char GxEPD2_420_SE0420NQ04::lut_23_wb_partial[] PROGMEM =
|
|
|
-{
|
|
|
+{
|
|
|
// LUT format of UC8176
|
|
|
// 01 b
|
|
|
// 0xA5, T1, T2, T3, T4, 1, // 10 10 01 01
|
|
|
@@ -548,23 +473,12 @@ const unsigned char GxEPD2_420_SE0420NQ04::lut_23_wb_partial[] PROGMEM =
|
|
|
//
|
|
|
// LUT format of UC8276
|
|
|
// 00b : 0V, 01b : VSH, 10b : VSL, 11b : VDHR
|
|
|
- 0x01, // Group Repeat Times
|
|
|
- 0x40 + T1,
|
|
|
- 0x40 + T2,
|
|
|
- 0x80 + T3,
|
|
|
- 0x80 + T4,
|
|
|
- 0x01, // State 1 repeat times
|
|
|
- 0x00, // State 2 repeat times
|
|
|
- 0x00 + 1, // gnd phase
|
|
|
- 0x00,
|
|
|
- 0x00,
|
|
|
- 0x00,
|
|
|
- 0x01,
|
|
|
- 0x00,
|
|
|
+ 0x01, 0x40 + T1, 0x40 + T2, 0x80 + T3, 0x80 + T4, 0x01, 0x00,
|
|
|
+ 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, // gnd phase
|
|
|
};
|
|
|
|
|
|
const unsigned char GxEPD2_420_SE0420NQ04::lut_24_bb_partial[] PROGMEM =
|
|
|
-{
|
|
|
+{
|
|
|
// LUT format of UC8176
|
|
|
// 01 b
|
|
|
// 0x24, T1, T2, T3, T4, 1, // 00 10 01 00
|
|
|
@@ -572,36 +486,28 @@ const unsigned char GxEPD2_420_SE0420NQ04::lut_24_bb_partial[] PROGMEM =
|
|
|
//
|
|
|
// LUT format of UC8276
|
|
|
// 00b : 0V, 01b : VSH, 10b : VSL, 11b : VDHR
|
|
|
- 0x01, // Group Repeat Times
|
|
|
- 0x00 + T1,
|
|
|
- 0x40 + T2,
|
|
|
- 0x80 + T3,
|
|
|
- 0x00 + T4,
|
|
|
- 0x01, // State 1 repeat times
|
|
|
- 0x00, // State 2 repeat times
|
|
|
- 0x00 + 1, // gnd phase
|
|
|
- 0x00,
|
|
|
- 0x00,
|
|
|
- 0x00,
|
|
|
- 0x01,
|
|
|
- 0x00,
|
|
|
+ 0x01, 0x00 + T1, 0x40 + T2, 0x80 + T3, 0x00 + T4, 0x01, 0x00, // State 2 repeat times
|
|
|
+ 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, // gnd phase
|
|
|
};
|
|
|
|
|
|
-#endif
|
|
|
-
|
|
|
void GxEPD2_420_SE0420NQ04::_Init_Full()
|
|
|
{
|
|
|
+ // Serial.print("sizeof(lut_20_vcom0_full) "); Serial.println(sizeof(lut_20_vcom0_full));
|
|
|
+ // Serial.print("sizeof(lut_21_ww_full) "); Serial.println(sizeof(lut_21_ww_full));
|
|
|
+ // Serial.print("sizeof(lut_22_bw_full) "); Serial.println(sizeof(lut_22_bw_full));
|
|
|
+ // Serial.print("sizeof(lut_23_wb_full) "); Serial.println(sizeof(lut_23_wb_full));
|
|
|
+ // Serial.print("sizeof(lut_24_bb_full) "); Serial.println(sizeof(lut_24_bb_full));
|
|
|
_InitDisplay();
|
|
|
_writeCommand(0x20);
|
|
|
- _writeDataPGM(lut_20_vcom0_full, sizeof(lut_20_vcom0_full));
|
|
|
+ _writeDataPGM(lut_20_vcom0_full, sizeof(lut_20_vcom0_full), 56 - sizeof(lut_20_vcom0_full));
|
|
|
_writeCommand(0x21);
|
|
|
- _writeDataPGM(lut_21_ww_full, sizeof(lut_21_ww_full));
|
|
|
+ _writeDataPGM(lut_21_ww_full, sizeof(lut_21_ww_full), 42 - sizeof(lut_21_ww_full));
|
|
|
_writeCommand(0x22);
|
|
|
- _writeDataPGM(lut_22_bw_full, sizeof(lut_22_bw_full));
|
|
|
+ _writeDataPGM(lut_22_bw_full, sizeof(lut_22_bw_full), 56 - sizeof(lut_22_bw_full));
|
|
|
_writeCommand(0x23);
|
|
|
- _writeDataPGM(lut_23_wb_full, sizeof(lut_23_wb_full));
|
|
|
+ _writeDataPGM(lut_23_wb_full, sizeof(lut_23_wb_full), 56 - sizeof(lut_23_wb_full));
|
|
|
_writeCommand(0x24);
|
|
|
- _writeDataPGM(lut_24_bb_full, sizeof(lut_24_bb_full));
|
|
|
+ _writeDataPGM(lut_24_bb_full, sizeof(lut_24_bb_full), 56 - sizeof(lut_24_bb_full));
|
|
|
_PowerOn();
|
|
|
_using_partial_mode = false;
|
|
|
}
|
|
|
@@ -610,17 +516,17 @@ void GxEPD2_420_SE0420NQ04::_Init_Part()
|
|
|
{
|
|
|
_InitDisplay();
|
|
|
_writeCommand(0x20);
|
|
|
- _writeDataPGM(lut_20_vcom0_partial, sizeof(lut_20_vcom0_partial), 57 - sizeof(lut_20_vcom0_partial));
|
|
|
+ _writeDataPGM(lut_20_vcom0_partial, sizeof(lut_20_vcom0_partial), 56 - sizeof(lut_20_vcom0_partial));
|
|
|
_writeCommand(0x21);
|
|
|
- _writeDataPGM(lut_21_ww_partial, sizeof(lut_21_ww_partial), 43 - sizeof(lut_21_ww_partial));
|
|
|
+ _writeDataPGM(lut_21_ww_partial, sizeof(lut_21_ww_partial), 42 - sizeof(lut_21_ww_partial));
|
|
|
_writeCommand(0x22);
|
|
|
- _writeDataPGM(lut_22_bw_partial, sizeof(lut_22_bw_partial), 57 - sizeof(lut_22_bw_partial));
|
|
|
+ _writeDataPGM(lut_22_bw_partial, sizeof(lut_22_bw_partial), 56 - sizeof(lut_22_bw_partial));
|
|
|
_writeCommand(0x23);
|
|
|
- _writeDataPGM(lut_23_wb_partial, sizeof(lut_23_wb_partial), 57 - sizeof(lut_23_wb_partial));
|
|
|
+ _writeDataPGM(lut_23_wb_partial, sizeof(lut_23_wb_partial), 56 - sizeof(lut_23_wb_partial));
|
|
|
_writeCommand(0x24);
|
|
|
- _writeDataPGM(lut_24_bb_partial, sizeof(lut_24_bb_partial), 57 - sizeof(lut_24_bb_partial));
|
|
|
+ _writeDataPGM(lut_24_bb_partial, sizeof(lut_24_bb_partial), 56 - sizeof(lut_24_bb_partial));
|
|
|
_writeCommand (0x50); // Border
|
|
|
- _writeData(0xf7); //
|
|
|
+ _writeData(0x37); // floating
|
|
|
_PowerOn();
|
|
|
_using_partial_mode = true;
|
|
|
}
|