diff --git a/README.md b/README.md index bb3808e..ffe440f 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,7 @@ - GDE0213B1 2.13" b/w - GDEH0213B72 2.13" b/w, replacement for GDE0213B1 - GDEH0213B73 2.13" b/w, new replacement for GDE0213B1, GDEH0213B72 +- GDEM0213B74 2.13" b/w - GDEW0213I5F 2.13" b/w flexible - GDEW0213T5D 2.13" b/w - GDEW0213M21 2.13" b/w DES @@ -96,12 +97,16 @@ #### other supported panels - ED060SCT 6" grey levels, on Waveshare e-Paper IT8951 Driver HAT - ED060KC1 6" grey levels, 1448x1072, on Waveshare e-Paper IT8951 Driver HAT +- ED078KC2 7.8" grey levels, 1872x1404, on Waveshare e-Paper IT8951 Driver HAT ### I can and will only support e-paper panels I have! - promotion panels from suppliers are welcome, to add support to GxEPD2 - donation panels from users are welcome, to add support to GxEPD2 -### Version 1.3.4 +### Version 1.3.5 +- added support for GDEM0213B74 122x250 b/w e-paper panel +- added support for ED078KC2, 7.8" grey levels, 1872x1404, on Waveshare e-Paper IT8951 Driver HAT +#### Version 1.3.4 - added support for GDEH116T91 960x640 b/w e-paper panel - GDEH116T91 has only full screen refresh, no wavetable for differential refresh yet - added support for processor Arduino Nano RP2040 Connect to the examples diff --git a/examples/GxEPD2_Example/GxEPD2_Example.ino b/examples/GxEPD2_Example/GxEPD2_Example.ino index 034647f..9aec3d8 100644 --- a/examples/GxEPD2_Example/GxEPD2_Example.ino +++ b/examples/GxEPD2_Example/GxEPD2_Example.ino @@ -1151,7 +1151,7 @@ void drawBitmaps800x480() void drawBitmaps800x600() { #if defined(ESP8266) || defined(ESP32) - if (display.epd2.panel == GxEPD2::ED060SCT) + if ((display.epd2.panel == GxEPD2::ED060SCT) || (display.epd2.panel == GxEPD2::ED060KC1) || (display.epd2.panel == GxEPD2::ED078KC2)) { // Serial.print("sizeof(WS_zoo_800x600) is "); Serial.println(sizeof(WS_zoo_800x600)); display.drawNative(WS_zoo_800x600, 0, 0, 0, 800, 600, false, false, true); diff --git a/examples/GxEPD2_Example/GxEPD2_display_selection.h b/examples/GxEPD2_Example/GxEPD2_display_selection.h index 1ac83b3..29202e3 100644 --- a/examples/GxEPD2_Example/GxEPD2_display_selection.h +++ b/examples/GxEPD2_Example/GxEPD2_display_selection.h @@ -23,6 +23,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4)); // GDEW0213T5D @@ -67,6 +68,7 @@ // note: 5V supply needs to be exact and strong; 5V pin of USB powered Wemos D1 mini doesn't work! //GxEPD2_BW display(GxEPD2_it60(/*CS=5*/ SS, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 4)); //GxEPD2_BW < GxEPD2_it60_1448x1072, GxEPD2_it60_1448x1072::HEIGHT / 8 > display(GxEPD2_it60_1448x1072(/*CS=5*/ SS, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 4)); +//GxEPD2_BW < GxEPD2_it78_1872x1404, GxEPD2_it78_1872x1404::HEIGHT / 8 > display(GxEPD2_it78_1872x1404(/*CS=5*/ SS, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 4)); // ***** for mapping of Waveshare e-Paper ESP8266 Driver Board ***** // select one , can use full buffer size (full HEIGHT) @@ -78,6 +80,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5)); // GDEW0213T5D @@ -128,6 +131,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // GDEW0213T5D @@ -170,6 +174,7 @@ // note: 5V supply needs to be exact and strong; 5V over diode from USB (e.g. Wemos D1 mini) doesn't work! //GxEPD2_BW display(GxEPD2_it60(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); //GxEPD2_BW < GxEPD2_it60_1448x1072, GxEPD2_it60_1448x1072::HEIGHT / 4 > display(GxEPD2_it60_1448x1072(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); +//GxEPD2_BW < GxEPD2_it78_1872x1404, GxEPD2_it78_1872x1404::HEIGHT / 8 > display(GxEPD2_it78_1872x1404(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // Waveshare 12.48 b/w SPI display board and frame or Good Display 12.48 b/w panel GDEW1248T3 // general constructor for use with all parameters, e.g. for Waveshare ESP32 driver board mounted on connection board @@ -191,6 +196,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // GDEW0213T5D @@ -246,6 +252,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213T5D @@ -298,6 +305,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEW0213T5D diff --git a/examples/GxEPD2_Example/GxEPD2_display_selection_added.h b/examples/GxEPD2_Example/GxEPD2_display_selection_added.h index c4d3229..001a2e5 100644 --- a/examples/GxEPD2_Example/GxEPD2_display_selection_added.h +++ b/examples/GxEPD2_Example/GxEPD2_display_selection_added.h @@ -30,6 +30,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213T5D @@ -70,6 +71,7 @@ // note: 5V supply needs to be exact and strong; 5V over diode from USB (e.g. Wemos D1 mini) doesn't work! //GxEPD2_BW display(GxEPD2_it60(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_BW display(GxEPD2_it60_1448x1072(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); +//GxEPD2_BW display(GxEPD2_it78_1872x1404(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); #endif // Arduino MKR1000 or MKRZERO @@ -90,6 +92,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // GDEW0213T5D @@ -130,6 +133,7 @@ // note: 5V supply needs to be exact and strong; 5V over diode from USB (e.g. Wemos D1 mini) doesn't work! //GxEPD2_BW display(GxEPD2_it60(/*CS=77*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); //GxEPD2_BW display(GxEPD2_it60_1448x1072(/*CS=77*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); +//GxEPD2_BW display(GxEPD2_it78_1872x1404(/*CS=77*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); #endif // mapping suggestion for ESP32, e.g. LOLIN32 D32 PRO @@ -146,6 +150,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); // GDEW0213T5D @@ -184,6 +189,7 @@ // note: 5V supply needs to be exact and strong; 5V over diode from USB (e.g. Wemos D1 mini) doesn't work! //GxEPD2_BW display(GxEPD2_it60(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); //GxEPD2_BW < GxEPD2_it60_1448x1072, GxEPD2_it60_1448x1072::HEIGHT / 4 > display(GxEPD2_it60_1448x1072(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); +//GxEPD2_BW < GxEPD2_it78_1872x1404, GxEPD2_it78_1872x1404::HEIGHT / 8 > display(GxEPD2_it78_1872x1404(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); #endif // mapping suggestion for ESP32, e.g. TTGO T8 ESP32-WROVER @@ -200,6 +206,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); // GDEW0213T5D @@ -238,6 +245,7 @@ // note: 5V supply needs to be exact and strong; 5V over diode from USB (e.g. Wemos D1 mini) doesn't work! //GxEPD2_BW display(GxEPD2_it60(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); //GxEPD2_BW < GxEPD2_it60_1448x1072, GxEPD2_it60_1448x1072::HEIGHT / 4 > display(GxEPD2_it60_1448x1072(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); +//GxEPD2_BW < GxEPD2_it78_1872x1404, GxEPD2_it78_1872x1404::HEIGHT / 8 > display(GxEPD2_it78_1872x1404(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); #endif // mapping of Waveshare e-Paper ESP8266 Driver Board, old version @@ -255,6 +263,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDEW0213T5D @@ -305,6 +314,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213T5D diff --git a/examples/GxEPD2_Example/GxEPD2_display_selection_new_style.h b/examples/GxEPD2_Example/GxEPD2_display_selection_new_style.h index b766736..0f6ff28 100644 --- a/examples/GxEPD2_Example/GxEPD2_display_selection_new_style.h +++ b/examples/GxEPD2_Example/GxEPD2_display_selection_new_style.h @@ -27,6 +27,7 @@ //#define GxEPD2_DRIVER_CLASS GxEPD2_213 // GDE0213B1 128x250, IL3895, phased out //#define GxEPD2_DRIVER_CLASS GxEPD2_213_B72 // GDEH0213B72 128x250, SSD1675A (IL3897) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_B73 // GDEH0213B73 128x250, SSD1675B +//#define GxEPD2_DRIVER_CLASS GxEPD2_213_B74 // GDEM0213B74 128x250, SSD1680 //#define GxEPD2_DRIVER_CLASS GxEPD2_213_flex // GDEW0213I5F 104x212, UC8151 (IL0373) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_M21 // GDEW0213M21 104x212, UC8151 (IL0373) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_T5D // GDEW0213T5D 104x212, UC8151D @@ -66,6 +67,7 @@ // grey levels parallel IF e-papers on Waveshare e-Paper IT8951 Driver HAT //#define GxEPD2_DRIVER_CLASS GxEPD2_it60 // ED060SCT 800x600 //#define GxEPD2_DRIVER_CLASS GxEPD2_it60_1448x1072 // ED060KC1 1448x1072 +//#define GxEPD2_DRIVER_CLASS GxEPD2_it78_1872x1404 // ED078KC2 1872x1404 // SS is usually used for CS. define here for easy change #ifndef EPD_CS @@ -187,6 +189,8 @@ GxEPD2_DISPLAY_CLASS displ #endif // adapt the constructor parameters to your wiring GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); +//GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // my Seed XIOA0 +//GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // my other Seed XIOA0 #endif #if defined(ARDUINO_ARCH_RP2040) diff --git a/examples/GxEPD2_Example/GxEPD2_selection_check.h b/examples/GxEPD2_Example/GxEPD2_selection_check.h index 018c569..67edec8 100644 --- a/examples/GxEPD2_Example/GxEPD2_selection_check.h +++ b/examples/GxEPD2_Example/GxEPD2_selection_check.h @@ -21,6 +21,7 @@ #define GxEPD2_213_IS_BW true #define GxEPD2_213_B72_IS_BW true #define GxEPD2_213_B73_IS_BW true +#define GxEPD2_213_B74_IS_BW true #define GxEPD2_213_flex_IS_BW true #define GxEPD2_213_M21_IS_BW true #define GxEPD2_213_T5D_IS_BW true diff --git a/examples/GxEPD2_GFX_Example/GxEPD2_display_selection.h b/examples/GxEPD2_GFX_Example/GxEPD2_display_selection.h index 1ac83b3..29202e3 100644 --- a/examples/GxEPD2_GFX_Example/GxEPD2_display_selection.h +++ b/examples/GxEPD2_GFX_Example/GxEPD2_display_selection.h @@ -23,6 +23,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4)); // GDEW0213T5D @@ -67,6 +68,7 @@ // note: 5V supply needs to be exact and strong; 5V pin of USB powered Wemos D1 mini doesn't work! //GxEPD2_BW display(GxEPD2_it60(/*CS=5*/ SS, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 4)); //GxEPD2_BW < GxEPD2_it60_1448x1072, GxEPD2_it60_1448x1072::HEIGHT / 8 > display(GxEPD2_it60_1448x1072(/*CS=5*/ SS, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 4)); +//GxEPD2_BW < GxEPD2_it78_1872x1404, GxEPD2_it78_1872x1404::HEIGHT / 8 > display(GxEPD2_it78_1872x1404(/*CS=5*/ SS, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 4)); // ***** for mapping of Waveshare e-Paper ESP8266 Driver Board ***** // select one , can use full buffer size (full HEIGHT) @@ -78,6 +80,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5)); // GDEW0213T5D @@ -128,6 +131,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // GDEW0213T5D @@ -170,6 +174,7 @@ // note: 5V supply needs to be exact and strong; 5V over diode from USB (e.g. Wemos D1 mini) doesn't work! //GxEPD2_BW display(GxEPD2_it60(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); //GxEPD2_BW < GxEPD2_it60_1448x1072, GxEPD2_it60_1448x1072::HEIGHT / 4 > display(GxEPD2_it60_1448x1072(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); +//GxEPD2_BW < GxEPD2_it78_1872x1404, GxEPD2_it78_1872x1404::HEIGHT / 8 > display(GxEPD2_it78_1872x1404(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // Waveshare 12.48 b/w SPI display board and frame or Good Display 12.48 b/w panel GDEW1248T3 // general constructor for use with all parameters, e.g. for Waveshare ESP32 driver board mounted on connection board @@ -191,6 +196,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // GDEW0213T5D @@ -246,6 +252,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213T5D @@ -298,6 +305,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEW0213T5D diff --git a/examples/GxEPD2_GFX_Example/GxEPD2_display_selection_added.h b/examples/GxEPD2_GFX_Example/GxEPD2_display_selection_added.h index c4d3229..001a2e5 100644 --- a/examples/GxEPD2_GFX_Example/GxEPD2_display_selection_added.h +++ b/examples/GxEPD2_GFX_Example/GxEPD2_display_selection_added.h @@ -30,6 +30,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213T5D @@ -70,6 +71,7 @@ // note: 5V supply needs to be exact and strong; 5V over diode from USB (e.g. Wemos D1 mini) doesn't work! //GxEPD2_BW display(GxEPD2_it60(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_BW display(GxEPD2_it60_1448x1072(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); +//GxEPD2_BW display(GxEPD2_it78_1872x1404(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); #endif // Arduino MKR1000 or MKRZERO @@ -90,6 +92,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // GDEW0213T5D @@ -130,6 +133,7 @@ // note: 5V supply needs to be exact and strong; 5V over diode from USB (e.g. Wemos D1 mini) doesn't work! //GxEPD2_BW display(GxEPD2_it60(/*CS=77*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); //GxEPD2_BW display(GxEPD2_it60_1448x1072(/*CS=77*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); +//GxEPD2_BW display(GxEPD2_it78_1872x1404(/*CS=77*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); #endif // mapping suggestion for ESP32, e.g. LOLIN32 D32 PRO @@ -146,6 +150,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); // GDEW0213T5D @@ -184,6 +189,7 @@ // note: 5V supply needs to be exact and strong; 5V over diode from USB (e.g. Wemos D1 mini) doesn't work! //GxEPD2_BW display(GxEPD2_it60(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); //GxEPD2_BW < GxEPD2_it60_1448x1072, GxEPD2_it60_1448x1072::HEIGHT / 4 > display(GxEPD2_it60_1448x1072(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); +//GxEPD2_BW < GxEPD2_it78_1872x1404, GxEPD2_it78_1872x1404::HEIGHT / 8 > display(GxEPD2_it78_1872x1404(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); #endif // mapping suggestion for ESP32, e.g. TTGO T8 ESP32-WROVER @@ -200,6 +206,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); // GDEW0213T5D @@ -238,6 +245,7 @@ // note: 5V supply needs to be exact and strong; 5V over diode from USB (e.g. Wemos D1 mini) doesn't work! //GxEPD2_BW display(GxEPD2_it60(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); //GxEPD2_BW < GxEPD2_it60_1448x1072, GxEPD2_it60_1448x1072::HEIGHT / 4 > display(GxEPD2_it60_1448x1072(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); +//GxEPD2_BW < GxEPD2_it78_1872x1404, GxEPD2_it78_1872x1404::HEIGHT / 8 > display(GxEPD2_it78_1872x1404(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); #endif // mapping of Waveshare e-Paper ESP8266 Driver Board, old version @@ -255,6 +263,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDEW0213T5D @@ -305,6 +314,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213T5D diff --git a/examples/GxEPD2_GFX_Example/GxEPD2_display_selection_new_style.h b/examples/GxEPD2_GFX_Example/GxEPD2_display_selection_new_style.h index b766736..0f6ff28 100644 --- a/examples/GxEPD2_GFX_Example/GxEPD2_display_selection_new_style.h +++ b/examples/GxEPD2_GFX_Example/GxEPD2_display_selection_new_style.h @@ -27,6 +27,7 @@ //#define GxEPD2_DRIVER_CLASS GxEPD2_213 // GDE0213B1 128x250, IL3895, phased out //#define GxEPD2_DRIVER_CLASS GxEPD2_213_B72 // GDEH0213B72 128x250, SSD1675A (IL3897) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_B73 // GDEH0213B73 128x250, SSD1675B +//#define GxEPD2_DRIVER_CLASS GxEPD2_213_B74 // GDEM0213B74 128x250, SSD1680 //#define GxEPD2_DRIVER_CLASS GxEPD2_213_flex // GDEW0213I5F 104x212, UC8151 (IL0373) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_M21 // GDEW0213M21 104x212, UC8151 (IL0373) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_T5D // GDEW0213T5D 104x212, UC8151D @@ -66,6 +67,7 @@ // grey levels parallel IF e-papers on Waveshare e-Paper IT8951 Driver HAT //#define GxEPD2_DRIVER_CLASS GxEPD2_it60 // ED060SCT 800x600 //#define GxEPD2_DRIVER_CLASS GxEPD2_it60_1448x1072 // ED060KC1 1448x1072 +//#define GxEPD2_DRIVER_CLASS GxEPD2_it78_1872x1404 // ED078KC2 1872x1404 // SS is usually used for CS. define here for easy change #ifndef EPD_CS @@ -187,6 +189,8 @@ GxEPD2_DISPLAY_CLASS displ #endif // adapt the constructor parameters to your wiring GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); +//GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // my Seed XIOA0 +//GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // my other Seed XIOA0 #endif #if defined(ARDUINO_ARCH_RP2040) diff --git a/examples/GxEPD2_GFX_Example/GxEPD2_selection_check.h b/examples/GxEPD2_GFX_Example/GxEPD2_selection_check.h index 018c569..67edec8 100644 --- a/examples/GxEPD2_GFX_Example/GxEPD2_selection_check.h +++ b/examples/GxEPD2_GFX_Example/GxEPD2_selection_check.h @@ -21,6 +21,7 @@ #define GxEPD2_213_IS_BW true #define GxEPD2_213_B72_IS_BW true #define GxEPD2_213_B73_IS_BW true +#define GxEPD2_213_B74_IS_BW true #define GxEPD2_213_flex_IS_BW true #define GxEPD2_213_M21_IS_BW true #define GxEPD2_213_T5D_IS_BW true diff --git a/examples/GxEPD2_HelloWorld/GxEPD2_display_selection.h b/examples/GxEPD2_HelloWorld/GxEPD2_display_selection.h index 1ac83b3..29202e3 100644 --- a/examples/GxEPD2_HelloWorld/GxEPD2_display_selection.h +++ b/examples/GxEPD2_HelloWorld/GxEPD2_display_selection.h @@ -23,6 +23,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=D8*/ SS, /*DC=D3*/ 0, /*RST=D4*/ 2, /*BUSY=D2*/ 4)); // GDEW0213T5D @@ -67,6 +68,7 @@ // note: 5V supply needs to be exact and strong; 5V pin of USB powered Wemos D1 mini doesn't work! //GxEPD2_BW display(GxEPD2_it60(/*CS=5*/ SS, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 4)); //GxEPD2_BW < GxEPD2_it60_1448x1072, GxEPD2_it60_1448x1072::HEIGHT / 8 > display(GxEPD2_it60_1448x1072(/*CS=5*/ SS, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 4)); +//GxEPD2_BW < GxEPD2_it78_1872x1404, GxEPD2_it78_1872x1404::HEIGHT / 8 > display(GxEPD2_it78_1872x1404(/*CS=5*/ SS, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 4)); // ***** for mapping of Waveshare e-Paper ESP8266 Driver Board ***** // select one , can use full buffer size (full HEIGHT) @@ -78,6 +80,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=2*/ 2, /*BUSY=5*/ 5)); // GDEW0213T5D @@ -128,6 +131,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // GDEW0213T5D @@ -170,6 +174,7 @@ // note: 5V supply needs to be exact and strong; 5V over diode from USB (e.g. Wemos D1 mini) doesn't work! //GxEPD2_BW display(GxEPD2_it60(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); //GxEPD2_BW < GxEPD2_it60_1448x1072, GxEPD2_it60_1448x1072::HEIGHT / 4 > display(GxEPD2_it60_1448x1072(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); +//GxEPD2_BW < GxEPD2_it78_1872x1404, GxEPD2_it78_1872x1404::HEIGHT / 8 > display(GxEPD2_it78_1872x1404(/*CS=5*/ SS, /*DC=*/ 17, /*RST=*/ 16, /*BUSY=*/ 4)); // Waveshare 12.48 b/w SPI display board and frame or Good Display 12.48 b/w panel GDEW1248T3 // general constructor for use with all parameters, e.g. for Waveshare ESP32 driver board mounted on connection board @@ -191,6 +196,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=4*/ SS, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // GDEW0213T5D @@ -246,6 +252,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213T5D @@ -298,6 +305,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // GDEW0213T5D diff --git a/examples/GxEPD2_HelloWorld/GxEPD2_display_selection_added.h b/examples/GxEPD2_HelloWorld/GxEPD2_display_selection_added.h index c4d3229..001a2e5 100644 --- a/examples/GxEPD2_HelloWorld/GxEPD2_display_selection_added.h +++ b/examples/GxEPD2_HelloWorld/GxEPD2_display_selection_added.h @@ -30,6 +30,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213T5D @@ -70,6 +71,7 @@ // note: 5V supply needs to be exact and strong; 5V over diode from USB (e.g. Wemos D1 mini) doesn't work! //GxEPD2_BW display(GxEPD2_it60(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); //GxEPD2_BW display(GxEPD2_it60_1448x1072(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); +//GxEPD2_BW display(GxEPD2_it78_1872x1404(/*CS=77*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); #endif // Arduino MKR1000 or MKRZERO @@ -90,6 +92,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); // GDEW0213T5D @@ -130,6 +133,7 @@ // note: 5V supply needs to be exact and strong; 5V over diode from USB (e.g. Wemos D1 mini) doesn't work! //GxEPD2_BW display(GxEPD2_it60(/*CS=77*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); //GxEPD2_BW display(GxEPD2_it60_1448x1072(/*CS=77*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); +//GxEPD2_BW display(GxEPD2_it78_1872x1404(/*CS=77*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); #endif // mapping suggestion for ESP32, e.g. LOLIN32 D32 PRO @@ -146,6 +150,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); // GDEW0213T5D @@ -184,6 +189,7 @@ // note: 5V supply needs to be exact and strong; 5V over diode from USB (e.g. Wemos D1 mini) doesn't work! //GxEPD2_BW display(GxEPD2_it60(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); //GxEPD2_BW < GxEPD2_it60_1448x1072, GxEPD2_it60_1448x1072::HEIGHT / 4 > display(GxEPD2_it60_1448x1072(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); +//GxEPD2_BW < GxEPD2_it78_1872x1404, GxEPD2_it78_1872x1404::HEIGHT / 8 > display(GxEPD2_it78_1872x1404(/*CS=5*/ 5, /*DC=*/ 0, /*RST=*/ 2, /*BUSY=*/ 15)); #endif // mapping suggestion for ESP32, e.g. TTGO T8 ESP32-WROVER @@ -200,6 +206,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); // GDEW0213T5D @@ -238,6 +245,7 @@ // note: 5V supply needs to be exact and strong; 5V over diode from USB (e.g. Wemos D1 mini) doesn't work! //GxEPD2_BW display(GxEPD2_it60(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); //GxEPD2_BW < GxEPD2_it60_1448x1072, GxEPD2_it60_1448x1072::HEIGHT / 4 > display(GxEPD2_it60_1448x1072(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); +//GxEPD2_BW < GxEPD2_it78_1872x1404, GxEPD2_it78_1872x1404::HEIGHT / 8 > display(GxEPD2_it78_1872x1404(/*CS=5*/ 5, /*DC=*/ 2, /*RST=*/ 0, /*BUSY=*/ 4)); #endif // mapping of Waveshare e-Paper ESP8266 Driver Board, old version @@ -255,6 +263,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=15*/ SS, /*DC=4*/ 4, /*RST=5*/ 5, /*BUSY=16*/ 16)); // GDEW0213T5D @@ -305,6 +314,7 @@ //GxEPD2_BW display(GxEPD2_213(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDE0213B1, phased out //GxEPD2_BW display(GxEPD2_213_B72(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEH0213B72 //GxEPD2_BW display(GxEPD2_213_B73(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEH0213B73 +//GxEPD2_BW display(GxEPD2_213_B74(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEM0213B74 //GxEPD2_BW display(GxEPD2_213_flex(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213I5F //GxEPD2_BW display(GxEPD2_213_M21(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213M21 //GxEPD2_BW display(GxEPD2_213_T5D(/*CS=*/ SS, /*DC=*/ 8, /*RST=*/ 9, /*BUSY=*/ 7)); // GDEW0213T5D diff --git a/examples/GxEPD2_HelloWorld/GxEPD2_display_selection_new_style.h b/examples/GxEPD2_HelloWorld/GxEPD2_display_selection_new_style.h index b766736..0f6ff28 100644 --- a/examples/GxEPD2_HelloWorld/GxEPD2_display_selection_new_style.h +++ b/examples/GxEPD2_HelloWorld/GxEPD2_display_selection_new_style.h @@ -27,6 +27,7 @@ //#define GxEPD2_DRIVER_CLASS GxEPD2_213 // GDE0213B1 128x250, IL3895, phased out //#define GxEPD2_DRIVER_CLASS GxEPD2_213_B72 // GDEH0213B72 128x250, SSD1675A (IL3897) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_B73 // GDEH0213B73 128x250, SSD1675B +//#define GxEPD2_DRIVER_CLASS GxEPD2_213_B74 // GDEM0213B74 128x250, SSD1680 //#define GxEPD2_DRIVER_CLASS GxEPD2_213_flex // GDEW0213I5F 104x212, UC8151 (IL0373) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_M21 // GDEW0213M21 104x212, UC8151 (IL0373) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_T5D // GDEW0213T5D 104x212, UC8151D @@ -66,6 +67,7 @@ // grey levels parallel IF e-papers on Waveshare e-Paper IT8951 Driver HAT //#define GxEPD2_DRIVER_CLASS GxEPD2_it60 // ED060SCT 800x600 //#define GxEPD2_DRIVER_CLASS GxEPD2_it60_1448x1072 // ED060KC1 1448x1072 +//#define GxEPD2_DRIVER_CLASS GxEPD2_it78_1872x1404 // ED078KC2 1872x1404 // SS is usually used for CS. define here for easy change #ifndef EPD_CS @@ -187,6 +189,8 @@ GxEPD2_DISPLAY_CLASS displ #endif // adapt the constructor parameters to your wiring GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); +//GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // my Seed XIOA0 +//GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // my other Seed XIOA0 #endif #if defined(ARDUINO_ARCH_RP2040) diff --git a/examples/GxEPD2_HelloWorld/GxEPD2_selection_check.h b/examples/GxEPD2_HelloWorld/GxEPD2_selection_check.h index 018c569..67edec8 100644 --- a/examples/GxEPD2_HelloWorld/GxEPD2_selection_check.h +++ b/examples/GxEPD2_HelloWorld/GxEPD2_selection_check.h @@ -21,6 +21,7 @@ #define GxEPD2_213_IS_BW true #define GxEPD2_213_B72_IS_BW true #define GxEPD2_213_B73_IS_BW true +#define GxEPD2_213_B74_IS_BW true #define GxEPD2_213_flex_IS_BW true #define GxEPD2_213_M21_IS_BW true #define GxEPD2_213_T5D_IS_BW true diff --git a/examples/GxEPD2_MinimumExample/GxEPD2_display_selection_new_style.h b/examples/GxEPD2_MinimumExample/GxEPD2_display_selection_new_style.h index b766736..0f6ff28 100644 --- a/examples/GxEPD2_MinimumExample/GxEPD2_display_selection_new_style.h +++ b/examples/GxEPD2_MinimumExample/GxEPD2_display_selection_new_style.h @@ -27,6 +27,7 @@ //#define GxEPD2_DRIVER_CLASS GxEPD2_213 // GDE0213B1 128x250, IL3895, phased out //#define GxEPD2_DRIVER_CLASS GxEPD2_213_B72 // GDEH0213B72 128x250, SSD1675A (IL3897) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_B73 // GDEH0213B73 128x250, SSD1675B +//#define GxEPD2_DRIVER_CLASS GxEPD2_213_B74 // GDEM0213B74 128x250, SSD1680 //#define GxEPD2_DRIVER_CLASS GxEPD2_213_flex // GDEW0213I5F 104x212, UC8151 (IL0373) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_M21 // GDEW0213M21 104x212, UC8151 (IL0373) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_T5D // GDEW0213T5D 104x212, UC8151D @@ -66,6 +67,7 @@ // grey levels parallel IF e-papers on Waveshare e-Paper IT8951 Driver HAT //#define GxEPD2_DRIVER_CLASS GxEPD2_it60 // ED060SCT 800x600 //#define GxEPD2_DRIVER_CLASS GxEPD2_it60_1448x1072 // ED060KC1 1448x1072 +//#define GxEPD2_DRIVER_CLASS GxEPD2_it78_1872x1404 // ED078KC2 1872x1404 // SS is usually used for CS. define here for easy change #ifndef EPD_CS @@ -187,6 +189,8 @@ GxEPD2_DISPLAY_CLASS displ #endif // adapt the constructor parameters to your wiring GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); +//GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // my Seed XIOA0 +//GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // my other Seed XIOA0 #endif #if defined(ARDUINO_ARCH_RP2040) diff --git a/examples/GxEPD2_MinimumExample/GxEPD2_selection_check.h b/examples/GxEPD2_MinimumExample/GxEPD2_selection_check.h index 018c569..67edec8 100644 --- a/examples/GxEPD2_MinimumExample/GxEPD2_selection_check.h +++ b/examples/GxEPD2_MinimumExample/GxEPD2_selection_check.h @@ -21,6 +21,7 @@ #define GxEPD2_213_IS_BW true #define GxEPD2_213_B72_IS_BW true #define GxEPD2_213_B73_IS_BW true +#define GxEPD2_213_B74_IS_BW true #define GxEPD2_213_flex_IS_BW true #define GxEPD2_213_M21_IS_BW true #define GxEPD2_213_T5D_IS_BW true diff --git a/examples/GxEPD2_NotPagedExample/GxEPD2_display_selection_new_style.h b/examples/GxEPD2_NotPagedExample/GxEPD2_display_selection_new_style.h index b766736..0f6ff28 100644 --- a/examples/GxEPD2_NotPagedExample/GxEPD2_display_selection_new_style.h +++ b/examples/GxEPD2_NotPagedExample/GxEPD2_display_selection_new_style.h @@ -27,6 +27,7 @@ //#define GxEPD2_DRIVER_CLASS GxEPD2_213 // GDE0213B1 128x250, IL3895, phased out //#define GxEPD2_DRIVER_CLASS GxEPD2_213_B72 // GDEH0213B72 128x250, SSD1675A (IL3897) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_B73 // GDEH0213B73 128x250, SSD1675B +//#define GxEPD2_DRIVER_CLASS GxEPD2_213_B74 // GDEM0213B74 128x250, SSD1680 //#define GxEPD2_DRIVER_CLASS GxEPD2_213_flex // GDEW0213I5F 104x212, UC8151 (IL0373) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_M21 // GDEW0213M21 104x212, UC8151 (IL0373) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_T5D // GDEW0213T5D 104x212, UC8151D @@ -66,6 +67,7 @@ // grey levels parallel IF e-papers on Waveshare e-Paper IT8951 Driver HAT //#define GxEPD2_DRIVER_CLASS GxEPD2_it60 // ED060SCT 800x600 //#define GxEPD2_DRIVER_CLASS GxEPD2_it60_1448x1072 // ED060KC1 1448x1072 +//#define GxEPD2_DRIVER_CLASS GxEPD2_it78_1872x1404 // ED078KC2 1872x1404 // SS is usually used for CS. define here for easy change #ifndef EPD_CS @@ -187,6 +189,8 @@ GxEPD2_DISPLAY_CLASS displ #endif // adapt the constructor parameters to your wiring GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); +//GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // my Seed XIOA0 +//GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // my other Seed XIOA0 #endif #if defined(ARDUINO_ARCH_RP2040) diff --git a/examples/GxEPD2_NotPagedExample/GxEPD2_selection_check.h b/examples/GxEPD2_NotPagedExample/GxEPD2_selection_check.h index 018c569..67edec8 100644 --- a/examples/GxEPD2_NotPagedExample/GxEPD2_selection_check.h +++ b/examples/GxEPD2_NotPagedExample/GxEPD2_selection_check.h @@ -21,6 +21,7 @@ #define GxEPD2_213_IS_BW true #define GxEPD2_213_B72_IS_BW true #define GxEPD2_213_B73_IS_BW true +#define GxEPD2_213_B74_IS_BW true #define GxEPD2_213_flex_IS_BW true #define GxEPD2_213_M21_IS_BW true #define GxEPD2_213_T5D_IS_BW true diff --git a/examples/GxEPD2_PagedDisplayUsingCallback/GxEPD2_display_selection_new_style.h b/examples/GxEPD2_PagedDisplayUsingCallback/GxEPD2_display_selection_new_style.h index b766736..0f6ff28 100644 --- a/examples/GxEPD2_PagedDisplayUsingCallback/GxEPD2_display_selection_new_style.h +++ b/examples/GxEPD2_PagedDisplayUsingCallback/GxEPD2_display_selection_new_style.h @@ -27,6 +27,7 @@ //#define GxEPD2_DRIVER_CLASS GxEPD2_213 // GDE0213B1 128x250, IL3895, phased out //#define GxEPD2_DRIVER_CLASS GxEPD2_213_B72 // GDEH0213B72 128x250, SSD1675A (IL3897) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_B73 // GDEH0213B73 128x250, SSD1675B +//#define GxEPD2_DRIVER_CLASS GxEPD2_213_B74 // GDEM0213B74 128x250, SSD1680 //#define GxEPD2_DRIVER_CLASS GxEPD2_213_flex // GDEW0213I5F 104x212, UC8151 (IL0373) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_M21 // GDEW0213M21 104x212, UC8151 (IL0373) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_T5D // GDEW0213T5D 104x212, UC8151D @@ -66,6 +67,7 @@ // grey levels parallel IF e-papers on Waveshare e-Paper IT8951 Driver HAT //#define GxEPD2_DRIVER_CLASS GxEPD2_it60 // ED060SCT 800x600 //#define GxEPD2_DRIVER_CLASS GxEPD2_it60_1448x1072 // ED060KC1 1448x1072 +//#define GxEPD2_DRIVER_CLASS GxEPD2_it78_1872x1404 // ED078KC2 1872x1404 // SS is usually used for CS. define here for easy change #ifndef EPD_CS @@ -187,6 +189,8 @@ GxEPD2_DISPLAY_CLASS displ #endif // adapt the constructor parameters to your wiring GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); +//GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // my Seed XIOA0 +//GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // my other Seed XIOA0 #endif #if defined(ARDUINO_ARCH_RP2040) diff --git a/examples/GxEPD2_PagedDisplayUsingCallback/GxEPD2_selection_check.h b/examples/GxEPD2_PagedDisplayUsingCallback/GxEPD2_selection_check.h index 018c569..67edec8 100644 --- a/examples/GxEPD2_PagedDisplayUsingCallback/GxEPD2_selection_check.h +++ b/examples/GxEPD2_PagedDisplayUsingCallback/GxEPD2_selection_check.h @@ -21,6 +21,7 @@ #define GxEPD2_213_IS_BW true #define GxEPD2_213_B72_IS_BW true #define GxEPD2_213_B73_IS_BW true +#define GxEPD2_213_B74_IS_BW true #define GxEPD2_213_flex_IS_BW true #define GxEPD2_213_M21_IS_BW true #define GxEPD2_213_T5D_IS_BW true diff --git a/examples/GxEPD2_SD_Example/GxEPD2_display_selection_new_style.h b/examples/GxEPD2_SD_Example/GxEPD2_display_selection_new_style.h index b766736..0f6ff28 100644 --- a/examples/GxEPD2_SD_Example/GxEPD2_display_selection_new_style.h +++ b/examples/GxEPD2_SD_Example/GxEPD2_display_selection_new_style.h @@ -27,6 +27,7 @@ //#define GxEPD2_DRIVER_CLASS GxEPD2_213 // GDE0213B1 128x250, IL3895, phased out //#define GxEPD2_DRIVER_CLASS GxEPD2_213_B72 // GDEH0213B72 128x250, SSD1675A (IL3897) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_B73 // GDEH0213B73 128x250, SSD1675B +//#define GxEPD2_DRIVER_CLASS GxEPD2_213_B74 // GDEM0213B74 128x250, SSD1680 //#define GxEPD2_DRIVER_CLASS GxEPD2_213_flex // GDEW0213I5F 104x212, UC8151 (IL0373) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_M21 // GDEW0213M21 104x212, UC8151 (IL0373) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_T5D // GDEW0213T5D 104x212, UC8151D @@ -66,6 +67,7 @@ // grey levels parallel IF e-papers on Waveshare e-Paper IT8951 Driver HAT //#define GxEPD2_DRIVER_CLASS GxEPD2_it60 // ED060SCT 800x600 //#define GxEPD2_DRIVER_CLASS GxEPD2_it60_1448x1072 // ED060KC1 1448x1072 +//#define GxEPD2_DRIVER_CLASS GxEPD2_it78_1872x1404 // ED078KC2 1872x1404 // SS is usually used for CS. define here for easy change #ifndef EPD_CS @@ -187,6 +189,8 @@ GxEPD2_DISPLAY_CLASS displ #endif // adapt the constructor parameters to your wiring GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); +//GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // my Seed XIOA0 +//GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // my other Seed XIOA0 #endif #if defined(ARDUINO_ARCH_RP2040) diff --git a/examples/GxEPD2_SD_Example/GxEPD2_selection_check.h b/examples/GxEPD2_SD_Example/GxEPD2_selection_check.h index 018c569..67edec8 100644 --- a/examples/GxEPD2_SD_Example/GxEPD2_selection_check.h +++ b/examples/GxEPD2_SD_Example/GxEPD2_selection_check.h @@ -21,6 +21,7 @@ #define GxEPD2_213_IS_BW true #define GxEPD2_213_B72_IS_BW true #define GxEPD2_213_B73_IS_BW true +#define GxEPD2_213_B74_IS_BW true #define GxEPD2_213_flex_IS_BW true #define GxEPD2_213_M21_IS_BW true #define GxEPD2_213_T5D_IS_BW true diff --git a/examples/GxEPD2_SerialFlash_Example/GxEPD2_display_selection_new_style.h b/examples/GxEPD2_SerialFlash_Example/GxEPD2_display_selection_new_style.h index b766736..0f6ff28 100644 --- a/examples/GxEPD2_SerialFlash_Example/GxEPD2_display_selection_new_style.h +++ b/examples/GxEPD2_SerialFlash_Example/GxEPD2_display_selection_new_style.h @@ -27,6 +27,7 @@ //#define GxEPD2_DRIVER_CLASS GxEPD2_213 // GDE0213B1 128x250, IL3895, phased out //#define GxEPD2_DRIVER_CLASS GxEPD2_213_B72 // GDEH0213B72 128x250, SSD1675A (IL3897) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_B73 // GDEH0213B73 128x250, SSD1675B +//#define GxEPD2_DRIVER_CLASS GxEPD2_213_B74 // GDEM0213B74 128x250, SSD1680 //#define GxEPD2_DRIVER_CLASS GxEPD2_213_flex // GDEW0213I5F 104x212, UC8151 (IL0373) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_M21 // GDEW0213M21 104x212, UC8151 (IL0373) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_T5D // GDEW0213T5D 104x212, UC8151D @@ -66,6 +67,7 @@ // grey levels parallel IF e-papers on Waveshare e-Paper IT8951 Driver HAT //#define GxEPD2_DRIVER_CLASS GxEPD2_it60 // ED060SCT 800x600 //#define GxEPD2_DRIVER_CLASS GxEPD2_it60_1448x1072 // ED060KC1 1448x1072 +//#define GxEPD2_DRIVER_CLASS GxEPD2_it78_1872x1404 // ED078KC2 1872x1404 // SS is usually used for CS. define here for easy change #ifndef EPD_CS @@ -187,6 +189,8 @@ GxEPD2_DISPLAY_CLASS displ #endif // adapt the constructor parameters to your wiring GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); +//GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // my Seed XIOA0 +//GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // my other Seed XIOA0 #endif #if defined(ARDUINO_ARCH_RP2040) diff --git a/examples/GxEPD2_SerialFlash_Example/GxEPD2_selection_check.h b/examples/GxEPD2_SerialFlash_Example/GxEPD2_selection_check.h index 018c569..67edec8 100644 --- a/examples/GxEPD2_SerialFlash_Example/GxEPD2_selection_check.h +++ b/examples/GxEPD2_SerialFlash_Example/GxEPD2_selection_check.h @@ -21,6 +21,7 @@ #define GxEPD2_213_IS_BW true #define GxEPD2_213_B72_IS_BW true #define GxEPD2_213_B73_IS_BW true +#define GxEPD2_213_B74_IS_BW true #define GxEPD2_213_flex_IS_BW true #define GxEPD2_213_M21_IS_BW true #define GxEPD2_213_T5D_IS_BW true diff --git a/examples/GxEPD2_Spiffs_Example/GxEPD2_display_selection_new_style.h b/examples/GxEPD2_Spiffs_Example/GxEPD2_display_selection_new_style.h index b766736..0f6ff28 100644 --- a/examples/GxEPD2_Spiffs_Example/GxEPD2_display_selection_new_style.h +++ b/examples/GxEPD2_Spiffs_Example/GxEPD2_display_selection_new_style.h @@ -27,6 +27,7 @@ //#define GxEPD2_DRIVER_CLASS GxEPD2_213 // GDE0213B1 128x250, IL3895, phased out //#define GxEPD2_DRIVER_CLASS GxEPD2_213_B72 // GDEH0213B72 128x250, SSD1675A (IL3897) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_B73 // GDEH0213B73 128x250, SSD1675B +//#define GxEPD2_DRIVER_CLASS GxEPD2_213_B74 // GDEM0213B74 128x250, SSD1680 //#define GxEPD2_DRIVER_CLASS GxEPD2_213_flex // GDEW0213I5F 104x212, UC8151 (IL0373) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_M21 // GDEW0213M21 104x212, UC8151 (IL0373) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_T5D // GDEW0213T5D 104x212, UC8151D @@ -66,6 +67,7 @@ // grey levels parallel IF e-papers on Waveshare e-Paper IT8951 Driver HAT //#define GxEPD2_DRIVER_CLASS GxEPD2_it60 // ED060SCT 800x600 //#define GxEPD2_DRIVER_CLASS GxEPD2_it60_1448x1072 // ED060KC1 1448x1072 +//#define GxEPD2_DRIVER_CLASS GxEPD2_it78_1872x1404 // ED078KC2 1872x1404 // SS is usually used for CS. define here for easy change #ifndef EPD_CS @@ -187,6 +189,8 @@ GxEPD2_DISPLAY_CLASS displ #endif // adapt the constructor parameters to your wiring GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); +//GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // my Seed XIOA0 +//GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // my other Seed XIOA0 #endif #if defined(ARDUINO_ARCH_RP2040) diff --git a/examples/GxEPD2_Spiffs_Example/GxEPD2_selection_check.h b/examples/GxEPD2_Spiffs_Example/GxEPD2_selection_check.h index 018c569..67edec8 100644 --- a/examples/GxEPD2_Spiffs_Example/GxEPD2_selection_check.h +++ b/examples/GxEPD2_Spiffs_Example/GxEPD2_selection_check.h @@ -21,6 +21,7 @@ #define GxEPD2_213_IS_BW true #define GxEPD2_213_B72_IS_BW true #define GxEPD2_213_B73_IS_BW true +#define GxEPD2_213_B74_IS_BW true #define GxEPD2_213_flex_IS_BW true #define GxEPD2_213_M21_IS_BW true #define GxEPD2_213_T5D_IS_BW true diff --git a/examples/GxEPD2_U8G2_Fonts_Example/GxEPD2_display_selection_new_style.h b/examples/GxEPD2_U8G2_Fonts_Example/GxEPD2_display_selection_new_style.h index b766736..0f6ff28 100644 --- a/examples/GxEPD2_U8G2_Fonts_Example/GxEPD2_display_selection_new_style.h +++ b/examples/GxEPD2_U8G2_Fonts_Example/GxEPD2_display_selection_new_style.h @@ -27,6 +27,7 @@ //#define GxEPD2_DRIVER_CLASS GxEPD2_213 // GDE0213B1 128x250, IL3895, phased out //#define GxEPD2_DRIVER_CLASS GxEPD2_213_B72 // GDEH0213B72 128x250, SSD1675A (IL3897) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_B73 // GDEH0213B73 128x250, SSD1675B +//#define GxEPD2_DRIVER_CLASS GxEPD2_213_B74 // GDEM0213B74 128x250, SSD1680 //#define GxEPD2_DRIVER_CLASS GxEPD2_213_flex // GDEW0213I5F 104x212, UC8151 (IL0373) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_M21 // GDEW0213M21 104x212, UC8151 (IL0373) //#define GxEPD2_DRIVER_CLASS GxEPD2_213_T5D // GDEW0213T5D 104x212, UC8151D @@ -66,6 +67,7 @@ // grey levels parallel IF e-papers on Waveshare e-Paper IT8951 Driver HAT //#define GxEPD2_DRIVER_CLASS GxEPD2_it60 // ED060SCT 800x600 //#define GxEPD2_DRIVER_CLASS GxEPD2_it60_1448x1072 // ED060KC1 1448x1072 +//#define GxEPD2_DRIVER_CLASS GxEPD2_it78_1872x1404 // ED078KC2 1872x1404 // SS is usually used for CS. define here for easy change #ifndef EPD_CS @@ -187,6 +189,8 @@ GxEPD2_DISPLAY_CLASS displ #endif // adapt the constructor parameters to your wiring GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 7, /*RST=*/ 6, /*BUSY=*/ 5)); +//GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 4, /*DC=*/ 3, /*RST=*/ 2, /*BUSY=*/ 1)); // my Seed XIOA0 +//GxEPD2_DISPLAY_CLASS display(GxEPD2_DRIVER_CLASS(/*CS=4*/ 3, /*DC=*/ 2, /*RST=*/ 1, /*BUSY=*/ 0)); // my other Seed XIOA0 #endif #if defined(ARDUINO_ARCH_RP2040) diff --git a/examples/GxEPD2_U8G2_Fonts_Example/GxEPD2_selection_check.h b/examples/GxEPD2_U8G2_Fonts_Example/GxEPD2_selection_check.h index 018c569..67edec8 100644 --- a/examples/GxEPD2_U8G2_Fonts_Example/GxEPD2_selection_check.h +++ b/examples/GxEPD2_U8G2_Fonts_Example/GxEPD2_selection_check.h @@ -21,6 +21,7 @@ #define GxEPD2_213_IS_BW true #define GxEPD2_213_B72_IS_BW true #define GxEPD2_213_B73_IS_BW true +#define GxEPD2_213_B74_IS_BW true #define GxEPD2_213_flex_IS_BW true #define GxEPD2_213_M21_IS_BW true #define GxEPD2_213_T5D_IS_BW true diff --git a/library.properties b/library.properties index e66438d..ca9fccd 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=GxEPD2 -version=1.3.4 +version=1.3.5 author=Jean-Marc Zingg maintainer=Jean-Marc Zingg sentence=Arduino Display Library for SPI E-Paper displays from Dalian Good Display and Waveshare. @@ -8,5 +8,3 @@ category=Display url=https://github.com/ZinggJM/GxEPD2 architectures=* depends=Adafruit GFX Library -#next line is for support of Particle development environment, ignored by Arduino IDE -dependencies.Adafruit_GFX_RK=1.3.5 diff --git a/src/GxEPD2.h b/src/GxEPD2.h index 54e3754..2d91c5e 100644 --- a/src/GxEPD2.h +++ b/src/GxEPD2.h @@ -43,6 +43,7 @@ class GxEPD2 GDE0213B1, Waveshare_2_13_bw = GDE0213B1, GDEH0213B72, Waveshare_2_13_bw_B72 = GDEH0213B72, GDEH0213B73, Waveshare_2_13_bw_B73 = GDEH0213B73, + GDEM0213B74, GDEW0213I5F, Waveshare_2_13_flex = GDEW0213I5F, GDEW0213M21, GDEW0213T5D, @@ -65,6 +66,7 @@ class GxEPD2 GDEW1248T3, Waveshare_12_24_bw = GDEW1248T3, ED060SCT, // on Waveshare IT8951 Driver HAT ED060KC1, // on Waveshare IT8951 Driver HAT 1448x1072 + ED078KC2, // on Waveshare IT8951 Driver HAT 1872x1404 // 3-color GDEW0154Z04, Waveshare_1_54_bwr = GDEW0154Z04, GDEH0154Z90, Waveshare_1_54_bwr_Z90 = GDEH0154Z90, diff --git a/src/GxEPD2_BW.h b/src/GxEPD2_BW.h index 286b8df..2754250 100644 --- a/src/GxEPD2_BW.h +++ b/src/GxEPD2_BW.h @@ -39,6 +39,7 @@ #include "epd/GxEPD2_213.h" #include "epd/GxEPD2_213_B72.h" #include "epd/GxEPD2_213_B73.h" +#include "epd/GxEPD2_213_B74.h" #include "epd/GxEPD2_213_flex.h" #include "epd/GxEPD2_213_M21.h" #include "epd/GxEPD2_213_T5D.h" @@ -61,6 +62,7 @@ #include "epd/GxEPD2_1248.h" #include "it8951/GxEPD2_it60.h" #include "it8951/GxEPD2_it60_1448x1072.h" +#include "it8951/GxEPD2_it78_1872x1404.h" template class GxEPD2_BW : public GxEPD2_GFX_BASE_CLASS diff --git a/src/epd/GxEPD2_213_B74.cpp b/src/epd/GxEPD2_213_B74.cpp new file mode 100644 index 0000000..32e6c15 --- /dev/null +++ b/src/epd/GxEPD2_213_B74.cpp @@ -0,0 +1,377 @@ +// Display Library for SPI e-paper panels from Dalian Good Display and boards from Waveshare. +// Requires HW SPI and Adafruit_GFX. Caution: the e-paper panels require 3.3V supply AND data lines! +// +// based on Demo Example from Good Display, available here: http://www.e-paper-display.com/download_detail/downloadsId=806.html +// Panel: GDEM0213B74 : https://www.good-display.com/product/375.html +// Controller : SSD1680 : https://www.good-display.com/companyfile/101.html +// +// Author: Jean-Marc Zingg +// +// Version: see library.properties +// +// Library: https://github.com/ZinggJM/GxEPD2 + +#include "GxEPD2_213_B74.h" + +GxEPD2_213_B74::GxEPD2_213_B74(int8_t cs, int8_t dc, int8_t rst, int8_t busy) : + GxEPD2_EPD(cs, dc, rst, busy, HIGH, 10000000, WIDTH, HEIGHT, panel, hasColor, hasPartialUpdate, hasFastPartialUpdate) +{ +} + +void GxEPD2_213_B74::clearScreen(uint8_t value) +{ + writeScreenBuffer(value); + refresh(true); + writeScreenBufferAgain(value); +} + +void GxEPD2_213_B74::writeScreenBuffer(uint8_t value) +{ + if (!_using_partial_mode) _Init_Part(); + if (_initial_write) _writeScreenBuffer(0x26, value); // set previous + _writeScreenBuffer(0x24, value); // set current + _initial_write = false; // initial full screen buffer clean done +} + +void GxEPD2_213_B74::writeScreenBufferAgain(uint8_t value) +{ + if (!_using_partial_mode) _Init_Part(); + _writeScreenBuffer(0x24, value); // set current +} + +void GxEPD2_213_B74::_writeScreenBuffer(uint8_t command, uint8_t value) +{ + _writeCommand(command); + for (uint32_t i = 0; i < uint32_t(WIDTH) * uint32_t(HEIGHT) / 8; i++) + { + _writeData(value); + } +} + +void GxEPD2_213_B74::writeImage(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + _writeImage(0x24, bitmap, x, y, w, h, invert, mirror_y, pgm); +} + +void GxEPD2_213_B74::writeImageForFullRefresh(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + _writeImage(0x26, bitmap, x, y, w, h, invert, mirror_y, pgm); + _writeImage(0x24, bitmap, x, y, w, h, invert, mirror_y, pgm); +} + + +void GxEPD2_213_B74::writeImageAgain(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + _writeImage(0x24, bitmap, x, y, w, h, invert, mirror_y, pgm); +} + +void GxEPD2_213_B74::_writeImage(uint8_t command, const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + if (_initial_write) writeScreenBuffer(); // initial full screen buffer clean + delay(1); // yield() to avoid WDT on ESP8266 and ESP32 + int16_t wb = (w + 7) / 8; // width bytes, bitmaps are padded + x -= x % 8; // byte boundary + w = wb * 8; // byte boundary + int16_t x1 = x < 0 ? 0 : x; // limit + int16_t y1 = y < 0 ? 0 : y; // limit + int16_t w1 = x + w < int16_t(WIDTH) ? w : int16_t(WIDTH) - x; // limit + int16_t h1 = y + h < int16_t(HEIGHT) ? h : int16_t(HEIGHT) - y; // limit + int16_t dx = x1 - x; + int16_t dy = y1 - y; + w1 -= dx; + h1 -= dy; + if ((w1 <= 0) || (h1 <= 0)) return; + if (!_using_partial_mode) _Init_Part(); + _setPartialRamArea(x1, y1, w1, h1); + _writeCommand(command); + for (int16_t i = 0; i < h1; i++) + { + for (int16_t j = 0; j < w1 / 8; j++) + { + uint8_t data; + // use wb, h of bitmap for index! + int16_t idx = mirror_y ? j + dx / 8 + ((h - 1 - (i + dy))) * wb : j + dx / 8 + (i + dy) * wb; + if (pgm) + { +#if defined(__AVR) || defined(ESP8266) || defined(ESP32) + data = pgm_read_byte(&bitmap[idx]); +#else + data = bitmap[idx]; +#endif + } + else + { + data = bitmap[idx]; + } + if (invert) data = ~data; + _writeData(data); + } + } + delay(1); // yield() to avoid WDT on ESP8266 and ESP32 +} + +void GxEPD2_213_B74::writeImagePart(const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, + int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + _writeImagePart(0x24, bitmap, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm); +} + +void GxEPD2_213_B74::writeImagePartAgain(const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, + int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + _writeImagePart(0x24, bitmap, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm); +} + +void GxEPD2_213_B74::_writeImagePart(uint8_t command, const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, + int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + if (_initial_write) writeScreenBuffer(); // initial full screen buffer clean + delay(1); // yield() to avoid WDT on ESP8266 and ESP32 + if ((w_bitmap < 0) || (h_bitmap < 0) || (w < 0) || (h < 0)) return; + if ((x_part < 0) || (x_part >= w_bitmap)) return; + if ((y_part < 0) || (y_part >= h_bitmap)) return; + int16_t wb_bitmap = (w_bitmap + 7) / 8; // width bytes, bitmaps are padded + x_part -= x_part % 8; // byte boundary + w = w_bitmap - x_part < w ? w_bitmap - x_part : w; // limit + h = h_bitmap - y_part < h ? h_bitmap - y_part : h; // limit + x -= x % 8; // byte boundary + w = 8 * ((w + 7) / 8); // byte boundary, bitmaps are padded + int16_t x1 = x < 0 ? 0 : x; // limit + int16_t y1 = y < 0 ? 0 : y; // limit + int16_t w1 = x + w < int16_t(WIDTH) ? w : int16_t(WIDTH) - x; // limit + int16_t h1 = y + h < int16_t(HEIGHT) ? h : int16_t(HEIGHT) - y; // limit + int16_t dx = x1 - x; + int16_t dy = y1 - y; + w1 -= dx; + h1 -= dy; + if ((w1 <= 0) || (h1 <= 0)) return; + if (!_using_partial_mode) _Init_Part(); + _setPartialRamArea(x1, y1, w1, h1); + _writeCommand(command); + for (int16_t i = 0; i < h1; i++) + { + for (int16_t j = 0; j < w1 / 8; j++) + { + uint8_t data; + // 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; + if (pgm) + { +#if defined(__AVR) || defined(ESP8266) || defined(ESP32) + data = pgm_read_byte(&bitmap[idx]); +#else + data = bitmap[idx]; +#endif + } + else + { + data = bitmap[idx]; + } + if (invert) data = ~data; + _writeData(data); + } + } + delay(1); // yield() to avoid WDT on ESP8266 and ESP32 +} + +void GxEPD2_213_B74::writeImage(const uint8_t* black, const uint8_t* color, int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + if (black) + { + writeImage(black, x, y, w, h, invert, mirror_y, pgm); + } +} + +void GxEPD2_213_B74::writeImagePart(const uint8_t* black, const uint8_t* color, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, + int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + if (black) + { + writeImagePart(black, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm); + } +} + +void GxEPD2_213_B74::writeNative(const uint8_t* data1, const uint8_t* data2, int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + if (data1) + { + writeImage(data1, x, y, w, h, invert, mirror_y, pgm); + } +} + +void GxEPD2_213_B74::drawImage(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + writeImage(bitmap, x, y, w, h, invert, mirror_y, pgm); + refresh(x, y, w, h); + writeImageAgain(bitmap, x, y, w, h, invert, mirror_y, pgm); +} + +void GxEPD2_213_B74::drawImagePart(const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, + int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + writeImagePart(bitmap, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm); + refresh(x, y, w, h); + writeImagePartAgain(bitmap, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm); +} + +void GxEPD2_213_B74::drawImage(const uint8_t* black, const uint8_t* color, int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + if (black) + { + drawImage(black, x, y, w, h, invert, mirror_y, pgm); + } +} + +void GxEPD2_213_B74::drawImagePart(const uint8_t* black, const uint8_t* color, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, + int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + if (black) + { + drawImagePart(black, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm); + } +} + +void GxEPD2_213_B74::drawNative(const uint8_t* data1, const uint8_t* data2, int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + if (data1) + { + drawImage(data1, x, y, w, h, invert, mirror_y, pgm); + } +} + +void GxEPD2_213_B74::refresh(bool partial_update_mode) +{ + if (partial_update_mode) refresh(0, 0, WIDTH, HEIGHT); + else + { + if (_using_partial_mode) _Init_Full(); + _Update_Full(); + _initial_refresh = false; // initial full update done + } +} + +void GxEPD2_213_B74::refresh(int16_t x, int16_t y, int16_t w, int16_t h) +{ + if (_initial_refresh) return refresh(false); // initial update needs be full update + x -= x % 8; // byte boundary + w -= x % 8; // byte boundary + int16_t x1 = x < 0 ? 0 : x; // limit + int16_t y1 = y < 0 ? 0 : y; // limit + int16_t w1 = x + w < int16_t(WIDTH) ? w : int16_t(WIDTH) - x; // limit + int16_t h1 = y + h < int16_t(HEIGHT) ? h : int16_t(HEIGHT) - y; // limit + w1 -= x1 - x; + h1 -= y1 - y; + if (!_using_partial_mode) _Init_Part(); + _setPartialRamArea(x1, y1, w1, h1); + _Update_Part(); +} + +void GxEPD2_213_B74::powerOff() +{ + _PowerOff(); +} + +void GxEPD2_213_B74::hibernate() +{ + _PowerOff(); + if (_rst >= 0) + { + _writeCommand(0x10); // deep sleep mode + _writeData(0x1); // enter deep sleep + _hibernating = true; + } +} + +void GxEPD2_213_B74::_setPartialRamArea(uint16_t x, uint16_t y, uint16_t w, uint16_t h) +{ + _writeCommand(0x11); // set ram entry mode + _writeData(0x03); // x increase, y increase : normal mode + _writeCommand(0x44); + _writeData(x / 8); + _writeData((x + w - 1) / 8); + _writeCommand(0x45); + _writeData(y % 256); + _writeData(y / 256); + _writeData((y + h - 1) % 256); + _writeData((y + h - 1) / 256); + _writeCommand(0x4e); + _writeData(x / 8); + _writeCommand(0x4f); + _writeData(y % 256); + _writeData(y / 256); +} + +void GxEPD2_213_B74::_PowerOn() +{ + if (!_power_is_on) + { + _writeCommand(0x22); + _writeData(0xf8); + _writeCommand(0x20); + _waitWhileBusy("_PowerOn", power_on_time); + } + _power_is_on = true; +} + +void GxEPD2_213_B74::_PowerOff() +{ + if (_power_is_on) + { + _writeCommand(0x22); + _writeData(0x83); + _writeCommand(0x20); + _waitWhileBusy("_PowerOff", power_off_time); + } + _power_is_on = false; + _using_partial_mode = false; +} + +void GxEPD2_213_B74::_InitDisplay() +{ + if (_hibernating) _reset(); + delay(10); // 10ms according to specs + _writeCommand(0x12); //SWRESET + delay(10); // 10ms according to specs + _writeCommand(0x01); //Driver output control + _writeData(0xF9); + _writeData(0x00); + _writeData(0x00); + _writeCommand(0x3C); //BorderWavefrom + _writeData(0x05); + _writeCommand(0x21); // Display update control + _writeData(0x00); + _writeData(0x80); + _writeCommand(0x18); //Read built-in temperature sensor + _writeData(0x80); + _setPartialRamArea(0, 0, WIDTH, HEIGHT); +} + +void GxEPD2_213_B74::_Init_Full() +{ + _InitDisplay(); + _PowerOn(); + _using_partial_mode = false; +} + +void GxEPD2_213_B74::_Init_Part() +{ + _InitDisplay(); + _PowerOn(); + _using_partial_mode = true; +} + +void GxEPD2_213_B74::_Update_Full() +{ + _writeCommand(0x22); + _writeData(0xf4); + _writeCommand(0x20); + _waitWhileBusy("_Update_Full", full_refresh_time); +} + +void GxEPD2_213_B74::_Update_Part() +{ + _writeCommand(0x22); + _writeData(0xfc); + _writeCommand(0x20); + _waitWhileBusy("_Update_Part", partial_refresh_time); +} diff --git a/src/epd/GxEPD2_213_B74.h b/src/epd/GxEPD2_213_B74.h new file mode 100644 index 0000000..42c7c65 --- /dev/null +++ b/src/epd/GxEPD2_213_B74.h @@ -0,0 +1,82 @@ +// Display Library for SPI e-paper panels from Dalian Good Display and boards from Waveshare. +// Requires HW SPI and Adafruit_GFX. Caution: the e-paper panels require 3.3V supply AND data lines! +// +// based on Demo Example from Good Display, available here: http://www.e-paper-display.com/download_detail/downloadsId=806.html +// Panel: GDEM0213B74 : https://www.good-display.com/product/375.html +// Controller : SSD1680 : https://www.good-display.com/companyfile/101.html +// +// Author: Jean-Marc Zingg +// +// Version: see library.properties +// +// Library: https://github.com/ZinggJM/GxEPD2 + +#ifndef _GxEPD2_213_B74_H_ +#define _GxEPD2_213_B74_H_ + +#include "../GxEPD2_EPD.h" + +class GxEPD2_213_B74 : public GxEPD2_EPD +{ + public: + // attributes + static const uint16_t WIDTH = 128; + static const uint16_t HEIGHT = 250; + static const GxEPD2::Panel panel = GxEPD2::GDEM0213B74; + static const bool hasColor = false; + static const bool hasPartialUpdate = true; + static const bool hasFastPartialUpdate = true; + static const uint16_t power_on_time = 100; // ms, e.g. 95109us + static const uint16_t power_off_time = 150; // ms, e.g. 140344us + static const uint16_t full_refresh_time = 3600; // ms, e.g. 3501806us + static const uint16_t partial_refresh_time = 500; // ms, e.g. 455406us + // constructor + GxEPD2_213_B74(int8_t cs, int8_t dc, int8_t rst, int8_t busy); + // methods (virtual) + // Support for Bitmaps (Sprites) to Controller Buffer and to Screen + void clearScreen(uint8_t value = 0xFF); // init controller memory and screen (default white) + void writeScreenBuffer(uint8_t value = 0xFF); // init controller memory (default white) + void writeScreenBufferAgain(uint8_t value = 0xFF); // init previous buffer controller memory (default white) + // write to controller memory, without screen refresh; x and w should be multiple of 8 + void writeImage(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + void writeImageForFullRefresh(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + void writeImagePart(const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, + int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + void writeImage(const uint8_t* black, const uint8_t* color, int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + void writeImagePart(const uint8_t* black, const uint8_t* color, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, + int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + // for differential update: set current and previous buffers equal (for fast partial update to work correctly) + void writeImageAgain(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + void writeImagePartAgain(const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, + int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + // write sprite of native data to controller memory, without screen refresh; x and w should be multiple of 8 + void writeNative(const uint8_t* data1, const uint8_t* data2, int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + // write to controller memory, with screen refresh; x and w should be multiple of 8 + void drawImage(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + void drawImagePart(const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, + int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + void drawImage(const uint8_t* black, const uint8_t* color, int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + void drawImagePart(const uint8_t* black, const uint8_t* color, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, + int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + // write sprite of native data to controller memory, with screen refresh; x and w should be multiple of 8 + void drawNative(const uint8_t* data1, const uint8_t* data2, int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + void refresh(bool partial_update_mode = false); // screen refresh from controller memory to full screen + void refresh(int16_t x, int16_t y, int16_t w, int16_t h); // screen refresh from controller memory, partial screen + void powerOff(); // turns off generation of panel driving voltages, avoids screen fading over time + void hibernate(); // turns powerOff() and sets controller to deep sleep for minimum power use, ONLY if wakeable by RST (rst >= 0) + private: + void _writeScreenBuffer(uint8_t command, uint8_t value); + void _writeImage(uint8_t command, const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + void _writeImagePart(uint8_t command, const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, + int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + void _setPartialRamArea(uint16_t x, uint16_t y, uint16_t w, uint16_t h); + void _PowerOn(); + void _PowerOff(); + void _InitDisplay(); + void _Init_Full(); + void _Init_Part(); + void _Update_Full(); + void _Update_Part(); +}; + +#endif diff --git a/src/it8951/GxEPD2_it78_1872x1404.cpp b/src/it8951/GxEPD2_it78_1872x1404.cpp new file mode 100644 index 0000000..e9ee197 --- /dev/null +++ b/src/it8951/GxEPD2_it78_1872x1404.cpp @@ -0,0 +1,679 @@ +// Display Library for SPI e-paper panels from Dalian Good Display and boards from Waveshare. +// Requires HW SPI and Adafruit_GFX. Caution: these e-papers require 3.3V supply AND data lines! +// +// GxEPD2_it78_1872x1404 class is based on Demo Example from Waveshare for Raspberry PI https://github.com/waveshare/IT8951/archive/master.zip +// Controller: IT8951 : https://www.waveshare.com/w/upload/1/18/IT8951_D_V0.2.4.3_20170728.pdf +// +// The GxEPD2_it78_1872x1404 driver class supports the Waveshare e-Paper IT8951 Driver HAT connected with SPI for the ED078KC2 7.8" e-paper panel (parallel IF) +// https://www.waveshare.com/product/displays/e-paper/7.8inch-e-paper-hat.htm +// This Driver HAT requires 5V power supply but works with 3.3V data lines; requires both MOSI and MISO SPI lines. +// +// Author: Jean-Marc Zingg +// +// Version: see library.properties +// +// Library: https://github.com/ZinggJM/GxEPD2 + +#include "GxEPD2_it78_1872x1404.h" + +#define VCOM 1500 //e.g. -1.53 = 1530 = 0x5FA + +//Built in I80 Command Code +#define IT8951_TCON_SYS_RUN 0x0001 +#define IT8951_TCON_STANDBY 0x0002 +#define IT8951_TCON_SLEEP 0x0003 +#define IT8951_TCON_REG_RD 0x0010 +#define IT8951_TCON_REG_WR 0x0011 +#define IT8951_TCON_LD_IMG 0x0020 +#define IT8951_TCON_LD_IMG_AREA 0x0021 +#define IT8951_TCON_LD_IMG_END 0x0022 + +//I80 User defined command code +#define USDEF_I80_CMD_DPY_AREA 0x0034 +#define USDEF_I80_CMD_GET_DEV_INFO 0x0302 +#define USDEF_I80_CMD_DPY_BUF_AREA 0x0037 +#define USDEF_I80_CMD_VCOM 0x0039 + +//Rotate mode +#define IT8951_ROTATE_0 0 +#define IT8951_ROTATE_90 1 +#define IT8951_ROTATE_180 2 +#define IT8951_ROTATE_270 3 + +//Pixel mode , BPP - Bit per Pixel +#define IT8951_2BPP 0 +#define IT8951_3BPP 1 +#define IT8951_4BPP 2 +#define IT8951_8BPP 3 + +//Endian Type +#define IT8951_LDIMG_L_ENDIAN 0 +#define IT8951_LDIMG_B_ENDIAN 1 + +#define SYS_REG_BASE 0x0000 +#define I80CPCR (SYS_REG_BASE + 0x04) +#define MCSR_BASE_ADDR 0x0200 +#define LISAR (MCSR_BASE_ADDR + 0x0008) + +GxEPD2_it78_1872x1404::GxEPD2_it78_1872x1404(int8_t cs, int8_t dc, int8_t rst, int8_t busy) : + GxEPD2_EPD(cs, dc, rst, busy, LOW, 10000000, WIDTH, HEIGHT, panel, hasColor, hasPartialUpdate, hasFastPartialUpdate), + _spi_settings(24000000, MSBFIRST, SPI_MODE0), + _spi_settings_for_read(1000000, MSBFIRST, SPI_MODE0) +{ +} + +void GxEPD2_it78_1872x1404::init(uint32_t serial_diag_bitrate) +{ + init(serial_diag_bitrate, true, 20, false); +} + +void GxEPD2_it78_1872x1404::init(uint32_t serial_diag_bitrate, bool initial, uint16_t reset_duration, bool pulldown_rst_mode) +{ + GxEPD2_EPD::init(serial_diag_bitrate, initial, reset_duration, pulldown_rst_mode); + + // we need a long reset pulse + if (_rst >= 0) + { + digitalWrite(_rst, LOW); + delay(200); + digitalWrite(_rst, HIGH); + delay(200); + _waitWhileBusy("init reset_to_ready", reset_to_ready_time); + } + + _writeCommand16(USDEF_I80_CMD_GET_DEV_INFO); + _waitWhileBusy("GetIT8951SystemInfo", power_on_time); + _readData16((uint16_t*)&IT8951DevInfo, sizeof(IT8951DevInfo) / 2); + if (_diag_enabled) + { + //Show Device information of IT8951 + printf("Panel(W,H) = (%d,%d)\r\n", + IT8951DevInfo.usPanelW, IT8951DevInfo.usPanelH ); + printf("Image Buffer Address = %X\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); + printf("LUT Version = %s\r\n", (uint8_t*)IT8951DevInfo.usLUTVersion); + } + //Set to Enable I80 Packed mode + _IT8951WriteReg(I80CPCR, 0x0001); + if (VCOM != _IT8951GetVCOM()) + { + _IT8951SetVCOM(VCOM); + printf("VCOM = -%.02fV\n", (float)_IT8951GetVCOM() / 1000); + } + printf("VCOM = -%.02fV\n", (float)_IT8951GetVCOM() / 1000); +} + +void GxEPD2_it78_1872x1404::clearScreen(uint8_t value) +{ + _initial_write = false; // initial full screen buffer clean done + if (_initial_refresh) _Init_Full(); + else _Init_Part(); + _initial_refresh = false; + _setPartialRamArea(0, 0, WIDTH, HEIGHT); + SPI.beginTransaction(_spi_settings); + if (_cs >= 0) digitalWrite(_cs, LOW); + _transfer16(0x0000); // preamble for write data + _waitWhileBusy2("clearScreen preamble", default_wait_time); + for (uint32_t i = 0; i < uint32_t(WIDTH) * uint32_t(HEIGHT); i++) + { + SPI.transfer(value); +#if defined(ESP8266) || defined(ESP32) + if (0 == i % 10000) yield(); +#endif + } + if (_cs >= 0) digitalWrite(_cs, HIGH); + SPI.endTransaction(); + _writeCommand16(IT8951_TCON_LD_IMG_END); + _waitWhileBusy2("clearScreen load end", default_wait_time); + _refresh(0, 0, WIDTH, HEIGHT, false); +} + +void GxEPD2_it78_1872x1404::writeScreenBuffer(uint8_t value) +{ + if (_initial_refresh) clearScreen(value); + else _writeScreenBuffer(value); +} + +void GxEPD2_it78_1872x1404::_writeScreenBuffer(uint8_t value) +{ + _initial_write = false; // initial full screen buffer clean done + if (!_using_partial_mode) _Init_Part(); + _setPartialRamArea(0, 0, WIDTH, HEIGHT); + SPI.beginTransaction(_spi_settings); + if (_cs >= 0) digitalWrite(_cs, LOW); + _transfer16(0x0000); // preamble for write data + _waitWhileBusy2("clearScreen preamble", default_wait_time); + for (uint32_t i = 0; i < uint32_t(WIDTH) * uint32_t(HEIGHT); i++) + { + SPI.transfer(value); +#if defined(ESP8266) || defined(ESP32) + if (0 == i % 10000) yield(); +#endif + } + if (_cs >= 0) digitalWrite(_cs, HIGH); + SPI.endTransaction(); + _writeCommand16(IT8951_TCON_LD_IMG_END); + _waitWhileBusy2("_writeScreenBuffer load end", default_wait_time); +} + +void GxEPD2_it78_1872x1404::writeImage(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + if (_initial_write) writeScreenBuffer(); // initial full screen buffer clean + delay(1); // yield() to avoid WDT on ESP8266 and ESP32 + int16_t wb = (w + 7) / 8; // width bytes, bitmaps are padded + x -= x % 8; // byte boundary + w = wb * 8; // byte boundary + int16_t x1 = x < 0 ? 0 : x; // limit + int16_t y1 = y < 0 ? 0 : y; // limit + int16_t w1 = x + w < int16_t(WIDTH) ? w : int16_t(WIDTH) - x; // limit + int16_t h1 = y + h < int16_t(HEIGHT) ? h : int16_t(HEIGHT) - y; // limit + int16_t dx = x1 - x; + int16_t dy = y1 - y; + w1 -= dx; + h1 -= dy; + if ((w1 <= 0) || (h1 <= 0)) return; + if (!_using_partial_mode) _Init_Part(); + _setPartialRamArea(x1, y1, w1, h1); + SPI.beginTransaction(_spi_settings); + if (_cs >= 0) digitalWrite(_cs, LOW); + _transfer16(0x0000); // preamble for write data + _waitWhileBusy2("writeImage preamble", default_wait_time); + for (int16_t i = 0; i < h1; i++) + { + for (int16_t j = 0; j < w1 / 8; j++) + { + uint8_t data; + // use wb, h of bitmap for index! + uint32_t idx = mirror_y ? uint32_t(j + dx / 8) + uint32_t((h - 1 - (i + dy))) * uint32_t(wb) : uint32_t(j + dx / 8) + uint32_t(i + dy) * uint32_t(wb); + if (pgm) + { +#if defined(__AVR) || defined(ESP8266) || defined(ESP32) + data = pgm_read_byte(&bitmap[idx]); +#else + data = bitmap[idx]; +#endif + } + else + { + data = bitmap[idx]; + } + if (invert) data = ~data; + _send8pixel(~data); + } +#if defined(ESP8266) || defined(ESP32) + yield(); +#endif + } + if (_cs >= 0) digitalWrite(_cs, HIGH); + SPI.endTransaction(); + _writeCommand16(IT8951_TCON_LD_IMG_END); + _waitWhileBusy2("writeImage load end", default_wait_time); + delay(1); // yield() to avoid WDT on ESP8266 and ESP32 +} + +void GxEPD2_it78_1872x1404::writeImagePart(const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, + int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + if (_initial_write) writeScreenBuffer(); // initial full screen buffer clean + delay(1); // yield() to avoid WDT on ESP8266 and ESP32 + if ((w_bitmap < 0) || (h_bitmap < 0) || (w < 0) || (h < 0)) return; + if ((x_part < 0) || (x_part >= w_bitmap)) return; + if ((y_part < 0) || (y_part >= h_bitmap)) return; + int16_t wb_bitmap = (w_bitmap + 7) / 8; // width bytes, bitmaps are padded + x_part -= x_part % 8; // byte boundary + w = w_bitmap - x_part < w ? w_bitmap - x_part : w; // limit + h = h_bitmap - y_part < h ? h_bitmap - y_part : h; // limit + x -= x % 8; // byte boundary + w = 8 * ((w + 7) / 8); // byte boundary, bitmaps are padded + int16_t x1 = x < 0 ? 0 : x; // limit + int16_t y1 = y < 0 ? 0 : y; // limit + int16_t w1 = x + w < int16_t(WIDTH) ? w : int16_t(WIDTH) - x; // limit + int16_t h1 = y + h < int16_t(HEIGHT) ? h : int16_t(HEIGHT) - y; // limit + int16_t dx = x1 - x; + int16_t dy = y1 - y; + w1 -= dx; + h1 -= dy; + if ((w1 <= 0) || (h1 <= 0)) return; + if (!_using_partial_mode) _Init_Part(); + _setPartialRamArea(x1, y1, w1, h1); + SPI.beginTransaction(_spi_settings); + if (_cs >= 0) digitalWrite(_cs, LOW); + _transfer16(0x0000); // preamble for write data + _waitWhileBusy2("writeImage preamble", default_wait_time); + for (int16_t i = 0; i < h1; i++) + { + for (int16_t j = 0; j < w1 / 8; j++) + { + uint8_t data; + // use wb_bitmap, h_bitmap of bitmap for index! + uint32_t idx = mirror_y ? x_part / 8 + (j + dx / 8) + uint32_t((h_bitmap - 1 - (y_part + i + dy))) * uint32_t(wb_bitmap) : x_part / 8 + j + dx / 8 + uint32_t(y_part + i + dy) * uint32_t(wb_bitmap); + if (pgm) + { +#if defined(__AVR) || defined(ESP8266) || defined(ESP32) + data = pgm_read_byte(&bitmap[idx]); +#else + data = bitmap[idx]; +#endif + } + else + { + data = bitmap[idx]; + } + if (invert) data = ~data; + _send8pixel(~data); + } + } + if (_cs >= 0) digitalWrite(_cs, HIGH); + SPI.endTransaction(); + _writeCommand16(IT8951_TCON_LD_IMG_END); + _waitWhileBusy2("writeImage load end", default_wait_time); + delay(1); // yield() to avoid WDT on ESP8266 and ESP32 +} + +void GxEPD2_it78_1872x1404::writeImage(const uint8_t* black, const uint8_t* color, int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + if (black) + { + writeImage(black, x, y, w, h, invert, mirror_y, pgm); + } +} + +void GxEPD2_it78_1872x1404::writeImagePart(const uint8_t* black, const uint8_t* color, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, + int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + if (black) + { + writeImagePart(black, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm); + } +} + +void GxEPD2_it78_1872x1404::writeNative(const uint8_t* data1, const uint8_t* data2, int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + if (data1) + { + if (_initial_write) writeScreenBuffer(); // initial full screen buffer clean + delay(1); // yield() to avoid WDT on ESP8266 and ESP32 + int16_t x1 = x < 0 ? 0 : x; // limit + int16_t y1 = y < 0 ? 0 : y; // limit + int16_t w1 = x + w < int16_t(WIDTH) ? w : int16_t(WIDTH) - x; // limit + int16_t h1 = y + h < int16_t(HEIGHT) ? h : int16_t(HEIGHT) - y; // limit + int16_t dx = x1 - x; + int16_t dy = y1 - y; + w1 -= dx; + h1 -= dy; + if ((w1 <= 0) || (h1 <= 0)) return; + if (!_using_partial_mode) _Init_Part(); + _setPartialRamArea(x1, y1, w1, h1); + SPI.beginTransaction(_spi_settings); + if (_cs >= 0) digitalWrite(_cs, LOW); + _transfer16(0x0000); // preamble for write data + _waitWhileBusy2("writeNative preamble", default_wait_time); + for (int16_t i = 0; i < h1; i++) + { + for (int16_t j = 0; j < w1; j++) + { + uint8_t data; + // use w, h of bitmap for index! + uint32_t idx = mirror_y ? uint32_t(j + dx) + uint32_t((h - 1 - (i + dy))) * uint32_t(w) : uint32_t(j + dx) + uint32_t(i + dy) * uint32_t(w); + if (pgm) + { +#if defined(__AVR) || defined(ESP8266) || defined(ESP32) + data = pgm_read_byte(&data1[idx]); +#else + data = data1[idx]; +#endif + } + else + { + data = data1[idx]; + } + if (invert) data = ~data; + SPI.transfer(data); + } +#if defined(ESP8266) || defined(ESP32) + yield(); +#endif + } + if (_cs >= 0) digitalWrite(_cs, HIGH); + SPI.endTransaction(); + _writeCommand16(IT8951_TCON_LD_IMG_END); + _waitWhileBusy2("writeNative load end", default_wait_time); + delay(1); // yield() to avoid WDT on ESP8266 and ESP32 + } +} + +void GxEPD2_it78_1872x1404::drawImage(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + writeImage(bitmap, x, y, w, h, invert, mirror_y, pgm); + _refresh(x, y, w, h, true); +} + +void GxEPD2_it78_1872x1404::drawImagePart(const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, + int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + writeImagePart(bitmap, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm); + _refresh(x, y, w, h, true); +} + +void GxEPD2_it78_1872x1404::drawImage(const uint8_t* black, const uint8_t* color, int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + writeImage(black, color, x, y, w, h, invert, mirror_y, pgm); + _refresh(x, y, w, h, true); +} + +void GxEPD2_it78_1872x1404::drawImagePart(const uint8_t* black, const uint8_t* color, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, + int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + writeImagePart(black, color, x_part, y_part, w_bitmap, h_bitmap, x, y, w, h, invert, mirror_y, pgm); + _refresh(x, y, w, h, true); +} + +void GxEPD2_it78_1872x1404::drawNative(const uint8_t* data1, const uint8_t* data2, int16_t x, int16_t y, int16_t w, int16_t h, bool invert, bool mirror_y, bool pgm) +{ + writeNative(data1, data2, x, y, w, h, invert, mirror_y, pgm); + _refresh(x, y, w, h, false); +} + +void GxEPD2_it78_1872x1404::refresh(bool partial_update_mode) +{ + _refresh(0, 0, WIDTH, HEIGHT, partial_update_mode); +} + +void GxEPD2_it78_1872x1404::refresh(int16_t x, int16_t y, int16_t w, int16_t h) +{ + _refresh(x, y, w, h, true); +} + +void GxEPD2_it78_1872x1404::_refresh(int16_t x, int16_t y, int16_t w, int16_t h, bool partial_update_mode) +{ + //x -= x % 8; // byte boundary + //w -= x % 8; // byte boundary + int16_t x1 = x < 0 ? 0 : x; // limit + int16_t y1 = y < 0 ? 0 : y; // limit + int16_t w1 = x + w < int16_t(WIDTH) ? w : int16_t(WIDTH) - x; // limit + int16_t h1 = y + h < int16_t(HEIGHT) ? h : int16_t(HEIGHT) - y; // limit + w1 -= x1 - x; + h1 -= y1 - y; + //Send I80 Display Command (User defined command of IT8951) + _writeCommand16(USDEF_I80_CMD_DPY_AREA); //0x0034 + _waitWhileBusy2("refresh cmd", refresh_cmd_time); + //Write arguments + _writeData16(x1); + _waitWhileBusy2("refresh x", refresh_par_time); + _writeData16(y1); + _waitWhileBusy2("refresh y", refresh_par_time); + _writeData16(w1); + _waitWhileBusy2("refresh w", refresh_par_time); + _writeData16(h1); + _waitWhileBusy2("refresh h", refresh_par_time); + _writeData16(partial_update_mode ? 1 : 2); // mode + _waitWhileBusy("refresh", full_refresh_time); +} + +void GxEPD2_it78_1872x1404::powerOff(void) +{ + _PowerOff(); +} + +void GxEPD2_it78_1872x1404::hibernate() +{ + if (_power_is_on) _PowerOff(); + if (_rst >= 0) + { + // this does not work, does not reduce power, uses more than in stand by mode + //delay(1000); + //_IT8951Sleep(); + //delay(1000); + //_hibernating = true; + } +} + +void GxEPD2_it78_1872x1404::_send8pixel(uint8_t data) +{ + for (uint8_t j = 0; j < 8; j++) + { + SPI.transfer(data & 0x80 ? 0x00 : 0xFF); + data <<= 1; + } +} + +void GxEPD2_it78_1872x1404::_setPartialRamArea(uint16_t x, uint16_t y, uint16_t w, uint16_t h) +{ + //_IT8951WriteReg(LISAR + 2 , IT8951DevInfo.usImgBufAddrH); + //_IT8951WriteReg(LISAR , IT8951DevInfo.usImgBufAddrL); + uint16_t usArg[5]; + //usArg[0] = (IT8951_LDIMG_L_ENDIAN << 8 ) | (IT8951_8BPP << 4) | (IT8951_ROTATE_0); + usArg[0] = (IT8951_LDIMG_B_ENDIAN << 8 ) | (IT8951_8BPP << 4) | (IT8951_ROTATE_0); + usArg[1] = x; + usArg[2] = y; + usArg[3] = w; + usArg[4] = h; + _writeCommandData16(IT8951_TCON_LD_IMG_AREA , usArg , 5); +} + +void GxEPD2_it78_1872x1404::_PowerOn() +{ + if (!_power_is_on) + { + _IT8951SystemRun(); + _waitWhileBusy("_PowerOn", power_on_time); + } + _power_is_on = true; +} + +void GxEPD2_it78_1872x1404::_PowerOff() +{ + _IT8951StandBy(); + _waitWhileBusy("_PowerOff", power_off_time); + _power_is_on = false; + _using_partial_mode = false; +} + +void GxEPD2_it78_1872x1404::_InitDisplay() +{ + // we need a long reset pulse + if (_hibernating && (_rst >= 0)) + { + digitalWrite(_rst, LOW); + delay(200); + digitalWrite(_rst, HIGH); + delay(200); + } +} + +void GxEPD2_it78_1872x1404::_Init_Full() +{ + _InitDisplay(); + _PowerOn(); + _using_partial_mode = false; +} + +void GxEPD2_it78_1872x1404::_Init_Part() +{ + _InitDisplay(); + _PowerOn(); + _using_partial_mode = true; +} + +void GxEPD2_it78_1872x1404::_waitWhileBusy2(const char* comment, uint16_t busy_time) +{ + if (_busy >= 0) + { + unsigned long start = micros(); + while (1) + { + if (digitalRead(_busy) != _busy_level) break; + delay(1); + if (micros() - start > _busy_timeout) + { + Serial.println("Busy Timeout!"); + break; + } + } + if (comment) + { +#if !defined(DISABLE_DIAGNOSTIC_OUTPUT) + if (_diag_enabled) + { + unsigned long elapsed = micros() - start; + if (elapsed > diag_min_time * 1000) + { + Serial.print(comment); + Serial.print(" : "); + Serial.println(elapsed); + } + } +#endif + } + (void) start; + } + else delay(busy_time); +} + +uint16_t GxEPD2_it78_1872x1404::_transfer16(uint16_t value) +{ + uint16_t rv = SPI.transfer(value >> 8) << 8; + return (rv | SPI.transfer(value)); +} + +void GxEPD2_it78_1872x1404::_writeCommand16(uint16_t c) +{ + String s = String("_writeCommand16(0x") + String(c, HEX) + String(")"); + _waitWhileBusy2(s.c_str(), default_wait_time); + SPI.beginTransaction(_spi_settings); + if (_cs >= 0) digitalWrite(_cs, LOW); + _transfer16(0x6000); // preamble for write command + _waitWhileBusy2("_writeCommand16 preamble", default_wait_time); + _transfer16(c); + if (_cs >= 0) digitalWrite(_cs, HIGH); + SPI.endTransaction(); + //_waitWhileBusy(s.c_str(), default_wait_time); +} + +void GxEPD2_it78_1872x1404::_writeData16(uint16_t d) +{ + _waitWhileBusy2("_writeData16", default_wait_time); + SPI.beginTransaction(_spi_settings); + if (_cs >= 0) digitalWrite(_cs, LOW); + _transfer16(0x0000); // preamble for write data + _waitWhileBusy2("_writeData16 preamble", default_wait_time); + _transfer16(d); + if (_cs >= 0) digitalWrite(_cs, HIGH); + SPI.endTransaction(); +} + +void GxEPD2_it78_1872x1404::_writeData16(const uint16_t* d, uint32_t n) +{ + _waitWhileBusy2("_writeData16", default_wait_time); + SPI.beginTransaction(_spi_settings); + if (_cs >= 0) digitalWrite(_cs, LOW); + _transfer16(0x0000); // preamble for write data + _waitWhileBusy2("_writeData16 preamble", default_wait_time); + for (uint32_t i = 0; i < n; i++) + { + _transfer16(*d++); + } + if (_cs >= 0) digitalWrite(_cs, HIGH); + SPI.endTransaction(); +} + +uint16_t GxEPD2_it78_1872x1404::_readData16() +{ + _waitWhileBusy2("_readData16", default_wait_time); + SPI.beginTransaction(_spi_settings); + if (_cs >= 0) digitalWrite(_cs, LOW); + _transfer16(0x1000); // preamble for read data + _waitWhileBusy2("_readData16 preamble", default_wait_time); + _transfer16(0); // dummy + _waitWhileBusy2("_readData16 dummy", default_wait_time); + uint16_t rv = _transfer16(0); + if (_cs >= 0) digitalWrite(_cs, HIGH); + SPI.endTransaction(); + return rv; +} + +void GxEPD2_it78_1872x1404::_readData16(uint16_t* d, uint32_t n) +{ + _waitWhileBusy2("_readData16", default_wait_time); + SPI.beginTransaction(_spi_settings); + if (_cs >= 0) digitalWrite(_cs, LOW); + _transfer16(0x1000); // preamble for read data + _waitWhileBusy2("_readData16 preamble", default_wait_time); + _transfer16(0); // dummy + _waitWhileBusy2("_readData16 dummy", default_wait_time); + for (uint32_t i = 0; i < n; i++) + { + *d++ = _transfer16(0); + //_waitWhileBusy("_readData16 data", default_wait_time); + } + if (_cs >= 0) digitalWrite(_cs, HIGH); + SPI.endTransaction(); +} + +void GxEPD2_it78_1872x1404::_writeCommandData16(uint16_t c, const uint16_t* d, uint16_t n) +{ + _writeCommand16(c); + for (uint16_t i = 0; i < n; i++) + { + _writeData16(d[i]); + } +} + +void GxEPD2_it78_1872x1404::_IT8951SystemRun() +{ + _writeCommand16(IT8951_TCON_SYS_RUN); +} + +void GxEPD2_it78_1872x1404::_IT8951StandBy() +{ + _writeCommand16(IT8951_TCON_STANDBY); +} + +void GxEPD2_it78_1872x1404::_IT8951Sleep() +{ + _writeCommand16(IT8951_TCON_SLEEP); +} + +uint16_t GxEPD2_it78_1872x1404::_IT8951ReadReg(uint16_t usRegAddr) +{ + uint16_t usData; + + //Send Cmd and Register Address + _writeCommand16(IT8951_TCON_REG_RD); + _writeData16(usRegAddr); + //Read data from Host Data bus + usData = _readData16(); + return usData; +} + +void GxEPD2_it78_1872x1404::_IT8951WriteReg(uint16_t usRegAddr, uint16_t usValue) +{ + //Send Cmd , Register Address and Write Value + _writeCommand16(IT8951_TCON_REG_WR); + _writeData16(usRegAddr); + _writeData16(usValue); +} + +uint16_t GxEPD2_it78_1872x1404::_IT8951GetVCOM(void) +{ + uint16_t vcom; + + _writeCommand16(USDEF_I80_CMD_VCOM); + _waitWhileBusy2("_IT8951GetVCOM", default_wait_time); + _writeData16(0); + //Read data from Host Data bus + vcom = _readData16(); + return vcom; +} + +void GxEPD2_it78_1872x1404::_IT8951SetVCOM(uint16_t vcom) +{ + _writeCommand16(USDEF_I80_CMD_VCOM); + _waitWhileBusy2("_IT8951SetVCOM", default_wait_time); + _writeData16(1); + //Read data from Host Data bus + _writeData16(vcom); + _waitWhileBusy2("_IT8951SetVCOM", set_vcom_time); +} diff --git a/src/it8951/GxEPD2_it78_1872x1404.h b/src/it8951/GxEPD2_it78_1872x1404.h new file mode 100644 index 0000000..c04c4b6 --- /dev/null +++ b/src/it8951/GxEPD2_it78_1872x1404.h @@ -0,0 +1,113 @@ +// Display Library for SPI e-paper panels from Dalian Good Display and boards from Waveshare. +// Requires HW SPI and Adafruit_GFX. Caution: these e-papers require 3.3V supply AND data lines! +// +// GxEPD2_it78_1872x1404 class is based on Demo Example from Waveshare for Raspberry PI https://github.com/waveshare/IT8951/archive/master.zip +// Controller: IT8951 : https://www.waveshare.com/w/upload/1/18/IT8951_D_V0.2.4.3_20170728.pdf +// +// The GxEPD2_it78_1872x1404 driver class supports the Waveshare e-Paper IT8951 Driver HAT connected with SPI for the ED078KC2 7.8" e-paper panel (parallel IF) +// https://www.waveshare.com/product/displays/e-paper/7.8inch-e-paper-hat.htm +// This Driver HAT requires 5V power supply but works with 3.3V data lines; requires both MOSI and MISO SPI lines. +// +// Author: Jean-Marc Zingg +// +// Version: see library.properties +// +// Library: https://github.com/ZinggJM/GxEPD2 + +#ifndef _GxEPD2_it78_1872x1404_H_ +#define _GxEPD2_it78_1872x1404_H_ + +#include "../GxEPD2_EPD.h" + +class GxEPD2_it78_1872x1404 : public GxEPD2_EPD +{ + public: + // attributes + static const uint16_t WIDTH = 1872; + static const uint16_t HEIGHT = 1404; + static const GxEPD2::Panel panel = GxEPD2::ED078KC2; + static const bool hasColor = false; + static const bool hasPartialUpdate = true; + static const bool hasFastPartialUpdate = true; + static const uint16_t reset_to_ready_time = 1800; // ms, e.g. 1729001us + static const uint16_t power_on_time = 10; // ms, e.g. 3001us + static const uint16_t power_off_time = 250; // ms, e.g. 214001us + static const uint16_t full_refresh_time = 650; // ms, e.g. 629001us + static const uint16_t partial_refresh_time = 300; // ms, e.g. 287001us + static const uint16_t refresh_cmd_time = 10; // ms, e.g. 6052us + static const uint16_t refresh_par_time = 2; // ms, e.g. 1921us + static const uint16_t default_wait_time = 1; // ms, default busy check, needed? + static const uint16_t diag_min_time = 3; // ms, e.g. > refresh_par_time + static const uint16_t set_vcom_time = 500; // ms, e.g. 454967us + // constructor + GxEPD2_it78_1872x1404(int8_t cs, int8_t dc, int8_t rst, int8_t busy); + // methods (virtual) + void init(uint32_t serial_diag_bitrate = 0); // serial_diag_bitrate = 0 : disabled + void init(uint32_t serial_diag_bitrate, bool initial, uint16_t reset_duration = 20, bool pulldown_rst_mode = false); + // Support for Bitmaps (Sprites) to Controller Buffer and to Screen + void clearScreen(uint8_t value = 0x33); // init controller memory and screen (default white) + void writeScreenBuffer(uint8_t value = 0x33); // init controller memory (default white) + // write to controller memory, without screen refresh; x and w should be multiple of 8 + void writeImage(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + void writeImagePart(const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, + int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + void writeImage(const uint8_t* black, const uint8_t* color, int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + void writeImagePart(const uint8_t* black, const uint8_t* color, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, + int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + // write sprite of native data to controller memory, without screen refresh; x and w should be multiple of 8 + void writeNative(const uint8_t* data1, const uint8_t* data2, int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + // write to controller memory, with screen refresh; x and w should be multiple of 8 + void drawImage(const uint8_t bitmap[], int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + void drawImagePart(const uint8_t bitmap[], int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, + int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + void drawImage(const uint8_t* black, const uint8_t* color, int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + void drawImagePart(const uint8_t* black, const uint8_t* color, int16_t x_part, int16_t y_part, int16_t w_bitmap, int16_t h_bitmap, + int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + // write sprite of native data to controller memory, with screen refresh; x and w should be multiple of 8 + void drawNative(const uint8_t* data1, const uint8_t* data2, int16_t x, int16_t y, int16_t w, int16_t h, bool invert = false, bool mirror_y = false, bool pgm = false); + void refresh(bool partial_update_mode = false); // screen refresh from controller memory to full screen + void refresh(int16_t x, int16_t y, int16_t w, int16_t h); // screen refresh from controller memory, partial screen + void powerOff(); // turns off generation of panel driving voltages, avoids screen fading over time + void hibernate(); // turns powerOff() and sets controller to deep sleep for minimum power use, ONLY if wakeable by RST (rst >= 0) + private: + struct IT8951DevInfoStruct + { + uint16_t usPanelW; + uint16_t usPanelH; + uint16_t usImgBufAddrL; + uint16_t usImgBufAddrH; + uint16_t usFWVersion[8]; //16 Bytes String + uint16_t usLUTVersion[8]; //16 Bytes String + }; + IT8951DevInfoStruct IT8951DevInfo; + SPISettings _spi_settings; + SPISettings _spi_settings_for_read; + private: + void _writeScreenBuffer(uint8_t value); + void _refresh(int16_t x, int16_t y, int16_t w, int16_t h, bool partial_update_mode); + void _send8pixel(uint8_t data); + void _setPartialRamArea(uint16_t x, uint16_t y, uint16_t w, uint16_t h); + void _PowerOn(); + void _PowerOff(); + void _InitDisplay(); + void _Init_Full(); + void _Init_Part(); + // IT8951 + void _waitWhileBusy2(const char* comment = 0, uint16_t busy_time = 5000); + uint16_t _transfer16(uint16_t value); + void _writeCommand16(uint16_t c); + void _writeData16(uint16_t d); + void _writeData16(const uint16_t* d, uint32_t n); + uint16_t _readData16(); + void _readData16(uint16_t* d, uint32_t n); + void _writeCommandData16(uint16_t c, const uint16_t* d, uint16_t n); + void _IT8951SystemRun(); + void _IT8951StandBy(); + void _IT8951Sleep(); + uint16_t _IT8951ReadReg(uint16_t usRegAddr); + void _IT8951WriteReg(uint16_t usRegAddr, uint16_t usValue); + uint16_t _IT8951GetVCOM(void); + void _IT8951SetVCOM(uint16_t vcom); +}; + +#endif