Explorar el Código

Version 1.4.4

- interim update to solve compiler warnings (ALL for GCC for AVR)
ZinggJM hace 4 años
padre
commit
0e6970f9ba
Se han modificado 29 ficheros con 251 adiciones y 59 borrados
  1. 3 1
      README.md
  2. 1 1
      examples/GxEPD2_Example/GxEPD2_Example.ino
  3. 8 1
      examples/GxEPD2_Example/GxEPD2_display_selection.h
  4. 12 0
      examples/GxEPD2_Example/GxEPD2_display_selection_added.h
  5. 12 0
      examples/GxEPD2_Example/GxEPD2_display_selection_new_style.h
  6. 8 1
      examples/GxEPD2_GFX_Example/GxEPD2_display_selection.h
  7. 12 0
      examples/GxEPD2_GFX_Example/GxEPD2_display_selection_added.h
  8. 12 0
      examples/GxEPD2_GFX_Example/GxEPD2_display_selection_new_style.h
  9. 8 1
      examples/GxEPD2_HelloWorld/GxEPD2_display_selection.h
  10. 12 0
      examples/GxEPD2_HelloWorld/GxEPD2_display_selection_added.h
  11. 12 0
      examples/GxEPD2_HelloWorld/GxEPD2_display_selection_new_style.h
  12. 12 0
      examples/GxEPD2_MinimumExample/GxEPD2_display_selection_new_style.h
  13. 12 0
      examples/GxEPD2_NotPagedExample/GxEPD2_display_selection_new_style.h
  14. 12 0
      examples/GxEPD2_PagedDisplayUsingCallback/GxEPD2_display_selection_new_style.h
  15. 12 0
      examples/GxEPD2_RotaryUsingBusyCallback/GxEPD2_display_selection_new_style.h
  16. 12 0
      examples/GxEPD2_SD_Example/GxEPD2_display_selection_new_style.h
  17. 12 0
      examples/GxEPD2_SerialFlash_Example/GxEPD2_display_selection_new_style.h
  18. 12 0
      examples/GxEPD2_Spiffs_Example/GxEPD2_display_selection_new_style.h
  19. 12 0
      examples/GxEPD2_U8G2_Fonts_Example/GxEPD2_display_selection_new_style.h
  20. 1 1
      library.properties
  21. 5 5
      src/GxEPD2_3C.h
  22. 5 5
      src/GxEPD2_7C.h
  23. 5 5
      src/GxEPD2_BW.h
  24. 1 0
      src/GxEPD2_EPD.h
  25. 14 14
      src/epd3c/GxEPD2_154c.cpp
  26. 15 15
      src/epd3c/GxEPD2_565c.cpp
  27. 3 3
      src/it8951/GxEPD2_it60.cpp
  28. 3 3
      src/it8951/GxEPD2_it60_1448x1072.cpp
  29. 3 3
      src/it8951/GxEPD2_it78_1872x1404.cpp

+ 3 - 1
README.md

@@ -108,7 +108,9 @@
 - promotion panels from suppliers are welcome, to add support to GxEPD2
 - donation panels from users are welcome, to add support to GxEPD2
 
-### Version 1.4.3
+### Version 1.4.4
+- interim update to solve compiler warnings (ALL for GCC for AVR)
+#### Version 1.4.3
 - added option to select an alternate HW SPI channel and/or SPI settings
 - by method selectSPI(SPIClass& spi, SPISettings spi_settings) of driver base class GxEPD2_EPD
 - by calling selectSPI before calling init() of display class

+ 1 - 1
examples/GxEPD2_Example/GxEPD2_Example.ino

@@ -1591,7 +1591,7 @@ void draw7colorlines()
       display.fillRect(0, y, display.width(), h, GxEPD_ORANGE); y += h;
       display.fillRect(0, y, display.width(), h, GxEPD_WHITE); y += h;
     }
-    while ((y + 12 * h) < display.height());
+    while ((y + 12 * h) < uint16_t(display.height()));
     //display.drawPixel(0, y, GxEPD_BLACK); display.drawPixel(10, y, GxEPD_GREEN);
     //display.drawPixel(20, y, GxEPD_BLUE); display.drawPixel(30, y, GxEPD_RED);
     //display.drawPixel(40, y, GxEPD_YELLOW); display.drawPixel(50, y, GxEPD_ORANGE);

+ 8 - 1
examples/GxEPD2_Example/GxEPD2_display_selection.h

@@ -253,6 +253,10 @@
 // 7-color e-paper
 #define MAX_HEIGHT_7C(EPD) (EPD::HEIGHT <= (MAX_DISPLAY_BUFFER_SIZE) / (EPD::WIDTH / 2) ? EPD::HEIGHT : (MAX_DISPLAY_BUFFER_SIZE) / (EPD::WIDTH / 2)) // 2 pixel per byte
 //GxEPD2_7C<GxEPD2_565c, MAX_HEIGHT_7C(GxEPD2_565c)> display(GxEPD2_565c(/*CS=PA4*/ SS, /*DC=*/ PA3, /*RST=*/ PA2, /*BUSY=*/ PA1)); // Waveshare 5.65" 7-color
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
+#undef MAX_HEIGHT_3C
+#undef MAX_HEIGHT_7C
 #endif
 
 #if defined(__AVR)
@@ -353,7 +357,6 @@
 //GxEPD2_BW<GxEPD2_750_T7, MAX_HEIGHT(GxEPD2_750_T7)> display(GxEPD2_750_T7(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEW075T7 800x480
 //GxEPD2_BW < GxEPD2_1160_T91, MAX_HEIGHT(GxEPD2_1160_T91)> display(GxEPD2_1160_T91(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEH116T91 960x640
 // 3-color e-papers
-#define MAX_HEIGHT_3C(EPD) (EPD::HEIGHT <= (MAX_DISPLAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8) ? EPD::HEIGHT : (MAX_DISPLAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8))
 //GxEPD2_3C<GxEPD2_154c, MAX_HEIGHT_3C(GxEPD2_154c)> display(GxEPD2_154c(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEW0154Z04 no longer available
 //GxEPD2_3C<GxEPD2_154_Z90c, MAX_HEIGHT_3C(GxEPD2_154_Z90c)> display(GxEPD2_154_Z90c(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEH0154Z90
 //GxEPD2_3C<GxEPD2_213c, MAX_HEIGHT_3C(GxEPD2_213c)> display(GxEPD2_213c(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEW0213Z16
@@ -376,4 +379,8 @@
 //GxEPD2_BW < GxEPD2_1248, MAX_HEIGHT(GxEPD2_1248)>
 //display(GxEPD2_1248(/*cs_m1=*/ 2, /*cs_s1=*/ 3, /*cs_m2=*/ A4, /*cs_s2=*/ A0, /*dc1=*/ 6, /*dc2=*/ A3, /*rst1=*/ 5, /*rst2=*/ A2,
 //                               /*busy_m1=*/ 4, /*busy_s1=*/ 7, /*busy_m2=*/ A1, /*busy_s2=*/ A5));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
+#undef MAX_HEIGHT_3C
+#undef MAX_HEIGHT_7C
 #endif

+ 12 - 0
examples/GxEPD2_Example/GxEPD2_display_selection_added.h

@@ -78,6 +78,10 @@
 //GxEPD2_BW<GxEPD2_it60, MAX_HEIGHT(GxEPD2_it60)> display(GxEPD2_it60(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
 //GxEPD2_BW<GxEPD2_it60_1448x1072, MAX_HEIGHT(GxEPD2_it60_1448x1072)> display(GxEPD2_it60_1448x1072(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
 //GxEPD2_BW<GxEPD2_it78_1872x1404, MAX_HEIGHT(GxEPD2_it78_1872x1404)> display(GxEPD2_it78_1872x1404(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
+#undef MAX_HEIGHT_3C
+#undef MAX_HEIGHT_7C
 #endif
 
 // Arduino MKR1000 or MKRZERO
