Explorar o código

Version 1.6.7

- added support for GDEW075Z08 fast b/w refresh in new class GxEPD2_750c_GDEW075Z08
- GxEPD2_750c_GDEW075Z08 uses a b/w waveform written to registers, none available in OTP
- added support for GDEY075Z08 fast b/w refresh in new class GxEPD2_750c_GDEY075Z08
- GxEPD2_750c_GDEY075Z08 uses a b/w waveform written to registers, OTP version is faulty
- GDEW075Z08 and GDEY075Z08 both have distortion on borders between black and white
- therefore narrow or small fonts are barely readable with fast b/w refresh
- renamed method writeImagePrevious to writeImageToPrevious
- renamed method writeImageNew to writeImageToCurrent
ZinggJM hai 9 meses
pai
achega
a0e3384c19

+ 1 - 1
extras/tests/GxEPD2_FastBlackWhiteOnColorRefreshTests/GxEPD2_FastBlackWhiteOnColorRefreshTests.ino

@@ -15,7 +15,7 @@
 //#define USE_HSPI_FOR_EPD
 //#define USE_HSPI_FOR_EPD
 
 
 // uncomment next line to use class GFX of library GFX_Root instead of Adafruit_GFX
 // uncomment next line to use class GFX of library GFX_Root instead of Adafruit_GFX
-#include <GFX.h>
+//#include <GFX.h>
 // Note: if you use this with ENABLE_GxEPD2_GFX 1:
 // Note: if you use this with ENABLE_GxEPD2_GFX 1:
 //       uncomment it in GxEPD2_GFX.h too, or add #include <GFX.h> before any #include <GxEPD2_GFX.h>
 //       uncomment it in GxEPD2_GFX.h too, or add #include <GFX.h> before any #include <GxEPD2_GFX.h>
 
 

+ 1 - 1
extras/tests/GxEPD2_RefreshTests/GxEPD2_RefreshTests.ino

@@ -15,7 +15,7 @@
 //#define USE_HSPI_FOR_EPD
 //#define USE_HSPI_FOR_EPD
 
 
 // uncomment next line to use class GFX of library GFX_Root instead of Adafruit_GFX
 // uncomment next line to use class GFX of library GFX_Root instead of Adafruit_GFX
-#include <GFX.h>
+//#include <GFX.h>
 // Note: if you use this with ENABLE_GxEPD2_GFX 1:
 // Note: if you use this with ENABLE_GxEPD2_GFX 1:
 //       uncomment it in GxEPD2_GFX.h too, or add #include <GFX.h> before any #include <GxEPD2_GFX.h>
 //       uncomment it in GxEPD2_GFX.h too, or add #include <GFX.h> before any #include <GxEPD2_GFX.h>
 
 

+ 5 - 5
src/epd3c/GxEPD2_750c_GDEW075Z08.cpp

