diff --git a/README.md b/README.md index 8812ccd..4673e91 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ ### Supporting Arduino Forum Topics: - Waveshare e-paper displays with SPI: http://forum.arduino.cc/index.php?topic=487007.0 -- Good Dispay ePaper for Arduino : https://forum.arduino.cc/index.php?topic=436411.0 +- Good Display ePaper for Arduino : https://forum.arduino.cc/index.php?topic=436411.0 ### Note on documentation - GxEPD2 uses Adafruit_GFX for Graphics and Text support, which is well documented there diff --git a/examples/GxEPD2_Example/GxEPD2_Example.ino b/examples/GxEPD2_Example/GxEPD2_Example.ino index e149b7d..2d61644 100644 --- a/examples/GxEPD2_Example/GxEPD2_Example.ino +++ b/examples/GxEPD2_Example/GxEPD2_Example.ino @@ -11,7 +11,7 @@ // Supporting Arduino Forum Topics: // Waveshare e-paper displays with SPI: http://forum.arduino.cc/index.php?topic=487007.0 -// Good Dispay ePaper for Arduino: https://forum.arduino.cc/index.php?topic=436411.0 +// Good Display ePaper for Arduino: https://forum.arduino.cc/index.php?topic=436411.0 // mapping suggestion from Waveshare SPI e-Paper to Wemos D1 mini // BUSY -> D2, RST -> D4, DC -> D3, CS -> D8, CLK -> D5, DIN -> D7, GND -> GND, 3.3V -> 3.3V @@ -146,8 +146,8 @@ #endif #if defined(_BOARD_GENERIC_STM32F103C_H_) -#define MAX_DISPAY_BUFFER_SIZE 15000ul // ~15k is a good compromise -#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8)) +#define MAX_DISPLAY_BUFFER_SIZE 15000ul // ~15k is a good compromise +#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8)) // select one and adapt to your mapping //GxEPD2_BW display(GxEPD2_154(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); //GxEPD2_BW display(GxEPD2_213(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // GDE0213B1, phased out @@ -164,7 +164,7 @@ //GxEPD2_BW display(GxEPD2_750(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); //GxEPD2_BW display(GxEPD2_750_T7(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // GDEW075T7 800x480 // 3-color e-papers -#define MAX_HEIGHT_3C(EPD) (EPD::HEIGHT <= (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8) ? EPD::HEIGHT : (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8)) +#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 display(GxEPD2_154c(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); //GxEPD2_3C display(GxEPD2_213c(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); //GxEPD2_3C display(GxEPD2_290c(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); @@ -176,8 +176,8 @@ #endif #if defined(__AVR) -#define MAX_DISPAY_BUFFER_SIZE 800 // -#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8)) +#define MAX_DISPLAY_BUFFER_SIZE 800 // +#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8)) // select one and adapt to your mapping //GxEPD2_BW display(GxEPD2_154(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_BW display(GxEPD2_213(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDE0213B1, phased out @@ -194,7 +194,7 @@ //GxEPD2_BW display(GxEPD2_750(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_BW display(GxEPD2_750_T7(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW075T7 800x480 // 3-color e-papers -#define MAX_HEIGHT_3C(EPD) (EPD::HEIGHT <= (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8) ? EPD::HEIGHT : (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8)) +#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 display(GxEPD2_154c(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_3C display(GxEPD2_213c(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_3C display(GxEPD2_290c(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); @@ -225,7 +225,7 @@ //GxEPD2_BW display(GxEPD2_750(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); //GxEPD2_BW display(GxEPD2_750_T7(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEW075T7 800x480 // 3-color e-papers -#define MAX_HEIGHT_3C(EPD) (EPD::HEIGHT <= (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8) ? EPD::HEIGHT : (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8)) +#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 display(GxEPD2_154c(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); //GxEPD2_3C display(GxEPD2_213c(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); //GxEPD2_3C display(GxEPD2_290c(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); diff --git a/examples/GxEPD2_Example/GxEPD2_boards_added.h b/examples/GxEPD2_Example/GxEPD2_boards_added.h index eff8e01..357ac8c 100644 --- a/examples/GxEPD2_Example/GxEPD2_boards_added.h +++ b/examples/GxEPD2_Example/GxEPD2_boards_added.h @@ -19,8 +19,8 @@ // SPI pins are on 6 pin 2x3 SPI header #if defined(ARDUINO_ARCH_SAM) -#define MAX_DISPAY_BUFFER_SIZE 15000ul // ~15k is a good compromise -#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8)) +#define MAX_DISPLAY_BUFFER_SIZE 15000ul // ~15k is a good compromise +#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8)) // select one and adapt to your mapping //GxEPD2_BW display(GxEPD2_154(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_BW display(GxEPD2_213(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDE0213B1, phased out @@ -37,7 +37,7 @@ //GxEPD2_BW display(GxEPD2_750(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_BW display(GxEPD2_750_T7(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW075T7 800x480 // 3-color e-papers -#define MAX_HEIGHT_3C(EPD) (EPD::HEIGHT <= (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8) ? EPD::HEIGHT : (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8)) +#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 display(GxEPD2_154c(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_3C display(GxEPD2_213c(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_3C display(GxEPD2_290c(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); @@ -55,8 +55,8 @@ // BUSY -> 5, RST -> 6, DC -> 7, CS-> 4, CLK -> 9, DIN -> 8 #if defined(ARDUINO_ARCH_SAMD) -#define MAX_DISPAY_BUFFER_SIZE 15000ul // ~15k is a good compromise -#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8)) +#define MAX_DISPLAY_BUFFER_SIZE 15000ul // ~15k is a good compromise +#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8)) // select one and adapt to your mapping //GxEPD2_BW display(GxEPD2_154(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); //GxEPD2_BW display(GxEPD2_213(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // GDE0213B1, phased out @@ -73,7 +73,7 @@ //GxEPD2_BW display(GxEPD2_750(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); //GxEPD2_BW display(GxEPD2_750_T7(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // GDEW075T7 800x480 // 3-color e-papers -#define MAX_HEIGHT_3C(EPD) (EPD::HEIGHT <= (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8) ? EPD::HEIGHT : (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8)) +#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 display(GxEPD2_154c(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); //GxEPD2_3C display(GxEPD2_213c(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); //GxEPD2_3C display(GxEPD2_290c(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); diff --git a/examples/GxEPD2_GFX_MultiDisplayExample/GxEPD2_GFX_MultiDisplayExample.ino b/examples/GxEPD2_GFX_MultiDisplayExample/GxEPD2_GFX_MultiDisplayExample.ino index 9d1b5fc..23ade89 100644 --- a/examples/GxEPD2_GFX_MultiDisplayExample/GxEPD2_GFX_MultiDisplayExample.ino +++ b/examples/GxEPD2_GFX_MultiDisplayExample/GxEPD2_GFX_MultiDisplayExample.ino @@ -11,7 +11,7 @@ // Supporting Arduino Forum Topics: // Waveshare e-paper displays with SPI: http://forum.arduino.cc/index.php?topic=487007.0 -// Good Dispay ePaper for Arduino : https://forum.arduino.cc/index.php?topic=436411.0 +// Good Display ePaper for Arduino : https://forum.arduino.cc/index.php?topic=436411.0 // mapping suggestion from Waveshare SPI e-Paper to Wemos D1 mini // BUSY -> D2, RST -> D4, DC -> D3, CS -> D8, CLK -> D5, DIN -> D7, GND -> GND, 3.3V -> 3.3V diff --git a/examples/GxEPD2_MultiDisplayExample/GxEPD2_MultiDisplayExample.ino b/examples/GxEPD2_MultiDisplayExample/GxEPD2_MultiDisplayExample.ino index aabb29e..2daa50c 100644 --- a/examples/GxEPD2_MultiDisplayExample/GxEPD2_MultiDisplayExample.ino +++ b/examples/GxEPD2_MultiDisplayExample/GxEPD2_MultiDisplayExample.ino @@ -11,7 +11,7 @@ // Supporting Arduino Forum Topics: // Waveshare e-paper displays with SPI: http://forum.arduino.cc/index.php?topic=487007.0 -// Good Dispay ePaper for Arduino : https://forum.arduino.cc/index.php?topic=436411.0 +// Good Display ePaper for Arduino : https://forum.arduino.cc/index.php?topic=436411.0 // mapping suggestion from Waveshare SPI e-Paper to Wemos D1 mini // BUSY -> D2, RST -> D4, DC -> D3, CS -> D8, CLK -> D5, DIN -> D7, GND -> GND, 3.3V -> 3.3V diff --git a/examples/GxEPD2_NotPagedExample/GxEPD2_NotPagedExample.ino b/examples/GxEPD2_NotPagedExample/GxEPD2_NotPagedExample.ino index 9f5d681..f8803e6 100644 --- a/examples/GxEPD2_NotPagedExample/GxEPD2_NotPagedExample.ino +++ b/examples/GxEPD2_NotPagedExample/GxEPD2_NotPagedExample.ino @@ -11,7 +11,7 @@ // Supporting Arduino Forum Topics: // Waveshare e-paper displays with SPI: http://forum.arduino.cc/index.php?topic=487007.0 -// Good Dispay ePaper for Arduino: https://forum.arduino.cc/index.php?topic=436411.0 +// Good Display ePaper for Arduino: https://forum.arduino.cc/index.php?topic=436411.0 // mapping suggestion from Waveshare SPI e-Paper to Wemos D1 mini // BUSY -> D2, RST -> D4, DC -> D3, CS -> D8, CLK -> D5, DIN -> D7, GND -> GND, 3.3V -> 3.3V @@ -128,8 +128,8 @@ #endif #if defined(_BOARD_GENERIC_STM32F103C_H_) -#define MAX_DISPAY_BUFFER_SIZE 15000ul // ~15k is a good compromise -#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8)) +#define MAX_DISPLAY_BUFFER_SIZE 15000ul // ~15k is a good compromise +#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8)) // select one and adapt to your mapping //GxEPD2_BW display(GxEPD2_154(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); //GxEPD2_BW display(GxEPD2_213(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // GDE0213B1, phased out @@ -142,7 +142,7 @@ ////GxEPD2_BW display(GxEPD2_583(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); ////GxEPD2_BW display(GxEPD2_750(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // 3-color e-papers -#define MAX_HEIGHT_3C(EPD) (EPD::HEIGHT <= (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8) ? EPD::HEIGHT : (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8)) +#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 display(GxEPD2_154c(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); //GxEPD2_3C display(GxEPD2_213c(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); //GxEPD2_3C display(GxEPD2_290c(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); diff --git a/examples/GxEPD2_NotPagedExample/GxEPD2_boards_added.h b/examples/GxEPD2_NotPagedExample/GxEPD2_boards_added.h index ad0dc9d..231e9d0 100644 --- a/examples/GxEPD2_NotPagedExample/GxEPD2_boards_added.h +++ b/examples/GxEPD2_NotPagedExample/GxEPD2_boards_added.h @@ -19,8 +19,8 @@ // SPI pins are on 6 pin 2x3 SPI header #if defined(ARDUINO_ARCH_SAM) -#define MAX_DISPAY_BUFFER_SIZE 15000ul // ~15k is a good compromise -#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8)) +#define MAX_DISPLAY_BUFFER_SIZE 15000ul // ~15k is a good compromise +#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8)) // select one and adapt to your mapping //GxEPD2_BW display(GxEPD2_154(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_BW display(GxEPD2_213(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); @@ -32,7 +32,7 @@ //GxEPD2_BW display(GxEPD2_583(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_BW display(GxEPD2_750(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // 3-color e-papers -#define MAX_HEIGHT_3C(EPD) (EPD::HEIGHT <= (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8) ? EPD::HEIGHT : (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8)) +#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 display(GxEPD2_154c(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_3C display(GxEPD2_213c(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_3C display(GxEPD2_290c(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); @@ -49,8 +49,8 @@ // BUSY -> 5, RST -> 6, DC -> 7, CS-> 4, CLK -> 9, DIN -> 8 #if defined(ARDUINO_ARCH_SAMD) -#define MAX_DISPAY_BUFFER_SIZE 15000ul // ~15k is a good compromise -#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8)) +#define MAX_DISPLAY_BUFFER_SIZE 15000ul // ~15k is a good compromise +#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8)) // select one and adapt to your mapping //GxEPD2_BW display(GxEPD2_154(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); //GxEPD2_BW display(GxEPD2_213(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); @@ -62,7 +62,7 @@ //GxEPD2_BW display(GxEPD2_583(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); //GxEPD2_BW display(GxEPD2_750(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // 3-color e-papers -#define MAX_HEIGHT_3C(EPD) (EPD::HEIGHT <= (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8) ? EPD::HEIGHT : (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8)) +#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 display(GxEPD2_154c(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); //GxEPD2_3C display(GxEPD2_213c(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); //GxEPD2_3C display(GxEPD2_290c(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); diff --git a/examples/GxEPD2_PagedDisplayUsingCallback/GxEPD2_PagedDisplayUsingCallback.ino b/examples/GxEPD2_PagedDisplayUsingCallback/GxEPD2_PagedDisplayUsingCallback.ino index 5e24551..8aae4e5 100644 --- a/examples/GxEPD2_PagedDisplayUsingCallback/GxEPD2_PagedDisplayUsingCallback.ino +++ b/examples/GxEPD2_PagedDisplayUsingCallback/GxEPD2_PagedDisplayUsingCallback.ino @@ -11,7 +11,7 @@ // Supporting Arduino Forum Topics: // Waveshare e-paper displays with SPI: http://forum.arduino.cc/index.php?topic=487007.0 -// Good Dispay ePaper for Arduino : https://forum.arduino.cc/index.php?topic=436411.0 +// Good Display ePaper for Arduino : https://forum.arduino.cc/index.php?topic=436411.0 // mapping suggestion from Waveshare SPI e-Paper to Wemos D1 mini // BUSY -> D2, RST -> D4, DC -> D3, CS -> D8, CLK -> D5, DIN -> D7, GND -> GND, 3.3V -> 3.3V @@ -97,8 +97,8 @@ #endif #if defined(_BOARD_GENERIC_STM32F103C_H_) -#define MAX_DISPAY_BUFFER_SIZE 15000ul // ~15k is a good compromise -#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8)) +#define MAX_DISPLAY_BUFFER_SIZE 15000ul // ~15k is a good compromise +#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8)) // select one and adapt to your mapping //GxEPD2_BW display(GxEPD2_154(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); //GxEPD2_BW display(GxEPD2_213(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); @@ -107,7 +107,7 @@ //GxEPD2_BW display(GxEPD2_420(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); //GxEPD2_BW display(GxEPD2_750(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // 3-color e-papers -#define MAX_HEIGHT_3C(EPD) (EPD::HEIGHT <= (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8) ? EPD::HEIGHT : (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8)) +#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 display(GxEPD2_154c(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); //GxEPD2_3C display(GxEPD2_213c(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); //GxEPD2_3C display(GxEPD2_290c(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); @@ -117,8 +117,8 @@ #endif #if defined(__AVR) -#define MAX_DISPAY_BUFFER_SIZE 800 // -#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8)) +#define MAX_DISPLAY_BUFFER_SIZE 800 // +#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8)) // select one and adapt to your mapping //GxEPD2_BW display(GxEPD2_154(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_BW display(GxEPD2_213(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); @@ -127,7 +127,7 @@ //GxEPD2_BW display(GxEPD2_420(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_BW display(GxEPD2_750(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // 3-color e-papers -#define MAX_HEIGHT_3C(EPD) (EPD::HEIGHT <= (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8) ? EPD::HEIGHT : (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8)) +#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 display(GxEPD2_154c(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // not available //GxEPD2_3C display(GxEPD2_213c(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_3C display(GxEPD2_290c(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); diff --git a/examples/GxEPD2_SD_AVR_Example/GxEPD2_SD_AVR_Example.ino b/examples/GxEPD2_SD_AVR_Example/GxEPD2_SD_AVR_Example.ino index b0a5a56..d763b6f 100644 --- a/examples/GxEPD2_SD_AVR_Example/GxEPD2_SD_AVR_Example.ino +++ b/examples/GxEPD2_SD_AVR_Example/GxEPD2_SD_AVR_Example.ino @@ -13,7 +13,7 @@ // Supporting Arduino Forum Topics: // Waveshare e-paper displays with SPI: http://forum.arduino.cc/index.php?topic=487007.0 -// Good Dispay ePaper for Arduino : https://forum.arduino.cc/index.php?topic=436411.0 +// Good Display ePaper for Arduino : https://forum.arduino.cc/index.php?topic=436411.0 // mapping suggestion from Waveshare SPI e-Paper to Wemos D1 mini // BUSY -> D2, RST -> D4, DC -> D3, CS -> D8, CLK -> D5, DIN -> D7, GND -> GND, 3.3V -> 3.3V diff --git a/examples/GxEPD2_SD_Example/GxEPD2_SD_Example.ino b/examples/GxEPD2_SD_Example/GxEPD2_SD_Example.ino index 3eab67a..e793c19 100644 --- a/examples/GxEPD2_SD_Example/GxEPD2_SD_Example.ino +++ b/examples/GxEPD2_SD_Example/GxEPD2_SD_Example.ino @@ -13,7 +13,7 @@ // Supporting Arduino Forum Topics: // Waveshare e-paper displays with SPI: http://forum.arduino.cc/index.php?topic=487007.0 -// Good Dispay ePaper for Arduino : https://forum.arduino.cc/index.php?topic=436411.0 +// Good Display ePaper for Arduino : https://forum.arduino.cc/index.php?topic=436411.0 // mapping suggestion from Waveshare SPI e-Paper to Wemos D1 mini // BUSY -> D2, RST -> D4, DC -> D3, CS -> D8, CLK -> D5, DIN -> D7, GND -> GND, 3.3V -> 3.3V @@ -128,8 +128,8 @@ SdFat SD; #if defined(_BOARD_GENERIC_STM32F103C_H_) #define SD_CS 0 // adapt to your wiring #define EPD_CS SS // adapt to your wiring -#define MAX_DISPAY_BUFFER_SIZE 15000ul // ~15k is a good compromise -#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8)) +#define MAX_DISPLAY_BUFFER_SIZE 15000ul // ~15k is a good compromise +#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8)) // select one and adapt to your mapping //GxEPD2_BW display(GxEPD2_154(/*CS=4*/ EPD_CS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); //GxEPD2_BW display(GxEPD2_213(/*CS=4*/ EPD_CS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); @@ -138,7 +138,7 @@ SdFat SD; //GxEPD2_BW display(GxEPD2_420(/*CS=4*/ EPD_CS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); //GxEPD2_BW display(GxEPD2_750(/*CS=4*/ EPD_CS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // 3-color e-papers -#define MAX_HEIGHT_3C(EPD) (EPD::HEIGHT <= (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8) ? EPD::HEIGHT : (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8)) +#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 display(GxEPD2_154c(/*CS=4*/ EPD_CS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); //GxEPD2_3C display(GxEPD2_213c(/*CS=4*/ EPD_CS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); //GxEPD2_3C display(GxEPD2_290c(/*CS=4*/ EPD_CS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); diff --git a/examples/GxEPD2_Spiffs_Example/GxEPD2_Spiffs_Example.ino b/examples/GxEPD2_Spiffs_Example/GxEPD2_Spiffs_Example.ino index 6d42c81..c9f6d8b 100644 --- a/examples/GxEPD2_Spiffs_Example/GxEPD2_Spiffs_Example.ino +++ b/examples/GxEPD2_Spiffs_Example/GxEPD2_Spiffs_Example.ino @@ -13,7 +13,7 @@ // Supporting Arduino Forum Topics: // Waveshare e-paper displays with SPI: http://forum.arduino.cc/index.php?topic=487007.0 -// Good Dispay ePaper for Arduino : https://forum.arduino.cc/index.php?topic=436411.0 +// Good Display ePaper for Arduino : https://forum.arduino.cc/index.php?topic=436411.0 // mapping suggestion from Waveshare SPI e-Paper to Wemos D1 mini // BUSY -> D2, RST -> D4, DC -> D3, CS -> D8, CLK -> D5, DIN -> D7, GND -> GND, 3.3V -> 3.3V diff --git a/examples/GxEPD2_Spiffs_Loader/GxEPD2_Spiffs_Loader.ino b/examples/GxEPD2_Spiffs_Loader/GxEPD2_Spiffs_Loader.ino index 9c382cb..20467f0 100644 --- a/examples/GxEPD2_Spiffs_Loader/GxEPD2_Spiffs_Loader.ino +++ b/examples/GxEPD2_Spiffs_Loader/GxEPD2_Spiffs_Loader.ino @@ -11,7 +11,7 @@ // Supporting Arduino Forum Topics: // Waveshare e-paper displays with SPI: http://forum.arduino.cc/index.php?topic=487007.0 -// Good Dispay ePaper for Arduino : https://forum.arduino.cc/index.php?topic=436411.0 +// Good Display ePaper for Arduino : https://forum.arduino.cc/index.php?topic=436411.0 #if defined(ESP32) #include "SPIFFS.h" diff --git a/examples/GxEPD2_U8G2_Fonts_Example/GxEPD2_U8G2_Fonts_Example.ino b/examples/GxEPD2_U8G2_Fonts_Example/GxEPD2_U8G2_Fonts_Example.ino index 27a6025..e4aca3c 100644 --- a/examples/GxEPD2_U8G2_Fonts_Example/GxEPD2_U8G2_Fonts_Example.ino +++ b/examples/GxEPD2_U8G2_Fonts_Example/GxEPD2_U8G2_Fonts_Example.ino @@ -19,7 +19,7 @@ // Supporting Arduino Forum Topics: // Waveshare e-paper displays with SPI: http://forum.arduino.cc/index.php?topic=487007.0 -// Good Dispay ePaper for Arduino : https://forum.arduino.cc/index.php?topic=436411.0 +// Good Display ePaper for Arduino : https://forum.arduino.cc/index.php?topic=436411.0 // mapping suggestion from Waveshare SPI e-Paper to Wemos D1 mini // BUSY -> D2, RST -> D4, DC -> D3, CS -> D8, CLK -> D5, DIN -> D7, GND -> GND, 3.3V -> 3.3V @@ -110,8 +110,8 @@ #endif #if defined(_BOARD_GENERIC_STM32F103C_H_) -#define MAX_DISPAY_BUFFER_SIZE 15000ul // ~15k is a good compromise -#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8)) +#define MAX_DISPLAY_BUFFER_SIZE 15000ul // ~15k is a good compromise +#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8)) // select one and adapt to your mapping //GxEPD2_BW display(GxEPD2_154(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); //GxEPD2_BW display(GxEPD2_213(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); @@ -121,7 +121,7 @@ //GxEPD2_BW display(GxEPD2_583(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); //GxEPD2_BW display(GxEPD2_750(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // 3-color e-papers -#define MAX_HEIGHT_3C(EPD) (EPD::HEIGHT <= (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8) ? EPD::HEIGHT : (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8)) +#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 display(GxEPD2_154c(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); //GxEPD2_3C display(GxEPD2_213c(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); //GxEPD2_3C display(GxEPD2_290c(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); @@ -132,8 +132,8 @@ #endif #if defined(__AVR) -#define MAX_DISPAY_BUFFER_SIZE 800 // -#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8)) +#define MAX_DISPLAY_BUFFER_SIZE 800 // +#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8)) // select one and adapt to your mapping //GxEPD2_BW display(GxEPD2_154(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_BW display(GxEPD2_213(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); @@ -143,7 +143,7 @@ //GxEPD2_BW display(GxEPD2_583(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_BW display(GxEPD2_750(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // 3-color e-papers -#define MAX_HEIGHT_3C(EPD) (EPD::HEIGHT <= (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8) ? EPD::HEIGHT : (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8)) +#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 display(GxEPD2_154c(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_3C display(GxEPD2_213c(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_3C display(GxEPD2_290c(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); diff --git a/examples/GxEPD2_U8G2_Fonts_Example/GxEPD2_boards_added.h b/examples/GxEPD2_U8G2_Fonts_Example/GxEPD2_boards_added.h index c38a201..f0eef21 100644 --- a/examples/GxEPD2_U8G2_Fonts_Example/GxEPD2_boards_added.h +++ b/examples/GxEPD2_U8G2_Fonts_Example/GxEPD2_boards_added.h @@ -19,8 +19,8 @@ // SPI pins are on 6 pin 2x3 SPI header #if defined(ARDUINO_ARCH_SAM) -#define MAX_DISPAY_BUFFER_SIZE 15000ul // ~15k is a good compromise -#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8)) +#define MAX_DISPLAY_BUFFER_SIZE 15000ul // ~15k is a good compromise +#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8)) // select one and adapt to your mapping //GxEPD2_BW display(GxEPD2_154(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); GxEPD2_BW display(GxEPD2_213(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); @@ -30,7 +30,7 @@ GxEPD2_BW display(GxEPD2_213(/*CS=10*/ SS, / //GxEPD2_BW display(GxEPD2_583(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_BW display(GxEPD2_750(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // 3-color e-papers -#define MAX_HEIGHT_3C(EPD) (EPD::HEIGHT <= (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8) ? EPD::HEIGHT : (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8)) +#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 display(GxEPD2_154c(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_3C display(GxEPD2_213c(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_3C display(GxEPD2_290c(/*CS=10*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); @@ -47,8 +47,8 @@ GxEPD2_BW display(GxEPD2_213(/*CS=10*/ SS, / // BUSY -> 5, RST -> 6, DC -> 7, CS-> 4, CLK -> 9, DIN -> 8 #if defined(ARDUINO_ARCH_SAMD) -#define MAX_DISPAY_BUFFER_SIZE 15000ul // ~15k is a good compromise -#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPAY_BUFFER_SIZE / (EPD::WIDTH / 8)) +#define MAX_DISPLAY_BUFFER_SIZE 15000ul // ~15k is a good compromise +#define MAX_HEIGHT(EPD) (EPD::HEIGHT <= MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8) ? EPD::HEIGHT : MAX_DISPLAY_BUFFER_SIZE / (EPD::WIDTH / 8)) // select one and adapt to your mapping //GxEPD2_BW display(GxEPD2_154(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); GxEPD2_BW display(GxEPD2_213(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); @@ -58,7 +58,7 @@ GxEPD2_BW display(GxEPD2_213(/*CS=4*/ 4, /*D //GxEPD2_BW display(GxEPD2_583(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); //GxEPD2_BW display(GxEPD2_750(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // 3-color e-papers -#define MAX_HEIGHT_3C(EPD) (EPD::HEIGHT <= (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8) ? EPD::HEIGHT : (MAX_DISPAY_BUFFER_SIZE / 2) / (EPD::WIDTH / 8)) +#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 display(GxEPD2_154c(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); //GxEPD2_3C display(GxEPD2_213c(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); //GxEPD2_3C display(GxEPD2_290c(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); diff --git a/examples/GxEPD2_WS_ESP32_Driver/GxEPD2_WS_ESP32_Driver.ino b/examples/GxEPD2_WS_ESP32_Driver/GxEPD2_WS_ESP32_Driver.ino index 31b7204..8882ab7 100644 --- a/examples/GxEPD2_WS_ESP32_Driver/GxEPD2_WS_ESP32_Driver.ino +++ b/examples/GxEPD2_WS_ESP32_Driver/GxEPD2_WS_ESP32_Driver.ino @@ -14,7 +14,7 @@ // Supporting Arduino Forum Topics: // Waveshare e-paper displays with SPI: http://forum.arduino.cc/index.php?topic=487007.0 -// Good Dispay ePaper for Arduino: https://forum.arduino.cc/index.php?topic=436411.0 +// Good Display ePaper for Arduino: https://forum.arduino.cc/index.php?topic=436411.0 // mapping of Waveshare ESP32 Driver Board // BUSY -> 25, RST -> 26, DC -> 27, CS-> 15, CLK -> 13, DIN -> 14 diff --git a/examples/GxEPD2_WiFi_Example/GxEPD2_WiFi_Example.ino b/examples/GxEPD2_WiFi_Example/GxEPD2_WiFi_Example.ino index f53a75c..1b6045d 100644 --- a/examples/GxEPD2_WiFi_Example/GxEPD2_WiFi_Example.ino +++ b/examples/GxEPD2_WiFi_Example/GxEPD2_WiFi_Example.ino @@ -13,7 +13,7 @@ // Supporting Arduino Forum Topics: // Waveshare e-paper displays with SPI: http://forum.arduino.cc/index.php?topic=487007.0 -// Good Dispay ePaper for Arduino : https://forum.arduino.cc/index.php?topic=436411.0 +// Good Display ePaper for Arduino : https://forum.arduino.cc/index.php?topic=436411.0 // mapping suggestion from Waveshare SPI e-Paper to Wemos D1 mini // BUSY -> D2, RST -> D4, DC -> D3, CS -> D8, CLK -> D5, DIN -> D7, GND -> GND, 3.3V -> 3.3V diff --git a/extras/Particle/examples/GxEPD2_ParticleExample/src/GxEPD2_ParticleExample.ino b/extras/Particle/examples/GxEPD2_ParticleExample/src/GxEPD2_ParticleExample.ino index 5b38c23..bb0371c 100644 --- a/extras/Particle/examples/GxEPD2_ParticleExample/src/GxEPD2_ParticleExample.ino +++ b/extras/Particle/examples/GxEPD2_ParticleExample/src/GxEPD2_ParticleExample.ino @@ -14,7 +14,7 @@ // Supporting Arduino Forum Topics: // Waveshare e-paper displays with SPI: http://forum.arduino.cc/index.php?topic=487007.0 -// Good Dispay ePaper for Arduino: https://forum.arduino.cc/index.php?topic=436411.0 +// Good Display ePaper for Arduino: https://forum.arduino.cc/index.php?topic=436411.0 // mapping suggestion from Waveshare SPI e-Paper to Particle Photon // A5 MOSI diff --git a/extras/Particle/examples/GxEPD2_WiFi_ParticleExample/src/GxEPD2_WiFi_ParticleExample.ino b/extras/Particle/examples/GxEPD2_WiFi_ParticleExample/src/GxEPD2_WiFi_ParticleExample.ino index e3b3431..197bb2e 100644 --- a/extras/Particle/examples/GxEPD2_WiFi_ParticleExample/src/GxEPD2_WiFi_ParticleExample.ino +++ b/extras/Particle/examples/GxEPD2_WiFi_ParticleExample/src/GxEPD2_WiFi_ParticleExample.ino @@ -18,7 +18,7 @@ // Supporting Arduino Forum Topics: // Waveshare e-paper displays with SPI: http://forum.arduino.cc/index.php?topic=487007.0 -// Good Dispay ePaper for Arduino : https://forum.arduino.cc/index.php?topic=436411.0 +// Good Display ePaper for Arduino : https://forum.arduino.cc/index.php?topic=436411.0 // mapping suggestion from Waveshare SPI e-Paper to Particle Photon // A5 MOSI