@@ -146,6 +150,10 @@
 //GxEPD2_BW<GxEPD2_it60, MAX_HEIGHT(GxEPD2_it60)> display(GxEPD2_it60(/*CS=*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5));
 //GxEPD2_BW<GxEPD2_it60_1448x1072, MAX_HEIGHT(GxEPD2_it60_1448x1072)> display(GxEPD2_it60_1448x1072(/*CS=*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5));
 //GxEPD2_BW<GxEPD2_it78_1872x1404, MAX_HEIGHT(GxEPD2_it78_1872x1404)> display(GxEPD2_it78_1872x1404(/*CS=*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
+#undef MAX_HEIGHT_3C
+#undef MAX_HEIGHT_7C
 #endif
 
 // mapping suggestion for ESP32, e.g. LOLIN32 D32 PRO
@@ -386,6 +394,10 @@
 // 7-color e-paper
 #define MAX_HEIGHT_7C(EPD) (EPD::HEIGHT <= (MAX_DISPLAY_BUFFER_SIZE) / (EPD::WIDTH / 2) ? EPD::HEIGHT : (MAX_DISPLAY_BUFFER_SIZE) / (EPD::WIDTH / 2)) // 2 pixel per byte
 //GxEPD2_7C<GxEPD2_565c, MAX_HEIGHT_7C(GxEPD2_565c)> display(GxEPD2_565c(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // Waveshare 5.65" 7-color
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
+#undef MAX_HEIGHT_3C
+#undef MAX_HEIGHT_7C
 #endif
 
 #endif

+ 12 - 0
examples/GxEPD2_Example/GxEPD2_display_selection_new_style.h

@@ -109,6 +109,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=15*/ EPD_CS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5));
 // mapping of Waveshare e-Paper ESP8266 Driver Board, old version
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=15*/ EPD_CS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ESP32)
@@ -137,6 +139,8 @@ GxEPD2_BW < GxEPD2_1248, GxEPD2_1248::HEIGHT / 4 > display(GxEPD2_1248(/*sck=*/
     /*dc1=*/ 25, /*dc2=*/ 17, /*rst1=*/ 33, /*rst2=*/ 5,
     /*busy_m1=*/ 32, /*busy_s1=*/ 26, /*busy_m2=*/ 18, /*busy_s2=*/ 4));
 #endif
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 // can't use package "STMF1 Boards (STM32Duino.com)" (Roger Clark) anymore with Adafruit_GFX, use "STM32 Boards (selected from submenu)" (STMicroelectronics)
@@ -151,6 +155,8 @@ GxEPD2_BW < GxEPD2_1248, GxEPD2_1248::HEIGHT / 4 > display(GxEPD2_1248(/*sck=*/
 #endif
 // adapt the constructor parameters to your wiring
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=PA4*/ EPD_CS, /*DC=*/ PA3, /*RST=*/ PA2, /*BUSY=*/ PA1));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(__AVR)
@@ -181,6 +187,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 #endif
 // adapt the constructor parameters to your wiring
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=10*/ EPD_CS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ARDUINO_ARCH_SAMD)
@@ -196,6 +204,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5));
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // my Seed XIOA0
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // my other Seed XIOA0
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ARDUINO_ARCH_RP2040)
@@ -218,6 +228,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // DESPI-PICO
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ 3, /*DC=*/ 2, /*RST=*/ 11, /*BUSY=*/ 10)); // DESPI-PICO modified
 #endif
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #endif

+ 8 - 1
examples/GxEPD2_GFX_Example/GxEPD2_display_selection.h

@@ -253,6 +253,10 @@
 // 7-color e-paper
 #define MAX_HEIGHT_7C(EPD) (EPD::HEIGHT <= (MAX_DISPLAY_BUFFER_SIZE) / (EPD::WIDTH / 2) ? EPD::HEIGHT : (MAX_DISPLAY_BUFFER_SIZE) / (EPD::WIDTH / 2)) // 2 pixel per byte
 //GxEPD2_7C<GxEPD2_565c, MAX_HEIGHT_7C(GxEPD2_565c)> display(GxEPD2_565c(/*CS=PA4*/ SS, /*DC=*/ PA3, /*RST=*/ PA2, /*BUSY=*/ PA1)); // Waveshare 5.65" 7-color
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
+#undef MAX_HEIGHT_3C
+#undef MAX_HEIGHT_7C
 #endif
 
 #if defined(__AVR)
@@ -353,7 +357,6 @@
 //GxEPD2_BW<GxEPD2_750_T7, MAX_HEIGHT(GxEPD2_750_T7)> display(GxEPD2_750_T7(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEW075T7 800x480
 //GxEPD2_BW < GxEPD2_1160_T91, MAX_HEIGHT(GxEPD2_1160_T91)> display(GxEPD2_1160_T91(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEH116T91 960x640
 // 3-color e-papers
-#define MAX_HEIGHT_3C(EPD) (EPD::HEIGHT <= (MAX_DISPLAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8) ? EPD::HEIGHT : (MAX_DISPLAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8))
 //GxEPD2_3C<GxEPD2_154c, MAX_HEIGHT_3C(GxEPD2_154c)> display(GxEPD2_154c(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEW0154Z04 no longer available
 //GxEPD2_3C<GxEPD2_154_Z90c, MAX_HEIGHT_3C(GxEPD2_154_Z90c)> display(GxEPD2_154_Z90c(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEH0154Z90
 //GxEPD2_3C<GxEPD2_213c, MAX_HEIGHT_3C(GxEPD2_213c)> display(GxEPD2_213c(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEW0213Z16
@@ -376,4 +379,8 @@
 //GxEPD2_BW < GxEPD2_1248, MAX_HEIGHT(GxEPD2_1248)>
 //display(GxEPD2_1248(/*cs_m1=*/ 2, /*cs_s1=*/ 3, /*cs_m2=*/ A4, /*cs_s2=*/ A0, /*dc1=*/ 6, /*dc2=*/ A3, /*rst1=*/ 5, /*rst2=*/ A2,
 //                               /*busy_m1=*/ 4, /*busy_s1=*/ 7, /*busy_m2=*/ A1, /*busy_s2=*/ A5));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
+#undef MAX_HEIGHT_3C
+#undef MAX_HEIGHT_7C
 #endif

+ 12 - 0
examples/GxEPD2_GFX_Example/GxEPD2_display_selection_added.h

@@ -78,6 +78,10 @@
 //GxEPD2_BW<GxEPD2_it60, MAX_HEIGHT(GxEPD2_it60)> display(GxEPD2_it60(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
 //GxEPD2_BW<GxEPD2_it60_1448x1072, MAX_HEIGHT(GxEPD2_it60_1448x1072)> display(GxEPD2_it60_1448x1072(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
 //GxEPD2_BW<GxEPD2_it78_1872x1404, MAX_HEIGHT(GxEPD2_it78_1872x1404)> display(GxEPD2_it78_1872x1404(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
+#undef MAX_HEIGHT_3C
+#undef MAX_HEIGHT_7C
 #endif
 
 // Arduino MKR1000 or MKRZERO
@@ -146,6 +150,10 @@
 //GxEPD2_BW<GxEPD2_it60, MAX_HEIGHT(GxEPD2_it60)> display(GxEPD2_it60(/*CS=*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5));
 //GxEPD2_BW<GxEPD2_it60_1448x1072, MAX_HEIGHT(GxEPD2_it60_1448x1072)> display(GxEPD2_it60_1448x1072(/*CS=*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5));
 //GxEPD2_BW<GxEPD2_it78_1872x1404, MAX_HEIGHT(GxEPD2_it78_1872x1404)> display(GxEPD2_it78_1872x1404(/*CS=*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
+#undef MAX_HEIGHT_3C
+#undef MAX_HEIGHT_7C
 #endif
 
 // mapping suggestion for ESP32, e.g. LOLIN32 D32 PRO
@@ -386,6 +394,10 @@
 // 7-color e-paper
 #define MAX_HEIGHT_7C(EPD) (EPD::HEIGHT <= (MAX_DISPLAY_BUFFER_SIZE) / (EPD::WIDTH / 2) ? EPD::HEIGHT : (MAX_DISPLAY_BUFFER_SIZE) / (EPD::WIDTH / 2)) // 2 pixel per byte
 //GxEPD2_7C<GxEPD2_565c, MAX_HEIGHT_7C(GxEPD2_565c)> display(GxEPD2_565c(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // Waveshare 5.65" 7-color
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
+#undef MAX_HEIGHT_3C
+#undef MAX_HEIGHT_7C
 #endif
 
 #endif