@@ -58,7 +58,7 @@ void GxEPD2_750c_GDEW075Z08::_writeScreenBuffer(uint8_t command, uint8_t value)
 
 
 void GxEPD2_750c_GDEW075Z08::writeImage(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_750c_GDEW075Z08::writeImage(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
 {
 {
-  _writeScreenBuffer(0x13, 0x00); // set red/white
+  _writeScreenBuffer(0x13, 0xFF); // set red/white
   _writeImage(0x10, bitmap, x, y, w, h, invert, mirror_y, pgm);
   _writeImage(0x10, bitmap, x, y, w, h, invert, mirror_y, pgm);
 }
 }
 
 
@@ -196,16 +196,16 @@ void GxEPD2_750c_GDEW075Z08::writeImagePart(const uint8_t* black, const uint8_t*
   if (color) _writeImagePart(0x13, color, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
   if (color) _writeImagePart(0x13, color, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
 }
 }
 
 
-void GxEPD2_750c_GDEW075Z08::writeImagePartToPrevious(const uint8_t* black, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
+void GxEPD2_750c_GDEW075Z08::writeImagePartToPrevious(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, black, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
+  _writeImagePart(0x13, bitmap, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
 }
 }
 
 
-void GxEPD2_750c_GDEW075Z08::writeImagePartToCurrent(const uint8_t* black, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
+void GxEPD2_750c_GDEW075Z08::writeImagePartToCurrent(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(0x24, black, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
+  _writeImagePart(0x10, bitmap, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
 }
 }
 
 
 void GxEPD2_750c_GDEW075Z08::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)
 void GxEPD2_750c_GDEW075Z08::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)

+ 2 - 2
src/epd3c/GxEPD2_750c_GDEW075Z08.h

@@ -50,9 +50,9 @@ class GxEPD2_750c_GDEW075Z08 : public GxEPD2_EPD
     void writeImageToCurrent(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 writeImageToCurrent(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* black, const uint8_t* color, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
     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);
                         int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false);
-    void writeImagePartToPrevious(const uint8_t* black, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
+    void writeImagePartToPrevious(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);
                                 int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false);
-    void writeImagePartToCurrent(const uint8_t* black, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
+    void writeImagePartToCurrent(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);
                            int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false);
     // write sprite of native data to controller memory, without screen refresh; x and w should be multiple of 8
     // write sprite of native data to controller memory, without screen refresh; x and w should be multiple of 8
     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 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);

+ 5 - 5
src/gdey3c/GxEPD2_750c_GDEY075Z08.cpp

@@ -64,7 +64,7 @@ void GxEPD2_750c_GDEY075Z08::_writeScreenBuffer(uint8_t command, uint8_t value)
 
 
 void GxEPD2_750c_GDEY075Z08::writeImage(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_750c_GDEY075Z08::writeImage(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm)
 {
 {
-  _writeScreenBuffer(0x13, 0x00); // set red/white
+  _writeScreenBuffer(0x13, 0xFF); // set red/white
   _writeImage(0x10, bitmap, x, y, w, h, invert, mirror_y, pgm);
   _writeImage(0x10, bitmap, x, y, w, h, invert, mirror_y, pgm);
 }
 }
 
 
@@ -202,16 +202,16 @@ void GxEPD2_750c_GDEY075Z08::writeImagePart(const uint8_t* black, const uint8_t*
   if (color) _writeImagePart(0x13, color, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
   if (color) _writeImagePart(0x13, color, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
 }
 }
 
 
-void GxEPD2_750c_GDEY075Z08::writeImagePartToPrevious(const uint8_t* black, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
+void GxEPD2_750c_GDEY075Z08::writeImagePartToPrevious(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, black, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
+  _writeImagePart(0x13, bitmap, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
 }
 }
 
 
-void GxEPD2_750c_GDEY075Z08::writeImagePartToCurrent(const uint8_t* black, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
+void GxEPD2_750c_GDEY075Z08::writeImagePartToCurrent(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(0x24, black, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
+  _writeImagePart(0x10, bitmap, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm);
 }
 }
 
 
 void GxEPD2_750c_GDEY075Z08::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)
 void GxEPD2_750c_GDEY075Z08::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)

+ 2 - 2
src/gdey3c/GxEPD2_750c_GDEY075Z08.h

@@ -52,9 +52,9 @@ class GxEPD2_750c_GDEY075Z08 : public GxEPD2_EPD
     void writeImageToCurrent(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 writeImageToCurrent(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* black, const uint8_t* color, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
     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);
                         int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false);
-    void writeImagePartToPrevious(const uint8_t* black, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
+    void writeImagePartToPrevious(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);
                                 int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false);
-    void writeImagePartToCurrent(const uint8_t* black, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap,
+    void writeImagePartToCurrent(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);
                            int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false);
     // write sprite of native data to controller memory, without screen refresh; x and w should be multiple of 8
     // write sprite of native data to controller memory, without screen refresh; x and w should be multiple of 8
     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 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);