diff --git a/.gitignore b/.gitignore index 95c2a7d..945c854 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ Doxyfile docs/ latex/ xml/ +img/ diff --git a/README.md b/README.md old mode 100644 new mode 100755 index c78dd9c..3fe4dab --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ![Arduino lint](https://github.com/rei-vilo/PDLS_EXT3_Basic_Touch/actions/workflows/main.yml/badge.svg) -Library for Pervasive Displays [EPD Extension Kit Gen 3 (EXT3-1 and EXT3-Touch)](https://www.pervasivedisplays.com/product/epd-extension-kit-gen-3-EXT3-Touch/) and iTC [monochrome touch](https://www.pervasivedisplays.com/product/2-71-e-ink-display-aurora-mb-v231/) screens with basic features +Library for Pervasive Displays [EPD Extension Kit Gen 3 (EXT3-Touch)](https://www.pervasivedisplays.com/product/epd-extension-kit-gen-3-EXT3-Touch/) and iTC [monochrome touch](https://www.pervasivedisplays.com/product/2-71-e-ink-display-aurora-mb-v231/) screens with basic features Please refer to [PDLS_EXT3_Basic](https://github.com/rei-vilo/PDLS_EXT3_Basic/issues) for reporting issues. @@ -12,9 +12,9 @@ Please refer to [PDLS_EXT3_Basic](https://github.com/rei-vilo/PDLS_EXT3_Basic/is + Text routines + Fast update + Touch management -- HMI library ++ GUI with button and text + Four extended fonts -+ Go to the [documentation](https://rei-vilo.github.io/PDLS_EXT3_Basic_Documentation/index.html) ++ Go to the [documentation](https://rei-vilo.github.io/PDLS_EXT3_Basic/index.html) ## Installation @@ -39,7 +39,7 @@ Software Hardware -* Pervasive Displays [EPD Extension Kit Gen 3 (EXT3-1 and EXT3-Touch)](https://www.pervasivedisplays.com/product/epd-extension-kit-gen-3-EXT3-Touch/) +* Pervasive Displays [EPD Extension Kit Gen 3 (EXT3-Touch)](https://www.pervasivedisplays.com/product/epd-extension-kit-gen-3-EXT3-Touch/) * Pervasive Displays iTC [monochrome screens](https://www.pervasivedisplays.com/products/?_sft_etc_itc=itc&_sft_product_colour=black-white) ## Licence diff --git a/examples/Common_Colours/Common_Colours.ino b/examples/Common_Colours/Common_Colours.ino new file mode 100755 index 0000000..0070f61 --- /dev/null +++ b/examples/Common_Colours/Common_Colours.ino @@ -0,0 +1,186 @@ +/// +/// @file Common_Palette.ino +/// @brief Example of features for basic edition +/// +/// @details Project Pervasive Displays Library Suite +/// @n Based on highView technology +/// +/// @author Rei Vilo +/// @date 16 Aug 2021 +/// @version 508 +/// +/// @copyright (c) Rei Vilo, 2010-2022 +/// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) +/// +/// @see ReadMe.txt for references +/// @n +/// + +// SDK +#if defined(ENERGIA) // LaunchPad specific +#include "Energia.h" +#else // Arduino general +#include "Arduino.h" +#endif // end IDE + +// Set parameters + +// Include application, user and local libraries +#include "SPI.h" +#include "PDLS_EXT3_Basic.h" + +// Define structures and classes + +// Define variables and constants +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_154, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_213, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_266, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_271, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_287, boardLaunchPad); +Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_370, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_417, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_437, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_565, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_581, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_741, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_969, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_B98, boardLaunchPad); + +// Prototypes + +// Utilities +/// +/// @brief Wait with countdown +/// @param second duration, s +/// +void wait(uint8_t second) +{ + for (uint8_t i = second; i > 0; i--) + { + Serial.print(formatString(" > %i \r", i)); + delay(1000); + } + Serial.print(" \r"); +} + + +// Functions +/// +/// @brief Palette test screen +/// @param flag true = default = perform flush, otherwise no +/// +/// @image html T2_PALET.jpg +/// @image latex T2_PALET.PDF width=10cm +/// +void displayPalette(bool flag = true) +{ + myScreen.setOrientation(7); + + uint16_t x0, y0, dx, dy, maxSize, colour; + maxSize = min((myScreen.screenSizeX() * 10 / 50), (myScreen.screenSizeY() * 10 / 35)); + dx = (myScreen.screenSizeX() - maxSize * 50 / 10) / 2; + dy = (myScreen.screenSizeY() - maxSize * 35 / 10) / 2; + + y0 = dy + maxSize / 2; + x0 = dx + maxSize / 2; + myScreen.dRectangle(x0 - 2, y0 - 2, maxSize + 4, maxSize + 4, myColours.red); + x0 = dx + maxSize * 4 / 2; + myScreen.dRectangle(x0 - 2, y0 - 2, maxSize + 4, maxSize + 4, myColours.red); + x0 = dx + maxSize * 7 / 2; + myScreen.dRectangle(x0 - 2, y0 - 2, maxSize + 4, maxSize + 4, myColours.red); + + y0 = dy + maxSize * 4 / 2; + x0 = dx + maxSize / 2; + myScreen.dRectangle(x0 - 2, y0 - 2, maxSize + 4, maxSize + 4, myColours.black); + x0 = dx + maxSize * 4 / 2; + myScreen.dRectangle(x0 - 2, y0 - 2, maxSize + 4, maxSize + 4, myColours.black); + x0 = dx + maxSize * 7 / 2; + myScreen.dRectangle(x0 - 2, y0 - 2, maxSize + 4, maxSize + 4, myColours.black); + + myScreen.setPenSolid(); + myScreen.selectFont(Font_Terminal6x8); + + x0 = dx + maxSize / 2; + y0 = dy + maxSize / 2; + // Light red + myScreen.dRectangle(x0, y0, maxSize, maxSize, myColours.lightRed); + myScreen.gText(x0, y0 + maxSize + 6, "light", myColours.red); + + x0 = dx + maxSize * 4 / 2; + y0 = dy + maxSize / 2; + // Red + myScreen.dRectangle(x0, y0, maxSize, maxSize, myColours.red); + myScreen.gText(x0, y0 + maxSize + 6, "red", myColours.red); + + x0 = dx + maxSize * 7 / 2; + y0 = dy + maxSize / 2; + // Dark-red + myScreen.dRectangle(x0, y0, maxSize, maxSize, myColours.darkRed); + myScreen.gText(x0, y0 + maxSize + 6, "dark", myColours.red); + + x0 = dx + maxSize / 2; + y0 = dy + maxSize * 4 / 2; + // White + myScreen.dRectangle(x0, y0, maxSize, maxSize, myColours.white); + myScreen.gText(x0, y0 + maxSize + 6, "white", myColours.black); + + x0 = dx + maxSize * 4 / 2; + y0 = dy + maxSize * 4 / 2; + // Grey + myScreen.dRectangle(x0, y0, maxSize, maxSize, myColours.grey); + myScreen.gText(x0, y0 + maxSize + 6, "grey", myColours.black); + + x0 = dx + maxSize * 7 / 2; + y0 = dy + maxSize * 4 / 2; + // Black + myScreen.dRectangle(x0, y0, maxSize, maxSize, myColours.black); + myScreen.gText(x0, y0 + maxSize + 6, "black", myColours.black); + + myScreen.selectFont(Font_Terminal8x12); + myScreen.gText(0, 0, myScreen.WhoAmI(), myColours.black); + + myScreen.flush(); +} + +// Add setup code +/// +/// @brief Setup +/// +void setup() +{ + Serial.begin(115200); + delay(500); + Serial.println(); + Serial.println("=== " __FILE__); + Serial.println("=== " __DATE__ " " __TIME__); + Serial.println(); + + Serial.print("begin... "); + myScreen.begin(); + Serial.println(formatString("%s %ix%i", myScreen.WhoAmI().c_str(), myScreen.screenSizeX(), myScreen.screenSizeY())); + + Serial.print("Palettes... "); + myScreen.clear(); + displayPalette(); + wait(8); + + Serial.print("White... "); + myScreen.clear(); + myScreen.flush(); + + Serial.println("=== "); + Serial.println(); + +#if defined(ARDUINO_ARCH_PIDUINO) + exit(0); +#endif +} + +// Add loop code +/// +/// @brief Loop, empty +/// +void loop() +{ + delay(1000); +} diff --git a/examples/Common_Fonts/Common_Fonts.ino b/examples/Common_Fonts/Common_Fonts.ino new file mode 100755 index 0000000..e37d5e3 --- /dev/null +++ b/examples/Common_Fonts/Common_Fonts.ino @@ -0,0 +1,157 @@ +/// +/// @file Common_Palette.ino +/// @brief Example of features for basic edition +/// +/// @details Project Pervasive Displays Library Suite +/// @n Based on highView technology +/// +/// @author Rei Vilo +/// @date 16 Aug 2021 +/// @version 508 +/// +/// @copyright (c) Rei Vilo, 2010-2022 +/// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) +/// +/// @see ReadMe.txt for references +/// @n +/// + +// SDK +#if defined(ENERGIA) // LaunchPad specific +#include "Energia.h" +#else // Arduino general +#include "Arduino.h" +#endif // end IDE + +// Set parameters + +// Include application, user and local libraries +#include "SPI.h" +#include "PDLS_EXT3_Basic.h" + +// Define structures and classes + +// Define variables and constants +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_154, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_213, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_266, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_271, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_287, boardLaunchPad); +Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_370, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_417, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_437, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_565, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_581, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_741, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_969, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_B98, boardLaunchPad); + +// Prototypes + +// Utilities +/// +/// @brief Wait with countdown +/// @param second duration, s +/// +void wait(uint8_t second) +{ + for (uint8_t i = second; i > 0; i--) + { + Serial.print(formatString(" > %i \r", i)); + delay(1000); + } + Serial.print(" \r"); +} + + +// Functions +/// +/// @brief Fonts test screen +/// @param flag true = default = perform flush, otherwise no +/// +/// @image html T2_FONTS..jpg +/// @image latex T2_FONTS.PDF width=10cm +/// +void displayFonts(bool flag = true) +{ + uint16_t y = 10; + myScreen.setOrientation(7); + + // #if (USE_FONT_MODE == USE_FONT_TERMINAL) + myScreen.selectFont(Font_Terminal12x16); + + myScreen.gText(10, y, myScreen.WhoAmI(), myColours.red); + y += myScreen.characterSizeY(); + myScreen.gText(10, y, formatString("%i x %i", myScreen.screenSizeX(), myScreen.screenSizeY()), myColours.red); + y += myScreen.characterSizeY(); + y += myScreen.characterSizeY(); + + myScreen.selectFont(Font_Terminal6x8); + myScreen.gText(10, y, "Terminal6x8"); + y += myScreen.characterSizeY(); + + myScreen.selectFont(Font_Terminal8x12); + myScreen.gText(10, y, "Terminal8x12"); + y += myScreen.characterSizeY(); + + myScreen.selectFont(Font_Terminal12x16); + myScreen.gText(10, y, "Terminal12x16"); + y += myScreen.characterSizeY(); + + myScreen.selectFont(Font_Terminal16x24); + myScreen.gText(10, y, "Terminal16x24"); + y += myScreen.characterSizeY(); + + // #elif (USE_FONT_MODE == USE_FONT_HEADER) + // + // #elif (USE_FONT_MODE == USE_FONT_FLASH) + // + // #else + // #error USE_FONT_MODE not defined + // #endif + + myScreen.flush(); +} + +// Add setup code +/// +/// @brief Setup +/// +void setup() +{ + Serial.begin(115200); + delay(500); + Serial.println(); + Serial.println("=== " __FILE__); + Serial.println("=== " __DATE__ " " __TIME__); + Serial.println(); + + Serial.print("begin... "); + myScreen.begin(); + Serial.println(formatString("%s %ix%i", myScreen.WhoAmI().c_str(), myScreen.screenSizeX(), myScreen.screenSizeY())); + + Serial.print("Fonts... "); + myScreen.clear(); + displayFonts(); + wait(8); + + Serial.print("White... "); + myScreen.clear(); + myScreen.flush(); + + Serial.println("=== "); + Serial.println(); + +#if defined(ARDUINO_ARCH_PIDUINO) + exit(0); +#endif +} + +// Add loop code +/// +/// @brief Loop, empty +/// +void loop() +{ + delay(1000); +} diff --git a/examples/Common_Forms/Common_Forms.ino b/examples/Common_Forms/Common_Forms.ino new file mode 100755 index 0000000..74a7d18 --- /dev/null +++ b/examples/Common_Forms/Common_Forms.ino @@ -0,0 +1,137 @@ +/// +/// @file Common_Palette.ino +/// @brief Example of features for basic edition +/// +/// @details Project Pervasive Displays Library Suite +/// @n Based on highView technology +/// +/// @author Rei Vilo +/// @date 02 Feb 2022 +/// @version 526 +/// +/// @copyright (c) Rei Vilo, 2010-2022 +/// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) +/// +/// @see ReadMe.txt for references +/// @n +/// + +// SDK +#if defined(ENERGIA) // LaunchPad specific +#include "Energia.h" +#else // Arduino general +#include "Arduino.h" +#endif // end IDE + +// Set parameters + +// Include application, user and local libraries +#include "SPI.h" +#include "PDLS_EXT3_Basic.h" + +// Define structures and classes + +// Define variables and constants +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_154, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_213, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_266, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_271, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_287, boardLaunchPad); +Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_370, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_417, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_437, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_565, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_581, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_741, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_969, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_B98, boardLaunchPad); + +// Prototypes + +// Utilities +/// +/// @brief Wait with countdown +/// @param second duration, s +/// +void wait(uint8_t second) +{ + for (uint8_t i = second; i > 0; i--) + { + Serial.print(formatString(" > %i \r", i)); + delay(1000); + } + Serial.print(" \r"); +} + + +// Functions +/// +/// @brief Basic forms test screen +/// @param flag true = default = perform flush, otherwise no +/// +/// @image html T2_FORMS.jpg +/// @image latex T2_FORMS.PDF width=10cm +/// +void displayForms(bool flag = true) +{ + myScreen.setOrientation(7); + + uint16_t x = myScreen.screenSizeX(); + uint16_t y = myScreen.screenSizeY(); + uint16_t z = min(x, y); + + myScreen.setPenSolid(false); + myScreen.dRectangle(0, 0, x, y, myColours.black); + myScreen.dLine(0, 0, x, y, myColours.red); + + myScreen.setPenSolid(true); + myScreen.circle(x / 3, y / 3, z / 4, myColours.grey); + // myScreen.triangle(x*2/3, y/3, x/2, y*2/3, x*3/4, y*2/3-10, myColours.black); + myScreen.triangle(x * 2 / 3, y / 3, x * 3 / 4, y * 2 / 3 - 10, x - 10, 10, myColours.black); + myScreen.dRectangle(x / 3, y * 2 / 3, x / 3, y / 4, myColours.red); + + myScreen.flush(); +} + +// Add setup code +/// +/// @brief Setup +/// +void setup() +{ + Serial.begin(115200); + delay(500); + Serial.println(); + Serial.println("=== " __FILE__); + Serial.println("=== " __DATE__ " " __TIME__); + Serial.println(); + + Serial.print("begin... "); + myScreen.begin(); + Serial.println(formatString("%s %ix%i", myScreen.WhoAmI().c_str(), myScreen.screenSizeX(), myScreen.screenSizeY())); + + Serial.print("Palettes... "); + myScreen.clear(); + displayForms(); + wait(8); + + Serial.print("White... "); + myScreen.clear(); + myScreen.flush(); + + Serial.println("=== "); + Serial.println(); + +#if defined(ARDUINO_ARCH_PIDUINO) + exit(0); +#endif +} + +// Add loop code +/// +/// @brief Loop, empty +/// +void loop() +{ + delay(1000); +} diff --git a/examples/Common_Orientation/Common_Orientation.ino b/examples/Common_Orientation/Common_Orientation.ino new file mode 100755 index 0000000..b4fd2f0 --- /dev/null +++ b/examples/Common_Orientation/Common_Orientation.ino @@ -0,0 +1,129 @@ +/// +/// @file Common_Palette.ino +/// @brief Example of features for basic edition +/// +/// @details Project Pervasive Displays Library Suite +/// @n Based on highView technology +/// +/// @author Rei Vilo +/// @date 16 Aug 2021 +/// @version 508 +/// +/// @copyright (c) Rei Vilo, 2010-2022 +/// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) +/// +/// @see ReadMe.txt for references +/// @n +/// + +// SDK +#if defined(ENERGIA) // LaunchPad specific +#include "Energia.h" +#else // Arduino general +#include "Arduino.h" +#endif // end IDE + +// Set parameters + +// Include application, user and local libraries +#include "SPI.h" +#include "PDLS_EXT3_Basic.h" + +// Define structures and classes + +// Define variables and constants +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_154, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_213, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_266, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_271, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_287, boardLaunchPad); +Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_370, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_417, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_437, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_565, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_581, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_741, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_969, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_B98, boardLaunchPad); + +// Prototypes + +// Utilities +/// +/// @brief Wait with countdown +/// @param second duration, s +/// +void wait(uint8_t second) +{ + for (uint8_t i = second; i > 0; i--) + { + Serial.print(formatString(" > %i \r", i)); + delay(1000); + } + Serial.print(" \r"); +} + + +// Functions +/// +/// @brief Orientation test screen +/// @param flag true = default = perform flush, otherwise no +/// +/// @image html T2_ORIEN.jpg +/// @image latex T2_ORIEN.PDF width=10cm +/// +void displayOrientation(bool flag = true) +{ + myScreen.selectFont(Font_Terminal8x12); + + for (uint8_t i = 0; i < 4; i++) + { + myScreen.setOrientation(i); + myScreen.gText(10, 10, formatString("> Orientation %i", i)); + } + + myScreen.flush(); +} + +// Add setup code +/// +/// @brief Setup +/// +void setup() +{ + Serial.begin(115200); + delay(500); + Serial.println(); + Serial.println("=== " __FILE__); + Serial.println("=== " __DATE__ " " __TIME__); + Serial.println(); + + Serial.print("begin... "); + myScreen.begin(); + Serial.println(formatString("%s %ix%i", myScreen.WhoAmI().c_str(), myScreen.screenSizeX(), myScreen.screenSizeY())); + + Serial.print("Orientation... "); + myScreen.clear(); + displayOrientation(); + wait(8); + + Serial.print("White... "); + myScreen.clear(); + myScreen.flush(); + + Serial.println("=== "); + Serial.println(); + +#if defined(ARDUINO_ARCH_PIDUINO) + exit(0); +#endif +} + +// Add loop code +/// +/// @brief Loop, empty +/// +void loop() +{ + delay(1000); +} diff --git a/examples/Common_Text/Common_Text.ino b/examples/Common_Text/Common_Text.ino new file mode 100755 index 0000000..f3c5c96 --- /dev/null +++ b/examples/Common_Text/Common_Text.ino @@ -0,0 +1,160 @@ +/// +/// @file Common_Palette.ino +/// @brief Example of features for basic edition +/// +/// @details Project Pervasive Displays Library Suite +/// @n Based on highView technology +/// +/// @author Rei Vilo +/// @date 16 Aug 2021 +/// @version 508 +/// +/// @copyright (c) Rei Vilo, 2010-2022 +/// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) +/// +/// @see ReadMe.txt for references +/// @n +/// + +// SDK +#if defined(ENERGIA) // LaunchPad specific +#include "Energia.h" +#else // Arduino general +#include "Arduino.h" +#endif // end IDE + +// Set parameters + +// Include application, user and local libraries +#include "SPI.h" +#include "PDLS_EXT3_Basic.h" + +// Define structures and classes + +// Define variables and constants +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_154, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_213, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_266, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_271, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_287, boardLaunchPad); +Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_370, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_417, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_437, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_565, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_581, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_741, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_969, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_B98, boardLaunchPad); + +// Prototypes + +// Utilities +/// +/// @brief Wait with countdown +/// @param second duration, s +/// +void wait(uint8_t second) +{ + for (uint8_t i = second; i > 0; i--) + { + Serial.print(formatString(" > %i \r", i)); + delay(1000); + } + Serial.print(" \r"); +} + + +// Functions +/// +/// @brief Characters test screen +/// @param flag true = default = perform flush, otherwise no +/// +/// @image html T2_CHARA.jpg +/// @image latex T2_CHARA.PDF width=10cm +/// +void displayCharacters(bool flag = true) +{ + myScreen.setOrientation(7); + uint16_t x = myScreen.screenSizeX(); // 17 + uint16_t y = myScreen.screenSizeY(); // 14 + + // #if (USE_FONT_MODE == USE_FONT_TERMINAL) + myScreen.selectFont(Font_Terminal8x12); + // #elif (USE_FONT_MODE == USE_FONT_HEADER) + // + // #elif (USE_FONT_MODE == USE_FONT_FLASH) + // + // #else + // #error USE_FONT_MODE not defined + // #endif + + uint8_t k; + String text; + uint16_t dx; + + for (uint8_t i = 1; i < 17; i++) + { + myScreen.gText(i * x / 17, 0, formatString(".%x", (i - 1)), myColours.red); + } + for (uint8_t j = 2; j < 16; j++) + { + myScreen.gText(0, (j - 1)*y / 15, formatString("%x.", (j)), myColours.red); + } + + for (uint16_t i = 1; i < 17; i++) + { + for (uint8_t j = 2; j < 16; j++) + { + k = (i - 1) + j * 16; + + text = (String)char(k); + dx = i * x / 17 + (x / 17 - myScreen.stringSizeX(text)) / 2; + myScreen.gText(dx, (j - 1)*y / 15, text, myColours.black); + } + } + + myScreen.flush(); +} + +// Add setup code +/// +/// @brief Setup +/// +void setup() +{ + Serial.begin(115200); + delay(500); + Serial.println(); + Serial.println("=== " __FILE__); + Serial.println("=== " __DATE__ " " __TIME__); + Serial.println(); + + Serial.print("begin... "); + myScreen.begin(); + Serial.println(formatString("%s %ix%i", myScreen.WhoAmI().c_str(), myScreen.screenSizeX(), myScreen.screenSizeY())); + + Serial.print("Characters... "); + myScreen.clear(); + displayCharacters(); + wait(8); + + Serial.print("White... "); + myScreen.clear(); + myScreen.flush(); + + Serial.println("=== "); + Serial.println(); + +#if defined(ARDUINO_ARCH_PIDUINO) + exit(0); +#endif +} + +// Add loop code +/// +/// @brief Loop, empty +/// +void loop() +{ + delay(1000); +} diff --git a/examples/Common_WhoAmI/Common_WhoAmI.ino b/examples/Common_WhoAmI/Common_WhoAmI.ino new file mode 100755 index 0000000..ae2c19e --- /dev/null +++ b/examples/Common_WhoAmI/Common_WhoAmI.ino @@ -0,0 +1,124 @@ +/// +/// @file Common_WhoAmI.ino +/// @brief Example of features for basic edition +/// +/// @details Project Pervasive Displays Library Suite +/// @n Based on highView technology +/// +/// @author Rei Vilo +/// @date 02 Feb 2022 +/// @version 526 +/// +/// @copyright (c) Rei Vilo, 2010-2022 +/// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) +/// +/// @see ReadMe.txt for references +/// @n +/// + +// SDK +#if defined(ENERGIA) // LaunchPad specific +#include "Energia.h" +#else // Arduino general +#include "Arduino.h" +#endif // end IDE + +// Set parameters + +// Include application, user and local libraries +#include "SPI.h" +#include "PDLS_EXT3_Basic.h" + +// Define structures and classes + +// Define variables and constants +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_154, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_213, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_266, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_271, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_287, boardLaunchPad); +Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_370, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_417, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_437, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_565, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_581, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_741, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_969, boardLaunchPad); +// Screen_EPD_EXT3 myScreen(eScreen_EPD_EXT3_B98, boardLaunchPad); + +// Prototypes + +// Utilities +/// +/// @brief Wait with countdown +/// @param second duration, s +/// +void wait(uint8_t second) +{ + for (uint8_t i = second; i > 0; i--) + { + Serial.print(formatString(" > %i \r", i)); + delay(1000); + } + Serial.print(" \r"); +} + +// Functions +/// +/// @brief Who am i? test screen +/// +/// @image html T2_WHOAMI.jpg +/// @image latex T2_WHOAMI.PDF width=10cm +/// +void displayWhoAmI() +{ + myScreen.setOrientation(7); + myScreen.selectFont(Font_Terminal8x12); + myScreen.gText(4, 4, myScreen.WhoAmI()); + myScreen.flush(); +} + +// Add setup code +/// +/// @brief Setup +/// +void setup() +{ + Serial.begin(115200); + delay(500); + Serial.println(); + Serial.println("=== " __FILE__); + Serial.println("=== " __DATE__ " " __TIME__); + Serial.println(); + + Serial.print("begin... "); + myScreen.begin(); + Serial.println(formatString("%s %ix%i", myScreen.WhoAmI().c_str(), myScreen.screenSizeX(), myScreen.screenSizeY())); + + Serial.print("Who Am I... "); + + myScreen.begin(); + myScreen.clear(); + displayWhoAmI(); + wait(8); + + Serial.print("White... "); + myScreen.clear(); + myScreen.flush(); + + Serial.println("=== "); + Serial.println(); + +#if defined(ARDUINO_ARCH_PIDUINO) + exit(0); +#endif +} + +// Add loop code +/// +/// @brief Loop, empty +/// +void loop() +{ + delay(1000); +} diff --git a/examples/Example_Fast_Line/Example_Fast_Line.ino b/examples/Example_Fast_Line/Example_Fast_Line.ino new file mode 100755 index 0000000..7005867 --- /dev/null +++ b/examples/Example_Fast_Line/Example_Fast_Line.ino @@ -0,0 +1,144 @@ +/// +/// @file Example_Fast_Line.ino +/// @brief Example of features for basic edition +/// +/// @details Library for Pervasive Displays EXT3 - Basic level +/// +/// @author Rei Vilo +/// @date 23 Aug 2021 +/// @version 509 +/// +/// @copyright (c) Rei Vilo, 2010-2022 +/// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) +/// +/// @see ReadMe.txt for references +/// @n +/// + +// SDK +#if defined(ENERGIA) // LaunchPad specific +#include "Energia.h" +#else // Arduino general +#include "Arduino.h" +#endif // end IDE + +// Set parameters +#define DISPLAY_FAST_LINE 1 + +// Include application, user and local libraries +#include "SPI.h" +#include "PDLS_EXT3_Basic_Fast.h" + +// Define structures and classes + +// Define variables and constants +Screen_EPD_EXT3_Fast myScreen(eScreen_EPD_EXT3_271_Fast, boardLaunchPad); + +// Prototypes + +// Utilities +/// +/// @brief Wait with countdown +/// @param second duration, s +/// +void wait(uint8_t second) +{ + for (uint8_t i = second; i > 0; i--) + { + Serial.print(formatString(" > %i \r", i)); + delay(1000); + } + Serial.print(" \r"); +} + +/// +/// @brief Flush screen and display time +/// +void flush_ms() +{ + uint32_t chrono = (uint32_t)millis(); + myScreen.flush(); + Serial.print(millis() - chrono); + Serial.println(" ms"); +} + + +#if (DISPLAY_FAST_LINE == 1) +void displayFastLine() +{ + myScreen.setOrientation(7); + + uint16_t x, y, dx, dy; + int32_t value = 128; + + x = myScreen.screenSizeX(); + x -= (x % 32); + y = myScreen.screenSizeY(); + dx = x / 5; + dy = y / 5; + + myScreen.selectFont(myScreen.fontMax()); + myScreen.gText(0, 0, "Line"); + + myScreen.flush(); + + myScreen.setPenSolid(true); + uint32_t chrono; + for (uint16_t index = 0; index < x; index += 32) + { + myScreen.dRectangle(index, dy, 32, dy * 4, myColours.grey); + chrono = millis(); + myScreen.flush(); + Serial.println(formatString("%i - %i = %i", chrono, millis(), millis() - chrono)); + } +} + +#endif // DISPLAY_FAST_LINE + +// Add setup code +/// +/// @brief Setup +/// +void setup() +{ + Serial.begin(115200); + delay(500); + Serial.println(); + Serial.println("=== " __FILE__); + Serial.println("=== " __DATE__ " " __TIME__); + Serial.println(); + + Serial.print("begin... "); + myScreen.begin(); + Serial.println(formatString("%s %ix%i", myScreen.WhoAmI().c_str(), myScreen.screenSizeX(), myScreen.screenSizeY())); + +#if (DISPLAY_FAST_LINE == 1) + + Serial.print("DISPLAY_FAST_LINE... "); + myScreen.clear(); + displayFastLine(); + Serial.println("done"); + + wait(4); +#endif // DISPLAY_FAST_LINE + + Serial.print("White... "); + myScreen.clear(); + flush_ms(); + + Serial.println("=== "); + Serial.println(); + +#if defined(ARDUINO_ARCH_PIDUINO) + exit(0); +#endif +} + +// Add loop code +/// +/// @brief Loop, empty +/// +void loop() +{ + delay(1000); +} diff --git a/examples/Example_Fast_Orientation/Example_Fast_Orientation.ino b/examples/Example_Fast_Orientation/Example_Fast_Orientation.ino new file mode 100755 index 0000000..15b3877 --- /dev/null +++ b/examples/Example_Fast_Orientation/Example_Fast_Orientation.ino @@ -0,0 +1,128 @@ +/// +/// @file Example_Fast_Orientation.ino +/// @brief Example of features for basic edition +/// +/// @details Library for Pervasive Displays EXT3 - Basic level +/// +/// @author Rei Vilo +/// @date 23 Aug 2021 +/// @version 509 +/// +/// @copyright (c) Rei Vilo, 2010-2022 +/// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) +/// +/// @see ReadMe.txt for references +/// @n +/// + +// SDK +#if defined(ENERGIA) // LaunchPad specific +#include "Energia.h" +#else // Arduino general +#include "Arduino.h" +#endif // end IDE + +// Set parameters +#define DISPLAY_FAST_ORIENTATION 1 + +// Include application, user and local libraries +#include "SPI.h" +#include "PDLS_EXT3_Basic_Fast.h" + +// Define structures and classes + +// Define variables and constants +Screen_EPD_EXT3_Fast myScreen(eScreen_EPD_EXT3_271_Fast, boardLaunchPad); + +// Prototypes + +// Utilities +/// +/// @brief Wait with countdown +/// @param second duration, s +/// +void wait(uint8_t second) +{ + for (uint8_t i = second; i > 0; i--) + { + Serial.print(formatString(" > %i \r", i)); + delay(1000); + } + Serial.print(" \r"); +} + +/// +/// @brief Flush screen and display time +/// +void flush_ms() +{ + uint32_t chrono = (uint32_t)millis(); + myScreen.flush(); + Serial.print(millis() - chrono); + Serial.println(" ms"); +} + +#if (DISPLAY_FAST_ORIENTATION == 1) + +void displayFastOrientation() +{ + myScreen.clear(); + myScreen.selectFont(2); + + for (uint8_t i = 0; i < 4; i++) + { + myScreen.setOrientation(i); + myScreen.gText(4, 4, formatString("> Orientation %i", i)); + flush_ms(); + } +} + +#endif // DISPLAY_FAST_ORIENTATION + +// Add setup code +/// +/// @brief Setup +/// +void setup() +{ + Serial.begin(115200); + delay(500); + Serial.println(); + Serial.println("=== " __FILE__); + Serial.println("=== " __DATE__ " " __TIME__); + Serial.println(); + + Serial.print("begin... "); + myScreen.begin(); + Serial.println(formatString("%s %ix%i", myScreen.WhoAmI().c_str(), myScreen.screenSizeX(), myScreen.screenSizeY())); + +#if (DISPLAY_FAST_ORIENTATION == 1) + Serial.print("DISPLAY_FAST_ORIENTATION... "); + myScreen.clear(); + displayFastOrientation(); + Serial.println("done"); + + wait(4); + +#endif // DISPLAY_FAST_ORIENTATION + + Serial.print("White... "); + myScreen.clear(); + flush_ms(); + + Serial.println("=== "); + Serial.println(); + +#if defined(ARDUINO_ARCH_PIDUINO) + exit(0); +#endif +} + +// Add loop code +/// +/// @brief Loop, empty +/// +void loop() +{ + delay(1000); +} diff --git a/examples/GUI_Basic_Button/GUI_Basic_Button.ino b/examples/GUI_Basic_Button/GUI_Basic_Button.ino index 0b5adce..8a1e8b7 100755 --- a/examples/GUI_Basic_Button/GUI_Basic_Button.ino +++ b/examples/GUI_Basic_Button/GUI_Basic_Button.ino @@ -69,8 +69,6 @@ void displayGUI() myScreen.clear(); myScreen.setOrientation(3); - // myScreen.gText(0, 0, __FILE__); - // myScreen.gText(0, myScreen.characterSizeY(), myScreen.WhoAmI()); myGUI.begin(); diff --git a/library.properties b/library.properties old mode 100644 new mode 100755 index 44173ef..cadf97f --- a/library.properties +++ b/library.properties @@ -1,8 +1,8 @@ name=PDLS_EXT3_Basic_Touch -version=5.3.1 +version=5.3.3 author=Rei Vilo for Pervasive Displays maintainer=Rei Vilo -sentence=Library for Pervasive Displays monchrome touch e-paper screens +sentence=Library and GUI for Pervasive Displays monochrome touch e-paper screens paragraph=2.70 and 3.70 panels with EXT3-1 and EXT3-Touch boards category=Display url=https://pdls.pervasivedisplays.com/userguide/ diff --git a/src/Screen_EPD_EXT3.cpp b/src/Screen_EPD_EXT3.cpp index 419bf17..5b3d2ab 100755 --- a/src/Screen_EPD_EXT3.cpp +++ b/src/Screen_EPD_EXT3.cpp @@ -15,6 +15,7 @@ // Release 527: Added support for ESP32 PSRAM // Release 530: Added support for new 3.70"-Touch // Release 531: Ready for hV_GUI_Basic +// Release 533: Improved touch release // // Library header @@ -721,6 +722,11 @@ void Screen_EPD_EXT3_Fast::_getRawTouch(uint16_t & x0, uint16_t & y0, uint16_t & y0 = _touchY; z0 = 0x16; } + else if (_touchPrevious == TOUCH_EVENT_NONE) + { + t0 = TOUCH_EVENT_NONE; + z0 = 0; + } } else if (_codeSize == 0x37) { @@ -774,6 +780,11 @@ void Screen_EPD_EXT3_Fast::_getRawTouch(uint16_t & x0, uint16_t & y0, uint16_t & y0 = _touchY; z0 = 0x16; } + else if (_touchPrevious == TOUCH_EVENT_NONE) + { + t0 = TOUCH_EVENT_NONE; + z0 = 0; + } } } diff --git a/src/Screen_EPD_EXT3.h b/src/Screen_EPD_EXT3.h index fe21bb4..abd65de 100755 --- a/src/Screen_EPD_EXT3.h +++ b/src/Screen_EPD_EXT3.h @@ -1,23 +1,23 @@ /// /// @file Screen_EPD_EXT3.h -/// @brief Driver for Pervasive Displays iTC monochrome screens with EXT3 +/// @brief Driver for Pervasive Displays iTC monochrome touch-screens and EXT3 board /// /// @details Project Pervasive Displays Library Suite /// @n Based on highView technology /// -/// @n @b B-S-F +/// @n @b B-T-F /// * Edition: Basic /// * Family: Touch 2.70-P 3.70-P /// * Update: Fast /// * Feature: none /// /// @n Supported screens -/// * 2.70"-Touch reference xTP270PGH0x (not tested) +/// * 2.70"-Touch reference xTP270PGH0x /// * 3.70"-Touch reference xTP370PGH0x /// /// @author Rei Vilo -/// @date 28 Mar 2022 -/// @version 531 +/// @date 21 Jun 2022 +/// @version 533 /// /// @copyright (c) Rei Vilo, 2010-2022 /// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) @@ -37,7 +37,7 @@ #include "Energia.h" #else // Arduino general #include "Arduino.h" -#endif // IDE +#endif // SDK // Configuration #include "hV_Configuration.h" @@ -50,7 +50,7 @@ /// /// @brief Library release number /// -#define SCREEN_EPD_EXT3_RELEASE 531 +#define SCREEN_EPD_EXT3_RELEASE 533 // Other libraries #include "SPI.h" @@ -76,8 +76,8 @@ /// /// @brief Class for Pervasive Displays iTC monochome touch screens /// @details Screen controllers -/// * LCD: propietary, SPI -/// * touch: no touch +/// * LCD: proprietary, SPI +/// * touch: proprietary, I2C /// * fonts: no fonts /// /// @note All commands work on the frame-buffer, diff --git a/src/hV_Configuration.h b/src/hV_Configuration.h index c6c8a5a..5d65f93 100755 --- a/src/hV_Configuration.h +++ b/src/hV_Configuration.h @@ -11,15 +11,15 @@ /// 4- Maximum number of fonts /// 5- SRAM memory, internal MCU for basic edition /// 6- Use self for basic edition -/// 7- Touch mode, not implemented +/// 7- Touch mode, activated or not /// 8- Haptic feedback mode, not implemented /// 9. Set GPIO expander mode, not implemented /// 10. String object for basic edition /// 11. Set storage mode, not implemented /// /// @author Rei Vilo -/// @date 18 Mar 2022 -/// @version 530 +/// @date 07 Jun 2022 +/// @version 533 /// /// @copyright (c) Rei Vilo, 2010-2022 /// @copyright All rights reserved @@ -49,7 +49,7 @@ /// /// @brief Release /// -#define hV_CONFIGURATION_RELEASE 530 +#define hV_CONFIGURATION_RELEASE 533 /// /// @name 1- List of supported Pervasive Displays screens @@ -82,11 +82,11 @@ #define eScreen_EPD_EXT3_969_08 (uint32_t)0x9608 ///< reference xE2969CS08x, previous type #define eScreen_EPD_EXT3_B98_08 (uint32_t)0xB908 ///< reference xE2B98CS08x, previous type -/// * Specific monochrome touch screens +/// * Specific monochrome touch screens #define eScreen_EPD_EXT3_270_Touch (uint32_t)0x0127f0 ///< reference xTP270PGH0x with embedded fast update #define eScreen_EPD_EXT3_370_Touch (uint32_t)0x0137f0 ///< reference xTP370PGH0x with embedded fast update -/// * Specific monochrome screens, fast and partial update +/// * Specific small monochrome screens, fast and partial update #define eScreen_EPD_EXT3_154_0C (uint32_t)0x150C ///< reference xE2154CS0Cx #define eScreen_EPD_EXT3_213_09 (uint32_t)0x2109 ///< reference xE2213xS09x #define eScreen_EPD_EXT3_213_0C (uint32_t)0x210C ///< reference xE2213CS0Cx @@ -100,8 +100,12 @@ #define eScreen_EPD_EXT3_417_05 (uint32_t)0x4105 ///< reference xE2417CS05x #define eScreen_EPD_EXT3_417_0D (uint32_t)0x410D ///< reference xE2417CS0Dx #define eScreen_EPD_EXT3_437_0C (uint32_t)0x430C ///< reference xE2437CS0Cx + +/// * Specific medium monochrome screens, fast and partial update #define eScreen_EPD_EXT3_581_0B (uint32_t)0x580B ///< reference xE2581CS0Bx #define eScreen_EPD_EXT3_741_0B (uint32_t)0x740B ///< reference xE2741CS0Bx + +/// * Specific large monochrome screens, fast and partial update #define eScreen_EPD_EXT3_969_0B (uint32_t)0x960B ///< reference xE2969CS0Bx #define eScreen_EPD_EXT3_B98_0B (uint32_t)0xB90B ///< reference xE2B98CS0Bx @@ -173,10 +177,10 @@ const pins_t boardLaunchPad = .panelReset = 13, ///< EXT3 and EXT3-1 pin 5 Yellow .flashCS = 18, ///< EXT3 and EXT3-1 pin 8 Violet .panelCS = 19, ///< EXT3 and EXT3-1 pin 9 Grey - .panelCSS = 39, ///< EXT3 and EXT3-1 pin 12 Grey2 - .flashCSS = 38, ///< EXT3 pin 20 or EXT3-1 pin 11 Black2 - .touchInt = 8, // NOT_CONNECTED, ///< EXT3-Touch pin 3 Red -> 8 - .touchReset = 6, // NOT_CONNECTED, ///< EXT3-Touch pin 4 Orange -> 6 + .panelCSS = 39, ///< EXT3 and EXT3-1 pin 12 Grey2 -> 39 + .flashCSS = 38, ///< EXT3 pin 20 or EXT3-1 pin 11 Black2 -> 38 + .touchInt = 8, ///< EXT3-Touch pin 3 Red -> 8 + .touchReset = 6, ///< EXT3-Touch pin 4 Orange -> 6 .cardCS = NOT_CONNECTED, ///< Separate SD-card board -> 5 .cardDetect = NOT_CONNECTED, ///< Separate SD-card board }; @@ -209,8 +213,8 @@ const pins_t boardCC1352 = .panelReset = 19, ///< EXT3 and EXT3-1 pin 5 Yellow .flashCS = 24, ///< EXT3 and EXT3-1 pin 8 Violet .panelCS = 26, ///< EXT3 and EXT3-1 pin 9 Grey - .panelCSS = 37, ///< EXT3 and EXT3-1 pin 12 Grey2 - .flashCSS = 27, ///< EXT3 pin 20 or EXT3-1 pin 11 Black2 + .panelCSS = 37, ///< EXT3 and EXT3-1 pin 12 Grey2 -> 37 + .flashCSS = 27, ///< EXT3 pin 20 or EXT3-1 pin 11 Black2 -> 27 .touchInt = NOT_CONNECTED, ///< EXT3-Touch pin 3 Red .touchReset = NOT_CONNECTED, ///< EXT3-Touch pin 4 Orange .cardCS = NOT_CONNECTED, ///< Separate SD-card board @@ -367,6 +371,81 @@ const pins_t boardESP32DevKitC = .cardDetect = NOT_CONNECTED, ///< Separate SD-card board }; +/// +/// @brief Espressif ESP32-Pico-v4 +/// @note Numbers refer to GPIOs not pins +/// +const pins_t boardESP32PicoKitV4 = +{ + .panelBusy = 27, ///< EXT3 and EXT3-1 pin 3 Red -> GPIO27 + .panelDC = 26, ///< EXT3 and EXT3-1 pin 4 Orange -> GPIO26 + .panelReset = 25, ///< EXT3 and EXT3-1 pin 5 Yellow -> GPIO25 + .flashCS = 33, ///< EXT3 and EXT3-1 pin 8 Violet -> GPIO33 + .panelCS = 32, ///< EXT3 and EXT3-1 pin 9 Grey -> GPIO32 + .panelCSS = 4, ///< EXT3 and EXT3-1 pin 12 Grey2 -> GPIO4 + .flashCSS = 0, ///< EXT3 pin 20 or EXT3-1 pin 11 Black2 -> GPIO0 + .touchInt = 10, ///< EXT3-Touch pin 3 Red -> GPIO10 + .touchReset = 9, ///< EXT3-Touch pin 4 Orange -> GPIO9 + .cardCS = NOT_CONNECTED, ///< Separate SD-card board + .cardDetect = NOT_CONNECTED, ///< Separate SD-card board +}; + +/// +/// @brief Espressif ESP32-Pico-DevKitM-2 +/// @note Numbers refer to GPIOs not pins +/// +const pins_t boardESP32PicoDevKitM2 = +{ + .panelBusy = 25, ///< EXT3 and EXT3-1 pin 3 Red -> GPIO25 + .panelDC = 26, ///< EXT3 and EXT3-1 pin 4 Orange -> GPIO26 + .panelReset = 32, ///< EXT3 and EXT3-1 pin 5 Yellow -> GPIO32 + .flashCS = 33, ///< EXT3 and EXT3-1 pin 8 Violet -> GPIO33 + .panelCS = 27, ///< EXT3 and EXT3-1 pin 9 Grey -> GPIO27 + .panelCSS = NOT_CONNECTED, ///< EXT3 and EXT3-1 pin 12 Grey2 -> GPIO33 + .flashCSS = NOT_CONNECTED, ///< EXT3 pin 20 or EXT3-1 pin 11 Black2 -> GPIO27 + .touchInt = 19, ///< EXT3-Touch pin 3 Orange -> GPIO19 + .touchReset = 8, ///< EXT3-Touch pin 4 Red -> GPIO8 + .cardCS = NOT_CONNECTED, ///< Separate SD-card board + .cardDetect = NOT_CONNECTED, ///< Separate SD-card board +}; + +// +/// @brief Seeed Xiao RP240 +/// @note Numbers refer to GPIOs not pins +/// +const pins_t boardXiaoRP2040 +{ + .panelBusy = 26, ///< EXT3 and EXT3-1 pin 3 Red -> D0 GPIO26 + .panelDC = 27, ///< EXT3 and EXT3-1 pin 4 Orange -> D1 GPIO27 + .panelReset = 28, ///< EXT3 and EXT3-1 pin 5 Yellow -> D2 GPIO28 + .flashCS = 6, ///< EXT3 and EXT3-1 pin 8 Violet -> D4 GPIO6 + .panelCS = 29, ///< EXT3 and EXT3-1 pin 9 Grey -> D3 GPIO29 + .panelCSS = 7, ///< EXT3 and EXT3-1 pin 12 Grey2 -> D5 GPIO7 + .flashCSS = NOT_CONNECTED, ///< EXT3 pin 20 or EXT3-1 pin 11 Black2 -> N/A + .touchInt = NOT_CONNECTED, ///< EXT3-Touch pin 3 Orange -> D6 GPIO0 + .touchReset = NOT_CONNECTED, ///< EXT3-Touch pin 4 Red -> D7 GPIO1 + .cardCS = NOT_CONNECTED, ///< Separate SD-card board + .cardDetect = NOT_CONNECTED, ///< Separate SD-card board +}; + +/// +/// @brief Teensy 3.x configuration, tested +/// +const pins_t boardTeensy3x = +{ + .panelBusy = 14, ///< EXT3 and EXT3-1 pin 3 Red + .panelDC = 15, ///< EXT3 and EXT3-1 pin 4 Orange + .panelReset = 16, ///< EXT3 and EXT3-1 pin 5 Yellow + .flashCS = 17, ///< EXT3 and EXT3-1 pin 8 Violet + .panelCS = 18, ///< EXT3 and EXT3-1 pin 9 Grey + .panelCSS = NOT_CONNECTED, ///< EXT3 and EXT3-1 pin 12 Grey2 + .flashCSS = NOT_CONNECTED, ///< EXT3 and EXT3-1 pin 20 Black2 + .touchInt = NOT_CONNECTED, ///< EXT3-Touch pin 3 Orange + .touchReset = NOT_CONNECTED, ///< EXT3-Touch pin 4 Red + .cardCS = NOT_CONNECTED, ///< Separate SD-card board + .cardDetect = NOT_CONNECTED, ///< Separate SD-card board +}; + /// @} /// diff --git a/src/hV_Documentation.h b/src/hV_Documentation.h index e7d1327..68cb651 100755 --- a/src/hV_Documentation.h +++ b/src/hV_Documentation.h @@ -11,17 +11,30 @@ /// /// It provides a high-level interface to drive the e-paper screens with global, fast and partial update, supports capacitive touch and haptic feed-back. /// +/// @b Variants +/// +/// The basic edition includes different variants: +/// +/// * **PDLS_EXT3_Basic** drives all the screens, monochrome and colour, with global update; +/// +/// * **PDLS_EXT3_Basic_Fast** drives the screens with embedded fast update; +/// +/// * **PDLS_EXT3_Basic_Touch** drives the screens with embedded fast update and capacitive touch. +/// /// @b Documentation /// /// The documentation includes two documents: /// /// * This **Reference manual** lists all the objects and functions, with details for their parameters and returned results. /// -/// * The [User guide](https://pdls.pervasivedisplays.com/userguide/index.html) focuses on how to use the different libraries, with commented examples; +/// * The [User guide](https://pdls.pervasivedisplays.com/userguide/index.html) focuses on how to use the different libraries, with commented examples. +/// +/// Additionally, the **[Wiki](https://docs.pervasivedisplays.com/)** provides a gradual introduction to the e-paper technology and how to use it. +/// /// /// @author Rei Vilo -/// @date 18 Mar 2022 -/// @version 531 +/// @date 07 Jun 2022 +/// @version 533 /// /// @copyright (c) Rei Vilo, 2010-2022 /// @copyright All rights reserved