+ 12 - 0
examples/GxEPD2_GFX_Example/GxEPD2_display_selection_new_style.h

@@ -109,6 +109,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=15*/ EPD_CS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5));
 // mapping of Waveshare e-Paper ESP8266 Driver Board, old version
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=15*/ EPD_CS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ESP32)
@@ -137,6 +139,8 @@ GxEPD2_BW < GxEPD2_1248, GxEPD2_1248::HEIGHT / 4 > display(GxEPD2_1248(/*sck=*/
     /*dc1=*/ 25, /*dc2=*/ 17, /*rst1=*/ 33, /*rst2=*/ 5,
     /*busy_m1=*/ 32, /*busy_s1=*/ 26, /*busy_m2=*/ 18, /*busy_s2=*/ 4));
 #endif
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 // can't use package "STMF1 Boards (STM32Duino.com)" (Roger Clark) anymore with Adafruit_GFX, use "STM32 Boards (selected from submenu)" (STMicroelectronics)
@@ -151,6 +155,8 @@ GxEPD2_BW < GxEPD2_1248, GxEPD2_1248::HEIGHT / 4 > display(GxEPD2_1248(/*sck=*/
 #endif
 // adapt the constructor parameters to your wiring
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=PA4*/ EPD_CS, /*DC=*/ PA3, /*RST=*/ PA2, /*BUSY=*/ PA1));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(__AVR)
@@ -181,6 +187,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 #endif
 // adapt the constructor parameters to your wiring
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=10*/ EPD_CS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ARDUINO_ARCH_SAMD)
@@ -196,6 +204,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5));
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // my Seed XIOA0
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // my other Seed XIOA0
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ARDUINO_ARCH_RP2040)
@@ -218,6 +228,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // DESPI-PICO
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ 3, /*DC=*/ 2, /*RST=*/ 11, /*BUSY=*/ 10)); // DESPI-PICO modified
 #endif
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #endif

+ 8 - 1
examples/GxEPD2_HelloWorld/GxEPD2_display_selection.h

@@ -253,6 +253,10 @@
 // 7-color e-paper
 #define MAX_HEIGHT_7C(EPD) (EPD::HEIGHT <= (MAX_DISPLAY_BUFFER_SIZE) / (EPD::WIDTH / 2) ? EPD::HEIGHT : (MAX_DISPLAY_BUFFER_SIZE) / (EPD::WIDTH / 2)) // 2 pixel per byte
 //GxEPD2_7C<GxEPD2_565c, MAX_HEIGHT_7C(GxEPD2_565c)> display(GxEPD2_565c(/*CS=PA4*/ SS, /*DC=*/ PA3, /*RST=*/ PA2, /*BUSY=*/ PA1)); // Waveshare 5.65" 7-color
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
+#undef MAX_HEIGHT_3C
+#undef MAX_HEIGHT_7C
 #endif
 
 #if defined(__AVR)
@@ -353,7 +357,6 @@
 //GxEPD2_BW<GxEPD2_750_T7, MAX_HEIGHT(GxEPD2_750_T7)> display(GxEPD2_750_T7(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEW075T7 800x480
 //GxEPD2_BW < GxEPD2_1160_T91, MAX_HEIGHT(GxEPD2_1160_T91)> display(GxEPD2_1160_T91(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEH116T91 960x640
 // 3-color e-papers
-#define MAX_HEIGHT_3C(EPD) (EPD::HEIGHT <= (MAX_DISPLAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8) ? EPD::HEIGHT : (MAX_DISPLAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8))
 //GxEPD2_3C<GxEPD2_154c, MAX_HEIGHT_3C(GxEPD2_154c)> display(GxEPD2_154c(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEW0154Z04 no longer available
 //GxEPD2_3C<GxEPD2_154_Z90c, MAX_HEIGHT_3C(GxEPD2_154_Z90c)> display(GxEPD2_154_Z90c(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEH0154Z90
 //GxEPD2_3C<GxEPD2_213c, MAX_HEIGHT_3C(GxEPD2_213c)> display(GxEPD2_213c(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEW0213Z16
@@ -376,4 +379,8 @@
 //GxEPD2_BW < GxEPD2_1248, MAX_HEIGHT(GxEPD2_1248)>
 //display(GxEPD2_1248(/*cs_m1=*/ 2, /*cs_s1=*/ 3, /*cs_m2=*/ A4, /*cs_s2=*/ A0, /*dc1=*/ 6, /*dc2=*/ A3, /*rst1=*/ 5, /*rst2=*/ A2,
 //                               /*busy_m1=*/ 4, /*busy_s1=*/ 7, /*busy_m2=*/ A1, /*busy_s2=*/ A5));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
+#undef MAX_HEIGHT_3C
+#undef MAX_HEIGHT_7C
 #endif

+ 12 - 0
examples/GxEPD2_HelloWorld/GxEPD2_display_selection_added.h

@@ -78,6 +78,10 @@
 //GxEPD2_BW<GxEPD2_it60, MAX_HEIGHT(GxEPD2_it60)> display(GxEPD2_it60(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
 //GxEPD2_BW<GxEPD2_it60_1448x1072, MAX_HEIGHT(GxEPD2_it60_1448x1072)> display(GxEPD2_it60_1448x1072(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
 //GxEPD2_BW<GxEPD2_it78_1872x1404, MAX_HEIGHT(GxEPD2_it78_1872x1404)> display(GxEPD2_it78_1872x1404(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
+#undef MAX_HEIGHT_3C
+#undef MAX_HEIGHT_7C
 #endif
 
 // Arduino MKR1000 or MKRZERO
@@ -146,6 +150,10 @@
 //GxEPD2_BW<GxEPD2_it60, MAX_HEIGHT(GxEPD2_it60)> display(GxEPD2_it60(/*CS=*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5));
 //GxEPD2_BW<GxEPD2_it60_1448x1072, MAX_HEIGHT(GxEPD2_it60_1448x1072)> display(GxEPD2_it60_1448x1072(/*CS=*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5));
 //GxEPD2_BW<GxEPD2_it78_1872x1404, MAX_HEIGHT(GxEPD2_it78_1872x1404)> display(GxEPD2_it78_1872x1404(/*CS=*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
+#undef MAX_HEIGHT_3C
+#undef MAX_HEIGHT_7C
 #endif
 
 // mapping suggestion for ESP32, e.g. LOLIN32 D32 PRO
@@ -386,6 +394,10 @@
 // 7-color e-paper
 #define MAX_HEIGHT_7C(EPD) (EPD::HEIGHT <= (MAX_DISPLAY_BUFFER_SIZE) / (EPD::WIDTH / 2) ? EPD::HEIGHT : (MAX_DISPLAY_BUFFER_SIZE) / (EPD::WIDTH / 2)) // 2 pixel per byte
 //GxEPD2_7C<GxEPD2_565c, MAX_HEIGHT_7C(GxEPD2_565c)> display(GxEPD2_565c(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // Waveshare 5.65" 7-color
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
+#undef MAX_HEIGHT_3C
+#undef MAX_HEIGHT_7C
 #endif
 
 #endif

+ 12 - 0
examples/GxEPD2_HelloWorld/GxEPD2_display_selection_new_style.h

@@ -109,6 +109,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=15*/ EPD_CS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5));
 // mapping of Waveshare e-Paper ESP8266 Driver Board, old version
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=15*/ EPD_CS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ESP32)
@@ -137,6 +139,8 @@ GxEPD2_BW < GxEPD2_1248, GxEPD2_1248::HEIGHT / 4 > display(GxEPD2_1248(/*sck=*/
     /*dc1=*/ 25, /*dc2=*/ 17, /*rst1=*/ 33, /*rst2=*/ 5,
     /*busy_m1=*/ 32, /*busy_s1=*/ 26, /*busy_m2=*/ 18, /*busy_s2=*/ 4));
 #endif
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 // can't use package "STMF1 Boards (STM32Duino.com)" (Roger Clark) anymore with Adafruit_GFX, use "STM32 Boards (selected from submenu)" (STMicroelectronics)
@@ -151,6 +155,8 @@ GxEPD2_BW < GxEPD2_1248, GxEPD2_1248::HEIGHT / 4 > display(GxEPD2_1248(/*sck=*/
 #endif
 // adapt the constructor parameters to your wiring
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=PA4*/ EPD_CS, /*DC=*/ PA3, /*RST=*/ PA2, /*BUSY=*/ PA1));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(__AVR)
@@ -181,6 +187,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 #endif
 // adapt the constructor parameters to your wiring
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=10*/ EPD_CS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ARDUINO_ARCH_SAMD)
@@ -196,6 +204,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5));
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // my Seed XIOA0
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // my other Seed XIOA0
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ARDUINO_ARCH_RP2040)
@@ -218,6 +228,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // DESPI-PICO
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ 3, /*DC=*/ 2, /*RST=*/ 11, /*BUSY=*/ 10)); // DESPI-PICO modified
 #endif
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #endif

+ 12 - 0
examples/GxEPD2_MinimumExample/GxEPD2_display_selection_new_style.h

@@ -109,6 +109,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=15*/ EPD_CS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5));
 // mapping of Waveshare e-Paper ESP8266 Driver Board, old version
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=15*/ EPD_CS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ESP32)
@@ -137,6 +139,8 @@ GxEPD2_BW < GxEPD2_1248, GxEPD2_1248::HEIGHT / 4 > display(GxEPD2_1248(/*sck=*/
     /*dc1=*/ 25, /*dc2=*/ 17, /*rst1=*/ 33, /*rst2=*/ 5,
     /*busy_m1=*/ 32, /*busy_s1=*/ 26, /*busy_m2=*/ 18, /*busy_s2=*/ 4));
 #endif
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 // can't use package "STMF1 Boards (STM32Duino.com)" (Roger Clark) anymore with Adafruit_GFX, use "STM32 Boards (selected from submenu)" (STMicroelectronics)
@@ -151,6 +155,8 @@ GxEPD2_BW < GxEPD2_1248, GxEPD2_1248::HEIGHT / 4 > display(GxEPD2_1248(/*sck=*/
 #endif
 // adapt the constructor parameters to your wiring
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=PA4*/ EPD_CS, /*DC=*/ PA3, /*RST=*/ PA2, /*BUSY=*/ PA1));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(__AVR)
@@ -181,6 +187,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 #endif
 // adapt the constructor parameters to your wiring
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=10*/ EPD_CS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ARDUINO_ARCH_SAMD)
@@ -196,6 +204,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5));
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // my Seed XIOA0
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // my other Seed XIOA0
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ARDUINO_ARCH_RP2040)
@@ -218,6 +228,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // DESPI-PICO
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ 3, /*DC=*/ 2, /*RST=*/ 11, /*BUSY=*/ 10)); // DESPI-PICO modified
 #endif
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #endif

+ 12 - 0
examples/GxEPD2_NotPagedExample/GxEPD2_display_selection_new_style.h

@@ -109,6 +109,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=15*/ EPD_CS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5));
 // mapping of Waveshare e-Paper ESP8266 Driver Board, old version
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=15*/ EPD_CS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ESP32)
@@ -137,6 +139,8 @@ GxEPD2_BW < GxEPD2_1248, GxEPD2_1248::HEIGHT / 4 > display(GxEPD2_1248(/*sck=*/
     /*dc1=*/ 25, /*dc2=*/ 17, /*rst1=*/ 33, /*rst2=*/ 5,
     /*busy_m1=*/ 32, /*busy_s1=*/ 26, /*busy_m2=*/ 18, /*busy_s2=*/ 4));
 #endif
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 // can't use package "STMF1 Boards (STM32Duino.com)" (Roger Clark) anymore with Adafruit_GFX, use "STM32 Boards (selected from submenu)" (STMicroelectronics)
@@ -151,6 +155,8 @@ GxEPD2_BW < GxEPD2_1248, GxEPD2_1248::HEIGHT / 4 > display(GxEPD2_1248(/*sck=*/
 #endif
 // adapt the constructor parameters to your wiring
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=PA4*/ EPD_CS, /*DC=*/ PA3, /*RST=*/ PA2, /*BUSY=*/ PA1));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(__AVR)
@@ -181,6 +187,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 #endif
 // adapt the constructor parameters to your wiring
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=10*/ EPD_CS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ARDUINO_ARCH_SAMD)
@@ -196,6 +204,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5));
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // my Seed XIOA0
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // my other Seed XIOA0
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ARDUINO_ARCH_RP2040)
@@ -218,6 +228,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // DESPI-PICO
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ 3, /*DC=*/ 2, /*RST=*/ 11, /*BUSY=*/ 10)); // DESPI-PICO modified
 #endif
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #endif

+ 12 - 0
examples/GxEPD2_PagedDisplayUsingCallback/GxEPD2_display_selection_new_style.h

@@ -109,6 +109,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=15*/ EPD_CS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5));
 // mapping of Waveshare e-Paper ESP8266 Driver Board, old version
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=15*/ EPD_CS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ESP32)
@@ -137,6 +139,8 @@ GxEPD2_BW < GxEPD2_1248, GxEPD2_1248::HEIGHT / 4 > display(GxEPD2_1248(/*sck=*/
     /*dc1=*/ 25, /*dc2=*/ 17, /*rst1=*/ 33, /*rst2=*/ 5,
     /*busy_m1=*/ 32, /*busy_s1=*/ 26, /*busy_m2=*/ 18, /*busy_s2=*/ 4));
 #endif
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 // can't use package "STMF1 Boards (STM32Duino.com)" (Roger Clark) anymore with Adafruit_GFX, use "STM32 Boards (selected from submenu)" (STMicroelectronics)
@@ -151,6 +155,8 @@ GxEPD2_BW < GxEPD2_1248, GxEPD2_1248::HEIGHT / 4 > display(GxEPD2_1248(/*sck=*/
 #endif
 // adapt the constructor parameters to your wiring
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=PA4*/ EPD_CS, /*DC=*/ PA3, /*RST=*/ PA2, /*BUSY=*/ PA1));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(__AVR)
@@ -181,6 +187,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 #endif
 // adapt the constructor parameters to your wiring
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=10*/ EPD_CS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ARDUINO_ARCH_SAMD)
@@ -196,6 +204,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5));
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // my Seed XIOA0
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // my other Seed XIOA0
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ARDUINO_ARCH_RP2040)
@@ -218,6 +228,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // DESPI-PICO
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ 3, /*DC=*/ 2, /*RST=*/ 11, /*BUSY=*/ 10)); // DESPI-PICO modified
 #endif
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #endif

+ 12 - 0
examples/GxEPD2_RotaryUsingBusyCallback/GxEPD2_display_selection_new_style.h

@@ -109,6 +109,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=15*/ EPD_CS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5));
 // mapping of Waveshare e-Paper ESP8266 Driver Board, old version
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=15*/ EPD_CS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ESP32)
@@ -137,6 +139,8 @@ GxEPD2_BW < GxEPD2_1248, GxEPD2_1248::HEIGHT / 4 > display(GxEPD2_1248(/*sck=*/
     /*dc1=*/ 25, /*dc2=*/ 17, /*rst1=*/ 33, /*rst2=*/ 5,
     /*busy_m1=*/ 32, /*busy_s1=*/ 26, /*busy_m2=*/ 18, /*busy_s2=*/ 4));
 #endif
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 // can't use package "STMF1 Boards (STM32Duino.com)" (Roger Clark) anymore with Adafruit_GFX, use "STM32 Boards (selected from submenu)" (STMicroelectronics)
@@ -151,6 +155,8 @@ GxEPD2_BW < GxEPD2_1248, GxEPD2_1248::HEIGHT / 4 > display(GxEPD2_1248(/*sck=*/
 #endif
 // adapt the constructor parameters to your wiring
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=PA4*/ EPD_CS, /*DC=*/ PA3, /*RST=*/ PA2, /*BUSY=*/ PA1));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(__AVR)
@@ -181,6 +187,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 #endif
 // adapt the constructor parameters to your wiring
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=10*/ EPD_CS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ARDUINO_ARCH_SAMD)
@@ -196,6 +204,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5));
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // my Seed XIOA0
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // my other Seed XIOA0
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ARDUINO_ARCH_RP2040)
@@ -218,6 +228,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // DESPI-PICO
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ 3, /*DC=*/ 2, /*RST=*/ 11, /*BUSY=*/ 10)); // DESPI-PICO modified
 #endif
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #endif

+ 12 - 0
examples/GxEPD2_SD_Example/GxEPD2_display_selection_new_style.h

@@ -109,6 +109,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=15*/ EPD_CS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5));
 // mapping of Waveshare e-Paper ESP8266 Driver Board, old version
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=15*/ EPD_CS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ESP32)
@@ -137,6 +139,8 @@ GxEPD2_BW < GxEPD2_1248, GxEPD2_1248::HEIGHT / 4 > display(GxEPD2_1248(/*sck=*/
     /*dc1=*/ 25, /*dc2=*/ 17, /*rst1=*/ 33, /*rst2=*/ 5,
     /*busy_m1=*/ 32, /*busy_s1=*/ 26, /*busy_m2=*/ 18, /*busy_s2=*/ 4));
 #endif
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 // can't use package "STMF1 Boards (STM32Duino.com)" (Roger Clark) anymore with Adafruit_GFX, use "STM32 Boards (selected from submenu)" (STMicroelectronics)
@@ -151,6 +155,8 @@ GxEPD2_BW < GxEPD2_1248, GxEPD2_1248::HEIGHT / 4 > display(GxEPD2_1248(/*sck=*/
 #endif
 // adapt the constructor parameters to your wiring
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=PA4*/ EPD_CS, /*DC=*/ PA3, /*RST=*/ PA2, /*BUSY=*/ PA1));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(__AVR)
@@ -181,6 +187,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 #endif
 // adapt the constructor parameters to your wiring
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=10*/ EPD_CS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ARDUINO_ARCH_SAMD)
@@ -196,6 +204,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5));
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // my Seed XIOA0
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // my other Seed XIOA0
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ARDUINO_ARCH_RP2040)
@@ -218,6 +228,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // DESPI-PICO
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ 3, /*DC=*/ 2, /*RST=*/ 11, /*BUSY=*/ 10)); // DESPI-PICO modified
 #endif
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #endif

+ 12 - 0
examples/GxEPD2_SerialFlash_Example/GxEPD2_display_selection_new_style.h

@@ -109,6 +109,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=15*/ EPD_CS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5));
 // mapping of Waveshare e-Paper ESP8266 Driver Board, old version
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=15*/ EPD_CS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ESP32)
@@ -137,6 +139,8 @@ GxEPD2_BW < GxEPD2_1248, GxEPD2_1248::HEIGHT / 4 > display(GxEPD2_1248(/*sck=*/
     /*dc1=*/ 25, /*dc2=*/ 17, /*rst1=*/ 33, /*rst2=*/ 5,
     /*busy_m1=*/ 32, /*busy_s1=*/ 26, /*busy_m2=*/ 18, /*busy_s2=*/ 4));
 #endif
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 // can't use package "STMF1 Boards (STM32Duino.com)" (Roger Clark) anymore with Adafruit_GFX, use "STM32 Boards (selected from submenu)" (STMicroelectronics)
@@ -151,6 +155,8 @@ GxEPD2_BW < GxEPD2_1248, GxEPD2_1248::HEIGHT / 4 > display(GxEPD2_1248(/*sck=*/
 #endif
 // adapt the constructor parameters to your wiring
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=PA4*/ EPD_CS, /*DC=*/ PA3, /*RST=*/ PA2, /*BUSY=*/ PA1));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(__AVR)
@@ -181,6 +187,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 #endif
 // adapt the constructor parameters to your wiring
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=10*/ EPD_CS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ARDUINO_ARCH_SAMD)
@@ -196,6 +204,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5));
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // my Seed XIOA0
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // my other Seed XIOA0
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ARDUINO_ARCH_RP2040)
@@ -218,6 +228,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // DESPI-PICO
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ 3, /*DC=*/ 2, /*RST=*/ 11, /*BUSY=*/ 10)); // DESPI-PICO modified
 #endif
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #endif

+ 12 - 0
examples/GxEPD2_Spiffs_Example/GxEPD2_display_selection_new_style.h

@@ -109,6 +109,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=15*/ EPD_CS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5));
 // mapping of Waveshare e-Paper ESP8266 Driver Board, old version
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=15*/ EPD_CS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ESP32)
@@ -137,6 +139,8 @@ GxEPD2_BW < GxEPD2_1248, GxEPD2_1248::HEIGHT / 4 > display(GxEPD2_1248(/*sck=*/
     /*dc1=*/ 25, /*dc2=*/ 17, /*rst1=*/ 33, /*rst2=*/ 5,
     /*busy_m1=*/ 32, /*busy_s1=*/ 26, /*busy_m2=*/ 18, /*busy_s2=*/ 4));
 #endif
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 // can't use package "STMF1 Boards (STM32Duino.com)" (Roger Clark) anymore with Adafruit_GFX, use "STM32 Boards (selected from submenu)" (STMicroelectronics)
@@ -151,6 +155,8 @@ GxEPD2_BW < GxEPD2_1248, GxEPD2_1248::HEIGHT / 4 > display(GxEPD2_1248(/*sck=*/
 #endif
 // adapt the constructor parameters to your wiring
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=PA4*/ EPD_CS, /*DC=*/ PA3, /*RST=*/ PA2, /*BUSY=*/ PA1));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(__AVR)
@@ -181,6 +187,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 #endif
 // adapt the constructor parameters to your wiring
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=10*/ EPD_CS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ARDUINO_ARCH_SAMD)
@@ -196,6 +204,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5));
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // my Seed XIOA0
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // my other Seed XIOA0
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ARDUINO_ARCH_RP2040)
@@ -218,6 +228,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // DESPI-PICO
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ 3, /*DC=*/ 2, /*RST=*/ 11, /*BUSY=*/ 10)); // DESPI-PICO modified
 #endif
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #endif

+ 12 - 0
examples/GxEPD2_U8G2_Fonts_Example/GxEPD2_display_selection_new_style.h

@@ -109,6 +109,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=15*/ EPD_CS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5));
 // mapping of Waveshare e-Paper ESP8266 Driver Board, old version
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=15*/ EPD_CS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ESP32)
@@ -137,6 +139,8 @@ GxEPD2_BW < GxEPD2_1248, GxEPD2_1248::HEIGHT / 4 > display(GxEPD2_1248(/*sck=*/
     /*dc1=*/ 25, /*dc2=*/ 17, /*rst1=*/ 33, /*rst2=*/ 5,
     /*busy_m1=*/ 32, /*busy_s1=*/ 26, /*busy_m2=*/ 18, /*busy_s2=*/ 4));
 #endif
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 // can't use package "STMF1 Boards (STM32Duino.com)" (Roger Clark) anymore with Adafruit_GFX, use "STM32 Boards (selected from submenu)" (STMicroelectronics)
@@ -151,6 +155,8 @@ GxEPD2_BW < GxEPD2_1248, GxEPD2_1248::HEIGHT / 4 > display(GxEPD2_1248(/*sck=*/
 #endif
 // adapt the constructor parameters to your wiring
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=PA4*/ EPD_CS, /*DC=*/ PA3, /*RST=*/ PA2, /*BUSY=*/ PA1));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(__AVR)
@@ -181,6 +187,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 #endif
 // adapt the constructor parameters to your wiring
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=10*/ EPD_CS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7));
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ARDUINO_ARCH_SAMD)
@@ -196,6 +204,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5));
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // my Seed XIOA0
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // my other Seed XIOA0
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #if defined(ARDUINO_ARCH_RP2040)
@@ -218,6 +228,8 @@ GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> displ
 GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // DESPI-PICO
 //GxEPD2_DISPLAY_CLASS<GxEPD2_DRIVER_CLASS, MAX_HEIGHT(GxEPD2_DRIVER_CLASS)> display(GxEPD2_DRIVER_CLASS(/*CS=*/ 3, /*DC=*/ 2, /*RST=*/ 11, /*BUSY=*/ 10)); // DESPI-PICO modified
 #endif
+#undef MAX_DISPLAY_BUFFER_SIZE
+#undef MAX_HEIGHT
 #endif
 
 #endif

+ 1 - 1
library.properties

@@ -1,5 +1,5 @@
 name=GxEPD2
-version=1.4.3
+version=1.4.4
 author=Jean-Marc Zingg
 maintainer=Jean-Marc Zingg
 sentence=Arduino Display Library for SPI E-Paper displays from Dalian Good Display and Waveshare. 

+ 5 - 5
src/GxEPD2_3C.h

@@ -105,11 +105,11 @@ class GxEPD2_3C : public GxEPD2_GFX_BASE_CLASS
       x -= _pw_x;
       y -= _pw_y;
       // clip to (partial) window
-      if ((x < 0) || (x >= _pw_w) || (y < 0) || (y >= _pw_h)) return;
+      if ((x < 0) || (x >= int16_t(_pw_w)) || (y < 0) || (y >= int16_t(_pw_h))) return;
       // adjust for current page
       y -= _current_page * _page_height;
       // check if in current page
-      if ((y < 0) || (y >= _page_height)) return;
+      if ((y < 0) || (y >= int16_t(_page_height))) return;
       uint16_t i = x / 8 + y * (_pw_w / 8);
       _black_buffer[i] = (_black_buffer[i] | (1 << (7 - x % 8))); // white
       _color_buffer[i] = (_color_buffer[i] | (1 << (7 - x % 8)));
@@ -246,7 +246,7 @@ class GxEPD2_3C : public GxEPD2_GFX_BASE_CLASS
       {
         //Serial.print("  nextPage("); Serial.print(_pw_x); Serial.print(", "); Serial.print(_pw_y); Serial.print(", ");
         //Serial.print(_pw_w); Serial.print(", "); Serial.print(_pw_h); Serial.print(") P"); Serial.println(_current_page);
-        uint16_t page_ye = _current_page < (_pages - 1) ? page_ys + _page_height : HEIGHT;
+        uint16_t page_ye = _current_page < int16_t(_pages - 1) ? page_ys + _page_height : HEIGHT;
         uint16_t dest_ys = _pw_y + page_ys; // transposed
         uint16_t dest_ye = gx_uint16_min(_pw_y + _pw_h, _pw_y + page_ye);
         if (dest_ye > dest_ys)
@@ -262,7 +262,7 @@ class GxEPD2_3C : public GxEPD2_GFX_BASE_CLASS
           //Serial.print(dest_ys); Serial.print(".."); Serial.println(dest_ye);
         }
         _current_page++;
-        if (_current_page == _pages)
+        if (_current_page == int16_t(_pages))
         {
           _current_page = 0;
           if (!_second_phase)
@@ -283,7 +283,7 @@ class GxEPD2_3C : public GxEPD2_GFX_BASE_CLASS
       {
         epd2.writeImage(_black_buffer, _color_buffer, 0, page_ys, WIDTH, gx_uint16_min(_page_height, HEIGHT - page_ys));
         _current_page++;
-        if (_current_page == _pages)
+        if (_current_page == int16_t(_pages))
         {
           _current_page = 0;
           if ((epd2.panel == GxEPD2::GDEW0154Z04) && (_pages > 1))

+ 5 - 5
src/GxEPD2_7C.h

@@ -91,11 +91,11 @@ class GxEPD2_7C : public GxEPD2_GFX_BASE_CLASS
       x -= _pw_x;
       y -= _pw_y;
       // clip to (partial) window
-      if ((x < 0) || (x >= _pw_w) || (y < 0) || (y >= _pw_h)) return;
+      if ((x < 0) || (x >= int16_t(_pw_w)) || (y < 0) || (y >= int16_t(_pw_h))) return;
       // adjust for current page
       y -= _current_page * _page_height;
       // check if in current page
-      if ((y < 0) || (y >= _page_height)) return;
+      if ((y < 0) || (y >= int16_t(_page_height))) return;
       uint32_t i = x / 2 + uint32_t(y) * (_pw_w / 2);
       uint8_t pv = color7(color);
       if (x & 1) _pixel_buffer[i] = (_pixel_buffer[i] & 0xF0) | pv;
@@ -214,7 +214,7 @@ class GxEPD2_7C : public GxEPD2_GFX_BASE_CLASS
       {
         //Serial.print("  nextPage("); Serial.print(_pw_x); Serial.print(", "); Serial.print(_pw_y); Serial.print(", ");
         //Serial.print(_pw_w); Serial.print(", "); Serial.print(_pw_h); Serial.print(") P"); Serial.println(_current_page);
-        uint16_t page_ye = _current_page < (_pages - 1) ? page_ys + _page_height : HEIGHT;
+        uint16_t page_ye = _current_page < int16_t(_pages - 1) ? page_ys + _page_height : HEIGHT;
         uint16_t dest_ys = _pw_y + page_ys; // transposed
         uint16_t dest_ye = gx_uint16_min(_pw_y + _pw_h, _pw_y + page_ye);
         if (dest_ye > dest_ys)
@@ -230,7 +230,7 @@ class GxEPD2_7C : public GxEPD2_GFX_BASE_CLASS
           //Serial.print(dest_ys); Serial.print(".."); Serial.println(dest_ye);
         }
         _current_page++;
-        if (_current_page == _pages)
+        if (_current_page == int16_t(_pages))
         {
           _current_page = 0;
           if (!_second_phase)
@@ -251,7 +251,7 @@ class GxEPD2_7C : public GxEPD2_GFX_BASE_CLASS
       {
         epd2.writeNative(_pixel_buffer, 0, 0, page_ys, WIDTH, gx_uint16_min(_page_height, HEIGHT - page_ys));
         _current_page++;
-        if (_current_page == _pages)
+        if (_current_page == int16_t(_pages))
         {
           _current_page = 0;
           if ((epd2.panel == GxEPD2::GDEW0154Z04) && (_pages > 1))

+ 5 - 5
src/GxEPD2_BW.h

@@ -128,12 +128,12 @@ class GxEPD2_BW : public GxEPD2_GFX_BASE_CLASS
       x -= _pw_x;
       y -= _pw_y;
       // clip to (partial) window
-      if ((x < 0) || (x >= _pw_w) || (y < 0) || (y >= _pw_h)) return;
+      if ((x < 0) || (x >= int16_t(_pw_w)) || (y < 0) || (y >= int16_t(_pw_h))) return;
       // adjust for current page
       y -= _current_page * _page_height;
       if (_reverse) y = _page_height - y - 1;
       // check if in current page
-      if ((y < 0) || (y >= _page_height)) return;
+      if ((y < 0) || (y >= int16_t(_page_height))) return;
       uint16_t i = x / 8 + y * (_pw_w / 8);
       if (color)
         _buffer[i] = (_buffer[i] | (1 << (7 - x % 8)));
@@ -287,7 +287,7 @@ class GxEPD2_BW : public GxEPD2_GFX_BASE_CLASS
       {
         //Serial.print("  nextPage("); Serial.print(_pw_x); Serial.print(", "); Serial.print(_pw_y); Serial.print(", ");
         //Serial.print(_pw_w); Serial.print(", "); Serial.print(_pw_h); Serial.print(") P"); Serial.println(_current_page);
-        uint16_t page_ye = _current_page < (_pages - 1) ? page_ys + _page_height : HEIGHT;
+        uint16_t page_ye = _current_page < int16_t(_pages - 1) ? page_ys + _page_height : HEIGHT;
         uint16_t dest_ys = _pw_y + page_ys; // transposed
         uint16_t dest_ye = gx_uint16_min(_pw_y + _pw_h, _pw_y + page_ye);
         if (dest_ye > dest_ys)
@@ -305,7 +305,7 @@ class GxEPD2_BW : public GxEPD2_GFX_BASE_CLASS
           //Serial.print(dest_ys); Serial.print(".."); Serial.println(dest_ye);
         }
         _current_page++;
-        if (_current_page == _pages)
+        if (_current_page == int16_t(_pages))
         {
           _current_page = 0;
           if (!_second_phase)
@@ -328,7 +328,7 @@ class GxEPD2_BW : public GxEPD2_GFX_BASE_CLASS
         if (!_second_phase) epd2.writeImageForFullRefresh(_buffer, 0, page_ys, WIDTH, gx_uint16_min(_page_height, HEIGHT - page_ys));
         else epd2.writeImageAgain(_buffer, 0, page_ys, WIDTH, gx_uint16_min(_page_height, HEIGHT - page_ys));
         _current_page++;
-        if (_current_page == _pages)
+        if (_current_page == int16_t(_pages))
         {
           _current_page = 0;
           if (epd2.hasFastPartialUpdate)

+ 1 - 0
src/GxEPD2_EPD.h

@@ -18,6 +18,7 @@
 #include <GxEPD2.h>
 
 #pragma GCC diagnostic ignored "-Wunused-parameter"
+//#pragma GCC diagnostic ignored "-Wsign-compare"
 
 class GxEPD2_EPD
 {

+ 14 - 14
src/epd3c/GxEPD2_154c.cpp

@@ -94,7 +94,7 @@ void GxEPD2_154c::writeImage(const uint8_t* black, const uint8_t* color, int16_t
   //Serial.print("writeImage("); Serial.print(x); Serial.print(", "); Serial.print(y); Serial.print(", ");
   //Serial.print(w); Serial.print(", "); Serial.print(h); Serial.println(")");
   delay(1); // yield() to avoid WDT on ESP8266 and ESP32
-  if (_paged && (x == 0) && (w == WIDTH) && (h < HEIGHT))
+  if (_paged && (x == 0) && (w == int16_t(WIDTH)) && (h < int16_t(HEIGHT)))
   {
     //Serial.println("paged");
     if (!_second_phase)
@@ -128,22 +128,22 @@ void GxEPD2_154c::writeImage(const uint8_t* black, const uint8_t* color, int16_t
   else
   {
     _paged = false;
-    int16_t wb = (w + 7) / 8; // width bytes, bitmaps are padded
+    uint16_t wb = (w + 7) / 8; // width bytes, bitmaps are padded
     x -= x % 8; // byte boundary
     w = wb * 8; // byte boundary
     if ((w <= 0) || (h <= 0)) return;
     _Init_Full();
     _writeCommand(0x10);
-    for (int16_t i = 0; i < HEIGHT; i++)
+    for (int16_t i = 0; i < int16_t(HEIGHT); i++)
     {
-      for (int16_t j = 0; j < WIDTH; j += 8)
+      for (int16_t j = 0; j < int16_t(WIDTH); j += 8)
       {
         uint8_t data = 0xFF;
         if (black)
         {
           if ((j >= x) && (j <= x + w) && (i >= y) && (i < y + h))
           {
-            int16_t idx = mirror_y ? (j - x) / 8 + ((h - 1 - (i - y))) * wb : (j - x) / 8 + (i - y) * wb;
+            uint16_t idx = mirror_y ? (j - x) / 8 + ((h - 1 - (i - y))) * wb : (j - x) / 8 + (i - y) * wb;
             if (pgm)
             {
 #if defined(__AVR) || defined(ESP8266) || defined(ESP32)
@@ -165,16 +165,16 @@ void GxEPD2_154c::writeImage(const uint8_t* black, const uint8_t* color, int16_t
       }
     }
     _writeCommand(0x13);
-    for (int16_t i = 0; i < HEIGHT; i++)
+    for (int16_t i = 0; i < int16_t(HEIGHT); i++)
     {
-      for (int16_t j = 0; j < WIDTH; j += 8)
+      for (int16_t j = 0; j < int16_t(WIDTH); j += 8)
       {
         uint8_t data = 0xFF;
         if (color)
         {
           if ((j >= x) && (j <= x + w) && (i >= y) && (i < y + h))
           {
-            int16_t idx = mirror_y ? (j - x) / 8 + ((h - 1 - (i - y))) * wb : (j - x) / 8 + (i - y) * wb;
+            uint16_t idx = mirror_y ? (j - x) / 8 + ((h - 1 - (i - y))) * wb : (j - x) / 8 + (i - y) * wb;
             if (pgm)
             {
 #if defined(__AVR) || defined(ESP8266) || defined(ESP32)
@@ -227,9 +227,9 @@ void GxEPD2_154c::writeImagePart(const uint8_t* black, const uint8_t* color, int
   if ((w1 <= 0) || (h1 <= 0)) return;
   _Init_Full();
   _writeCommand(0x10);
-  for (int16_t i = 0; i < HEIGHT; i++)
+  for (int16_t i = 0; i < int16_t(HEIGHT); i++)
   {
-    for (int16_t j = 0; j < WIDTH; j += 8)
+    for (int16_t j = 0; j < int16_t(WIDTH); j += 8)
     {
       uint8_t data = 0xFF;
       if (black)
@@ -238,7 +238,7 @@ void GxEPD2_154c::writeImagePart(const uint8_t* black, const uint8_t* color, int
         {
           // use wb_bitmap, h_bitmap of bitmap for index!
           //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;
-          int16_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;
+          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;
           if (pgm)
           {
 #if defined(__AVR) || defined(ESP8266) || defined(ESP32)
@@ -260,9 +260,9 @@ void GxEPD2_154c::writeImagePart(const uint8_t* black, const uint8_t* color, int
     }
   }
   _writeCommand(0x13);
-  for (int16_t i = 0; i < HEIGHT; i++)
+  for (int16_t i = 0; i < int16_t(HEIGHT); i++)
   {
-    for (int16_t j = 0; j < WIDTH; j += 8)
+    for (int16_t j = 0; j < int16_t(WIDTH); j += 8)
     {
       uint8_t data = 0xFF;
       if (color)
@@ -270,7 +270,7 @@ void GxEPD2_154c::writeImagePart(const uint8_t* black, const uint8_t* color, int
         if ((j >= x1) && (j <= x1 + w) && (i >= y1) && (i < y1 + h))
         {
           // use wb_bitmap, h_bitmap of bitmap for index!
-          int16_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;
+          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;
           if (pgm)
           {
 #if defined(__AVR) || defined(ESP8266) || defined(ESP32)

+ 15 - 15
src/epd3c/GxEPD2_565c.cpp

@@ -55,7 +55,7 @@ void GxEPD2_565c::writeImage(const uint8_t bitmap[], int16_t x, int16_t y, int16
   //Serial.print("writeImage("); Serial.print(x); Serial.print(", "); Serial.print(y); Serial.print(", ");
   //Serial.print(w); Serial.print(", "); Serial.print(h); Serial.println(")");
   delay(1); // yield() to avoid WDT on ESP8266 and ESP32
-  if (_paged && (x == 0) && (w == WIDTH) && (h < HEIGHT))
+  if (_paged && (x == 0) && (w == int16_t(WIDTH)) && (h < int16_t(HEIGHT)))
   {
     //Serial.println("paged");
     _startTransfer();
@@ -86,9 +86,9 @@ void GxEPD2_565c::writeImage(const uint8_t bitmap[], int16_t x, int16_t y, int16
     _Init_Full();
     _writeCommand(0x10);
     _startTransfer();
-    for (int16_t i = 0; i < HEIGHT; i++)
+    for (int16_t i = 0; i < int16_t(HEIGHT); i++)
     {
-      for (int16_t j = 0; j < WIDTH; j += 8)
+      for (int16_t j = 0; j < int16_t(WIDTH); j += 8)
       {
         uint8_t data = 0xFF;
         if ((j >= x) && (j <= x + w) && (i >= y) && (i < y + h))
@@ -128,7 +128,7 @@ void GxEPD2_565c::writeImage(const uint8_t* black, const uint8_t* color, int16_t
   //Serial.print("writeImage("); Serial.print(x); Serial.print(", "); Serial.print(y); Serial.print(", ");
   //Serial.print(w); Serial.print(", "); Serial.print(h); Serial.println(")");
   delay(1); // yield() to avoid WDT on ESP8266 and ESP32
-  if (_paged && (x == 0) && (w == WIDTH) && (h < HEIGHT))
+  if (_paged && (x == 0) && (w == int16_t(WIDTH)) && (h < int16_t(HEIGHT)))
   {
     //Serial.println("paged");
     _startTransfer();
@@ -167,9 +167,9 @@ void GxEPD2_565c::writeImage(const uint8_t* black, const uint8_t* color, int16_t
     _Init_Full();
     _writeCommand(0x10);
     _startTransfer();
-    for (int16_t i = 0; i < HEIGHT; i++)
+    for (int16_t i = 0; i < int16_t(HEIGHT); i++)
     {
-      for (int16_t j = 0; j < WIDTH; j += 8)
+      for (int16_t j = 0; j < int16_t(WIDTH); j += 8)
       {
         uint8_t black_data = 0xFF, color_data = 0xFF;
         if ((j >= x) && (j < x + w) && (i >= y) && (i < y + h))
@@ -241,9 +241,9 @@ void GxEPD2_565c::writeImagePart(const uint8_t bitmap[], int16_t x_part, int16_t
   _Init_Full();
   _writeCommand(0x10);
   _startTransfer();
-  for (int16_t i = 0; i < HEIGHT; i++)
+  for (int16_t i = 0; i < int16_t(HEIGHT); i++)
   {
-    for (int16_t j = 0; j < WIDTH; j += 8)
+    for (int16_t j = 0; j < int16_t(WIDTH); j += 8)
     {
       uint8_t data = 0xFF;
       if ((j >= x1) && (j < x1 + w) && (i >= y1) && (i < y1 + h))
@@ -307,9 +307,9 @@ void GxEPD2_565c::writeImagePart(const uint8_t* black, const uint8_t* color, int
   _Init_Full();
   _writeCommand(0x10);
   _startTransfer();
-  for (int16_t i = 0; i < HEIGHT; i++)
+  for (int16_t i = 0; i < int16_t(HEIGHT); i++)
   {
-    for (int16_t j = 0; j < WIDTH; j += 8)
+    for (int16_t j = 0; j < int16_t(WIDTH); j += 8)
     {
       uint8_t black_data = 0xFF, color_data = 0xFF;
       if ((j >= x1) && (j < x1 + w) && (i >= y1) && (i < y1 + h))
@@ -363,7 +363,7 @@ void GxEPD2_565c::writeNative(const uint8_t* data1, const uint8_t* data2, int16_
     //Serial.print("writeNative("); Serial.print(x); Serial.print(", "); Serial.print(y); Serial.print(", ");
     //Serial.print(w); Serial.print(", "); Serial.print(h); Serial.println(")");
     delay(1); // yield() to avoid WDT on ESP8266 and ESP32
-    if (_paged && (x == 0) && (w == WIDTH) && (h < HEIGHT))
+    if (_paged && (x == 0) && (w == int16_t(WIDTH)) && (h < int16_t(HEIGHT)))
     {
       //Serial.println("paged");
       _startTransfer();
@@ -389,9 +389,9 @@ void GxEPD2_565c::writeNative(const uint8_t* data1, const uint8_t* data2, int16_
       _Init_Full();
       _writeCommand(0x10);
       _startTransfer();
-      for (int16_t i = 0; i < HEIGHT; i++)
+      for (int16_t i = 0; i < int16_t(HEIGHT); i++)
       {
-        for (int16_t j = 0; j < WIDTH; j += 2)
+        for (int16_t j = 0; j < int16_t(WIDTH); j += 2)
         {
           uint8_t data = 0x11;
           if (data1)
@@ -453,9 +453,9 @@ void GxEPD2_565c::writeNativePart(const uint8_t* data1, const uint8_t* data2, in
   _Init_Full();
   _writeCommand(0x10);
   _startTransfer();
-  for (int16_t i = 0; i < HEIGHT; i++)
+  for (int16_t i = 0; i < int16_t(HEIGHT); i++)
   {
-    for (int16_t j = 0; j < WIDTH; j += 2)
+    for (int16_t j = 0; j < int16_t(WIDTH); j += 2)
     {
       uint8_t data = 0x11;
       if ((j >= x1) && (j < x1 + w) && (i >= y1) && (i < y1 + h))

+ 3 - 3
src/it8951/GxEPD2_it60.cpp

@@ -89,7 +89,7 @@ void GxEPD2_it60::init(uint32_t serial_diag_bitrate, bool initial, uint16_t rese
     //Show Device information of IT8951
     printf("Panel(W,H) = (%d,%d)\r\n",
            IT8951DevInfo.usPanelW, IT8951DevInfo.usPanelH );
-    printf("Image Buffer Address = %X\r\n",
+    printf("Image Buffer Address = %lX\r\n",
            uint32_t(IT8951DevInfo.usImgBufAddrL) | (uint32_t(IT8951DevInfo.usImgBufAddrH) << 16));
     //Show Firmware and LUT Version
     printf("FW Version = %s\r\n", (uint8_t*)IT8951DevInfo.usFWVersion);
@@ -100,9 +100,9 @@ void GxEPD2_it60::init(uint32_t serial_diag_bitrate, bool initial, uint16_t rese
   if (VCOM != _IT8951GetVCOM())
   {
     _IT8951SetVCOM(VCOM);
-    printf("VCOM = -%.02fV\n", (float)_IT8951GetVCOM() / 1000);
+    printf("VCOM = -%.02fV\n", (double)_IT8951GetVCOM() / 1000);
   }
-  printf("VCOM = -%.02fV\n", (float)_IT8951GetVCOM() / 1000);
+  printf("VCOM = -%.02fV\n", (double)_IT8951GetVCOM() / 1000);
 }
 
 void GxEPD2_it60::clearScreen(uint8_t value)

+ 3 - 3
src/it8951/GxEPD2_it60_1448x1072.cpp

@@ -89,7 +89,7 @@ void GxEPD2_it60_1448x1072::init(uint32_t serial_diag_bitrate, bool initial, uin
     //Show Device information of IT8951
     printf("Panel(W,H) = (%d,%d)\r\n",
            IT8951DevInfo.usPanelW, IT8951DevInfo.usPanelH );
-    printf("Image Buffer Address = %X\r\n",
+    printf("Image Buffer Address = %lX\r\n",
            uint32_t(IT8951DevInfo.usImgBufAddrL) | (uint32_t(IT8951DevInfo.usImgBufAddrH) << 16));
     //Show Firmware and LUT Version
     printf("FW Version = %s\r\n", (uint8_t*)IT8951DevInfo.usFWVersion);
@@ -100,9 +100,9 @@ void GxEPD2_it60_1448x1072::init(uint32_t serial_diag_bitrate, bool initial, uin
   if (VCOM != _IT8951GetVCOM())
   {
     _IT8951SetVCOM(VCOM);
-    printf("VCOM = -%.02fV\n", (float)_IT8951GetVCOM() / 1000);
+    printf("VCOM = -%.02fV\n", (double)_IT8951GetVCOM() / 1000);
   }
-  printf("VCOM = -%.02fV\n", (float)_IT8951GetVCOM() / 1000);
+  printf("VCOM = -%.02fV\n", (double)_IT8951GetVCOM() / 1000);
 }
 
 void GxEPD2_it60_1448x1072::clearScreen(uint8_t value)

+ 3 - 3
src/it8951/GxEPD2_it78_1872x1404.cpp

@@ -89,7 +89,7 @@ void GxEPD2_it78_1872x1404::init(uint32_t serial_diag_bitrate, bool initial, uin
     //Show Device information of IT8951
     printf("Panel(W,H) = (%d,%d)\r\n",
            IT8951DevInfo.usPanelW, IT8951DevInfo.usPanelH );
-    printf("Image Buffer Address = %X\r\n",
+    printf("Image Buffer Address = %lX\r\n",
            uint32_t(IT8951DevInfo.usImgBufAddrL) | (uint32_t(IT8951DevInfo.usImgBufAddrH) << 16));
     //Show Firmware and LUT Version
     printf("FW Version = %s\r\n", (uint8_t*)IT8951DevInfo.usFWVersion);
@@ -100,9 +100,9 @@ void GxEPD2_it78_1872x1404::init(uint32_t serial_diag_bitrate, bool initial, uin
   if (VCOM != _IT8951GetVCOM())
   {
     _IT8951SetVCOM(VCOM);
-    printf("VCOM = -%.02fV\n", (float)_IT8951GetVCOM() / 1000);
+    printf("VCOM = -%.02fV\n", (double)_IT8951GetVCOM() / 1000);
   }
-  printf("VCOM = -%.02fV\n", (float)_IT8951GetVCOM() / 1000);
+  printf("VCOM = -%.02fV\n", (double)_IT8951GetVCOM() / 1000);
 }
 
 void GxEPD2_it78_1872x1404::clearScreen(uint8_t value)