From ebdaf3e9a9a5b6cae7385d1be44d253904e291db Mon Sep 17 00:00:00 2001 From: Rei Vilo Date: Wed, 11 Dec 2024 09:53:18 +0100 Subject: [PATCH] Release 8.1.0 --- examples/BWRY/BWRY_Colours/BWRY_Colours.ino | 8 +- .../BWRY/BWRY_Contrasts/BWRY_Contrasts.ino | 8 +- examples/BWRY/BWRY_Palette/BWRY_Palette.ino | 8 +- examples/BWRY/BWRY_WhoAmI/BWRY_WhoAmI.ino | 8 +- .../Common/Common_Colours/Common_Colours.ino | 15 +- examples/Common/Common_Fonts/Common_Fonts.ino | 20 +- examples/Common/Common_Forms/Common_Forms.ino | 22 +- .../Common_Orientation/Common_Orientation.ino | 20 +- .../Common_Persistent/Common_Persistent.ino | 25 +- examples/Common/Common_Speed/Common_Speed.ino | 4 +- examples/Common/Common_Text/Common_Text.ino | 22 +- .../Common/Common_WhoAmI/Common_WhoAmI.ino | 22 +- library.properties | 2 +- src/PDLS_EXT3_Basic_BWRY.h | 6 +- src/Screen_EPD_EXT3.cpp | 5 +- src/Screen_EPD_EXT3.h | 22 +- src/Terminal12x16e.h | 6 +- src/Terminal16x24e.h | 6 +- src/Terminal6x8e.h | 6 +- src/Terminal8x12e.h | 6 +- src/hV_Board.cpp | 35 +++ src/hV_Board.h | 11 +- src/hV_Colours565.h | 6 +- src/hV_Common.h | 8 +- src/hV_Configuration.h | 24 +- src/hV_Documentation.h | 24 +- src/hV_Font.h | 6 +- src/hV_Font_Terminal.h | 10 +- src/hV_HAL_Peripherals.cpp | 1 + src/hV_HAL_Peripherals.h | 58 ++++- src/hV_List_Boards.h | 221 +++++++++++++++++- src/hV_List_Constants.h | 6 +- src/hV_List_Options.h | 21 +- src/hV_List_Screens.h | 6 +- src/hV_List_Screens_Legacy.h | 6 +- src/hV_Screen_Buffer.cpp | 42 ++-- src/hV_Screen_Buffer.h | 6 +- src/hV_Utilities_Common.cpp | 39 ++-- src/hV_Utilities_Common.h | 60 ++--- src/hV_Utilities_PDLS.cpp | 1 + src/hV_Utilities_PDLS.h | 20 +- 41 files changed, 630 insertions(+), 222 deletions(-) diff --git a/examples/BWRY/BWRY_Colours/BWRY_Colours.ino b/examples/BWRY/BWRY_Colours/BWRY_Colours.ino index 76e0515..f3453b4 100755 --- a/examples/BWRY/BWRY_Colours/BWRY_Colours.ino +++ b/examples/BWRY/BWRY_Colours/BWRY_Colours.ino @@ -6,8 +6,8 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Mar 2024 -/// @version 801 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -40,8 +40,8 @@ // Configuration #include "hV_Configuration.h" -#if (SCREEN_EPD_EXT3_RELEASE < 801) -#error Required SCREEN_EPD_EXT3_RELEASE 801 +#if (SCREEN_EPD_EXT3_RELEASE < 810) +#error Required SCREEN_EPD_EXT3_RELEASE 810 #endif // SCREEN_EPD_EXT3_RELEASE // Set parameters diff --git a/examples/BWRY/BWRY_Contrasts/BWRY_Contrasts.ino b/examples/BWRY/BWRY_Contrasts/BWRY_Contrasts.ino index 4e83eeb..76859ba 100755 --- a/examples/BWRY/BWRY_Contrasts/BWRY_Contrasts.ino +++ b/examples/BWRY/BWRY_Contrasts/BWRY_Contrasts.ino @@ -6,8 +6,8 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Mar 2024 -/// @version 801 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -39,8 +39,8 @@ // Configuration #include "hV_Configuration.h" -#if (SCREEN_EPD_EXT3_RELEASE < 801) -#error Required SCREEN_EPD_EXT3_RELEASE 801 +#if (SCREEN_EPD_EXT3_RELEASE < 810) +#error Required SCREEN_EPD_EXT3_RELEASE 810 #endif // SCREEN_EPD_EXT3_RELEASE // Set parameters diff --git a/examples/BWRY/BWRY_Palette/BWRY_Palette.ino b/examples/BWRY/BWRY_Palette/BWRY_Palette.ino index 3875b93..cec96ea 100755 --- a/examples/BWRY/BWRY_Palette/BWRY_Palette.ino +++ b/examples/BWRY/BWRY_Palette/BWRY_Palette.ino @@ -6,8 +6,8 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Mar 2024 -/// @version 801 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -39,8 +39,8 @@ // Configuration #include "hV_Configuration.h" -#if (SCREEN_EPD_EXT3_RELEASE < 801) -#error Required SCREEN_EPD_EXT3_RELEASE 801 +#if (SCREEN_EPD_EXT3_RELEASE < 810) +#error Required SCREEN_EPD_EXT3_RELEASE 810 #endif // SCREEN_EPD_EXT3_RELEASE // Set parameters diff --git a/examples/BWRY/BWRY_WhoAmI/BWRY_WhoAmI.ino b/examples/BWRY/BWRY_WhoAmI/BWRY_WhoAmI.ino index 48a3267..e15501e 100755 --- a/examples/BWRY/BWRY_WhoAmI/BWRY_WhoAmI.ino +++ b/examples/BWRY/BWRY_WhoAmI/BWRY_WhoAmI.ino @@ -6,8 +6,8 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Mar 2024 -/// @version 801 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -39,8 +39,8 @@ // Configuration #include "hV_Configuration.h" -#if (SCREEN_EPD_EXT3_RELEASE < 801) -#error Required SCREEN_EPD_EXT3_RELEASE 801 +#if (SCREEN_EPD_EXT3_RELEASE < 810) +#error Required SCREEN_EPD_EXT3_RELEASE 810 #endif // SCREEN_EPD_EXT3_RELEASE // Set parameters diff --git a/examples/Common/Common_Colours/Common_Colours.ino b/examples/Common/Common_Colours/Common_Colours.ino index e1129c6..7dd5414 100755 --- a/examples/Common/Common_Colours/Common_Colours.ino +++ b/examples/Common/Common_Colours/Common_Colours.ino @@ -6,13 +6,22 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Mar 2024 -/// @version 801 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 -/// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) +/// @copyright All rights reserved /// @copyright For exclusive use with Pervasive Displays screens /// +/// * Basic edition: for hobbyists and for basic usage +/// @n Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) +/// +/// * Evaluation edition: for professionals or organisations, no commercial usage +/// @n All rights reserved +/// +/// * Commercial edition: for professionals or organisations, commercial usage +/// @n All rights reserved +/// /// @see ReadMe.txt for references /// @n /// diff --git a/examples/Common/Common_Fonts/Common_Fonts.ino b/examples/Common/Common_Fonts/Common_Fonts.ino index 7531d6c..ff945ca 100755 --- a/examples/Common/Common_Fonts/Common_Fonts.ino +++ b/examples/Common/Common_Fonts/Common_Fonts.ino @@ -6,13 +6,22 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Mar 2024 -/// @version 801 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 -/// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) +/// @copyright All rights reserved /// @copyright For exclusive use with Pervasive Displays screens /// +/// * Basic edition: for hobbyists and for basic usage +/// @n Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) +/// +/// * Evaluation edition: for professionals or organisations, no commercial usage +/// @n All rights reserved +/// +/// * Commercial edition: for professionals or organisations, commercial usage +/// @n All rights reserved +/// /// @see ReadMe.txt for references /// @n /// @@ -121,9 +130,8 @@ void setup() displayFonts(); wait(8); - mySerial.println("White... "); - myScreen.clear(); - myScreen.flush(); + mySerial.println("Regenerate... "); + myScreen.regenerate(); mySerial.println("=== "); mySerial.println(); diff --git a/examples/Common/Common_Forms/Common_Forms.ino b/examples/Common/Common_Forms/Common_Forms.ino index c690b50..effa927 100755 --- a/examples/Common/Common_Forms/Common_Forms.ino +++ b/examples/Common/Common_Forms/Common_Forms.ino @@ -6,13 +6,22 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Mar 2024 -/// @version 801 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 -/// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) +/// @copyright All rights reserved /// @copyright For exclusive use with Pervasive Displays screens /// +/// * Basic edition: for hobbyists and for basic usage +/// @n Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) +/// +/// * Evaluation edition: for professionals or organisations, no commercial usage +/// @n All rights reserved +/// +/// * Commercial edition: for professionals or organisations, commercial usage +/// @n All rights reserved +/// /// @see ReadMe.txt for references /// @n /// @@ -70,7 +79,7 @@ void displayForms(bool flag = true) uint16_t x = myScreen.screenSizeX(); uint16_t y = myScreen.screenSizeY(); - uint16_t z = min(x, y); + uint16_t z = hV_HAL_min(x, y); myScreen.setPenSolid(false); myScreen.dRectangle(0, 0, x, y, myColours.black); @@ -109,9 +118,8 @@ void setup() displayForms(); wait(8); - mySerial.print("White... "); - myScreen.clear(); - myScreen.flush(); + mySerial.print("Regenerate... "); + myScreen.regenerate(); mySerial.println("=== "); mySerial.println(); diff --git a/examples/Common/Common_Orientation/Common_Orientation.ino b/examples/Common/Common_Orientation/Common_Orientation.ino index ea48de9..9b747f3 100755 --- a/examples/Common/Common_Orientation/Common_Orientation.ino +++ b/examples/Common/Common_Orientation/Common_Orientation.ino @@ -6,13 +6,22 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Mar 2024 -/// @version 801 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 -/// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) +/// @copyright All rights reserved /// @copyright For exclusive use with Pervasive Displays screens /// +/// * Basic edition: for hobbyists and for basic usage +/// @n Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) +/// +/// * Evaluation edition: for professionals or organisations, no commercial usage +/// @n All rights reserved +/// +/// * Commercial edition: for professionals or organisations, commercial usage +/// @n All rights reserved +/// /// @see ReadMe.txt for references /// @n /// @@ -101,9 +110,8 @@ void setup() displayOrientation(); wait(8); - mySerial.println("White... "); - myScreen.clear(); - myScreen.flush(); + mySerial.println("Regenerate... "); + myScreen.regenerate(); mySerial.println("=== "); mySerial.println(); diff --git a/examples/Common/Common_Persistent/Common_Persistent.ino b/examples/Common/Common_Persistent/Common_Persistent.ino index 281010f..c3eaf5e 100644 --- a/examples/Common/Common_Persistent/Common_Persistent.ino +++ b/examples/Common/Common_Persistent/Common_Persistent.ino @@ -6,13 +6,22 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Jan 2023 -/// @version 704 +/// @date 21 Oct 2023 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) /// @copyright For exclusive use with Pervasive Displays screens /// +/// * Basic edition: for hobbyists and for basic usage +/// @n Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) +/// +/// * Evaluation edition: for professionals or organisations, no commercial usage +/// @n All rights reserved +/// +/// * Commercial edition: for professionals or organisations, commercial usage +/// @n All rights reserved +/// /// @see ReadMe.txt for references /// @n /// @@ -31,6 +40,7 @@ #include "hV_Configuration.h" // Set parameters +#define DISPLAY_PERSISTENT 1 // Define structures and classes @@ -58,6 +68,9 @@ void wait(uint8_t second) } // Functions + +#if (DISPLAY_PERSISTENT == 1) + /// /// @brief Who am i? test screen /// @@ -84,6 +97,8 @@ void displayPersistent() myScreen.flush(); } +#endif // DISPLAY_PERSISTENT + // Add setup code /// /// @brief Setup @@ -110,7 +125,9 @@ void setup() myScreen.begin(); mySerial.println(formatString("%s %ix%i", myScreen.WhoAmI().c_str(), myScreen.screenSizeX(), myScreen.screenSizeY())); - mySerial.println("Who Am I... "); +#if (DISPLAY_PERSISTENT == 1) + + mySerial.println("DISPLAY_PERSISTENT... "); myScreen.clear(); displayPersistent(); wait(2); @@ -121,6 +138,8 @@ void setup() myScreen.flush(); */ +#endif // DISPLAY_PERSISTENT + digitalWrite(LED_BUILTIN, HIGH); mySerial.println("=== "); mySerial.println(); diff --git a/examples/Common/Common_Speed/Common_Speed.ino b/examples/Common/Common_Speed/Common_Speed.ino index c129e60..f80ab5d 100755 --- a/examples/Common/Common_Speed/Common_Speed.ino +++ b/examples/Common/Common_Speed/Common_Speed.ino @@ -6,8 +6,8 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Mar 2024 -/// @version 801 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) diff --git a/examples/Common/Common_Text/Common_Text.ino b/examples/Common/Common_Text/Common_Text.ino index e0fb51c..22c143a 100755 --- a/examples/Common/Common_Text/Common_Text.ino +++ b/examples/Common/Common_Text/Common_Text.ino @@ -6,14 +6,23 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Mar 2024 -/// @version 801 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 -/// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) +/// @copyright All rights reserved /// @copyright For exclusive use with Pervasive Displays screens /// -/// @see ReadMe.txt for references +/// * Basic edition: for hobbyists and for basic usage +/// @n Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) +/// +/// * Evaluation edition: for professionals or organisations, no commercial usage +/// @n All rights reserved +/// +/// * Commercial edition: for professionals or organisations, commercial usage +/// @n All rights reserved +/// +/// @see ReadMe.md for references /// @n /// @@ -132,9 +141,8 @@ void setup() displayCharacters(); wait(8); - mySerial.println("White... "); - myScreen.clear(); - myScreen.flush(); + mySerial.println("Regenerate... "); + myScreen.regenerate(); mySerial.println("=== "); mySerial.println(); diff --git a/examples/Common/Common_WhoAmI/Common_WhoAmI.ino b/examples/Common/Common_WhoAmI/Common_WhoAmI.ino index 262e3e3..84bace0 100755 --- a/examples/Common/Common_WhoAmI/Common_WhoAmI.ino +++ b/examples/Common/Common_WhoAmI/Common_WhoAmI.ino @@ -6,13 +6,22 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Mar 2024 -/// @version 801 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) /// @copyright For exclusive use with Pervasive Displays screens /// +/// * Basic edition: for hobbyists and for basic usage +/// @n Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) +/// +/// * Evaluation edition: for professionals or organisations, no commercial usage +/// @n All rights reserved +/// +/// * Commercial edition: for professionals or organisations, commercial usage +/// @n All rights reserved +/// /// @see ReadMe.txt for references /// @n /// @@ -79,7 +88,7 @@ void displayWhoAmI() y += dy; myScreen.gText(x, y, formatString("Size %i x %i", myScreen.screenSizeX(), myScreen.screenSizeY())); y += dy; - myScreen.gText(x, y, myScreen.screenNumber()); + myScreen.gText(x, y, formatString("Number %s", myScreen.screenNumber())); y += dy; myScreen.gText(x, y, formatString("PDLS %s v%i.%i.%i", SCREEN_EPD_EXT3_VARIANT, SCREEN_EPD_EXT3_RELEASE / 100, (SCREEN_EPD_EXT3_RELEASE / 10) % 10, SCREEN_EPD_EXT3_RELEASE % 10)); y += dy; @@ -129,16 +138,15 @@ void setup() #if (DISPLAY_WHOAMI == 1) - mySerial.println("Who Am I... "); + mySerial.println("DISPLAY_WHOAMI... "); myScreen.clear(); displayWhoAmI(); wait(8); #endif // DISPLAY_WHOAMI - mySerial.println("White... "); - myScreen.clear(); - myScreen.flush(); + mySerial.println("Regenerate... "); + myScreen.regenerate(); mySerial.println("=== "); mySerial.println(); diff --git a/library.properties b/library.properties index 0b2af65..395ab5a 100755 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=PDLS_EXT3_Basic_BWRY -version=8.0.8 +version=8.1.0 author=Rei Vilo for Pervasive Displays maintainer=Rei Vilo sentence=Library for Pervasive Displays iTC red and yellow colour screens, and EXT3 or EXT3.1 board diff --git a/src/PDLS_EXT3_Basic_BWRY.h b/src/PDLS_EXT3_Basic_BWRY.h index eff31e4..0efda45 100755 --- a/src/PDLS_EXT3_Basic_BWRY.h +++ b/src/PDLS_EXT3_Basic_BWRY.h @@ -6,8 +6,8 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Mar 2024 -/// @version 801 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -39,7 +39,7 @@ /// /// @brief Library release number /// -#define PDLS_EXT3_BASIC_RELEASE 801 +#define PDLS_EXT3_BASIC_RELEASE 810 #include "Screen_EPD_EXT3.h" #endif // PDLS_EXT3_BASIC_RELEASE diff --git a/src/Screen_EPD_EXT3.cpp b/src/Screen_EPD_EXT3.cpp index 45d43a3..ae6bc1e 100755 --- a/src/Screen_EPD_EXT3.cpp +++ b/src/Screen_EPD_EXT3.cpp @@ -36,6 +36,7 @@ // Release 804: Improved power management // Release 805: Improved stability // Release 806: New library for Wide temperature only +// Release 810: Added support for EXT4 // // Library header @@ -895,7 +896,7 @@ bool Screen_EPD_EXT3::s_orientCoordinates(uint16_t & x, uint16_t & y) { x = v_screenSizeH - 1 - x; y = v_screenSizeV - 1 - y; - swap(x, y); + hV_HAL_swap(x, y); _flagResult = RESULT_SUCCESS; } break; @@ -913,7 +914,7 @@ bool Screen_EPD_EXT3::s_orientCoordinates(uint16_t & x, uint16_t & y) if ((x < v_screenSizeH) and (y < v_screenSizeV)) { - swap(x, y); + hV_HAL_swap(x, y); _flagResult = RESULT_SUCCESS; } break; diff --git a/src/Screen_EPD_EXT3.h b/src/Screen_EPD_EXT3.h index 623cbcd..da74355 100755 --- a/src/Screen_EPD_EXT3.h +++ b/src/Screen_EPD_EXT3.h @@ -18,8 +18,8 @@ /// * EPD_417_QS_0A screen 4.17” /// /// @author Rei Vilo -/// @date 21 Oct 2024 -/// @version 807 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -61,27 +61,27 @@ #include "hV_Utilities_PDLS.h" // Checks -#if (hV_HAL_PERIPHERALS_RELEASE < 801) -#error Required hV_HAL_PERIPHERALS_RELEASE 801 +#if (hV_HAL_PERIPHERALS_RELEASE < 810) +#error Required hV_HAL_PERIPHERALS_RELEASE 810 #endif // hV_HAL_PERIPHERALS_RELEASE -#if (hV_CONFIGURATION_RELEASE < 803) -#error Required hV_CONFIGURATION_RELEASE 803 +#if (hV_CONFIGURATION_RELEASE < 810) +#error Required hV_CONFIGURATION_RELEASE 810 #endif // hV_CONFIGURATION_RELEASE -#if (hV_SCREEN_BUFFER_RELEASE < 805) -#error Required hV_SCREEN_BUFFER_RELEASE 805 +#if (hV_SCREEN_BUFFER_RELEASE < 810) +#error Required hV_SCREEN_BUFFER_RELEASE 810 #endif // hV_SCREEN_BUFFER_RELEASE -#if (hV_BOARD_RELEASE < 801) -#error Required hV_BOARD_RELEASE 801 +#if (hV_BOARD_RELEASE < 810) +#error Required hV_BOARD_RELEASE 810 #endif // hV_BOARD_RELEASE #ifndef SCREEN_EPD_EXT3_RELEASE /// /// @brief Library release number /// -#define SCREEN_EPD_EXT3_RELEASE 807 +#define SCREEN_EPD_EXT3_RELEASE 810 /// /// @brief Library variant diff --git a/src/Terminal12x16e.h b/src/Terminal12x16e.h index ee2f3ca..facfa19 100755 --- a/src/Terminal12x16e.h +++ b/src/Terminal12x16e.h @@ -6,8 +6,8 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Mar 2024 -/// @version 801 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -41,7 +41,7 @@ /// /// @brief Release /// -#define TERMINAL12E_FONT_RELEASE 801 +#define TERMINAL12E_FONT_RELEASE 810 /// /// @brief Font Terminal12x16e diff --git a/src/Terminal16x24e.h b/src/Terminal16x24e.h index 068ee3d..1b46947 100755 --- a/src/Terminal16x24e.h +++ b/src/Terminal16x24e.h @@ -6,8 +6,8 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Mar 2024 -/// @version 801 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -48,7 +48,7 @@ /// /// @brief Library release number /// -#define TERMINAL16E_FONT_RELEASE 801 +#define TERMINAL16E_FONT_RELEASE 810 /// /// @brief Font Terminal16x24 diff --git a/src/Terminal6x8e.h b/src/Terminal6x8e.h index fe7c415..76c8041 100755 --- a/src/Terminal6x8e.h +++ b/src/Terminal6x8e.h @@ -6,8 +6,8 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Mar 2024 -/// @version 801 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -41,7 +41,7 @@ /// /// @brief Release /// -#define TERMINAL6E_FONT_RELEASE 801 +#define TERMINAL6E_FONT_RELEASE 810 /// /// @brief Font Terminal6x8e diff --git a/src/Terminal8x12e.h b/src/Terminal8x12e.h index 400420d..df3ee9f 100755 --- a/src/Terminal8x12e.h +++ b/src/Terminal8x12e.h @@ -6,8 +6,8 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Mar 2024 -/// @version 801 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -41,7 +41,7 @@ /// /// @brief Release /// -#define TERMINAL8E_FONT_RELEASE 801 +#define TERMINAL8E_FONT_RELEASE 810 /// /// @brief Font Terminal8x12e diff --git a/src/hV_Board.cpp b/src/hV_Board.cpp index b314a6b..a5a1006 100755 --- a/src/hV_Board.cpp +++ b/src/hV_Board.cpp @@ -14,6 +14,7 @@ // Release 700: Initial release // Release 801: Improved double-panel screen management // Release 804: Improved power management +// Release 810: Added support for EXT4 // // Library header @@ -128,6 +129,40 @@ void hV_Board::b_resume() pinMode(b_pin.cardCS, INPUT); } +#if (USE_EXT_BOARD == BOARD_EXT4) // EXT4 GPIOs + + if (b_pin.button != NOT_CONNECTED) // generic + { + pinMode(b_pin.button, INPUT_PULLUP); + } + + if (b_pin.ledData != NOT_CONNECTED) // generic + { + pinMode(b_pin.ledData, OUTPUT); + } + + if (b_pin.nfcFD != NOT_CONNECTED) // generic + { + pinMode(b_pin.nfcFD, INPUT); + } + + if (b_pin.imuInt1 != NOT_CONNECTED) // generic + { + pinMode(b_pin.imuInt1, INPUT); + } + + if (b_pin.imuInt2 != NOT_CONNECTED) // generic + { + pinMode(b_pin.imuInt2, INPUT); + } + + if (b_pin.weatherInt != NOT_CONNECTED) // generic + { + pinMode(b_pin.weatherInt, INPUT); + } + +#endif // USE_EXT_BOARD + b_fsmPowerScreen |= FSM_GPIO_MASK; } } diff --git a/src/hV_Board.h b/src/hV_Board.h index 71992dc..9374e26 100755 --- a/src/hV_Board.h +++ b/src/hV_Board.h @@ -8,8 +8,8 @@ /// * Edition: Advanced /// /// @author Rei Vilo -/// @date 21 Sep 2024 -/// @version 806 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -44,13 +44,13 @@ /// /// @brief Library release number /// -#define hV_BOARD_RELEASE 806 +#define hV_BOARD_RELEASE 810 // Objects // /// -/// @brief Class for Pervasive Displays EXT3, EXT3.1 and EXT3-Touch boards -/// @details Functions for EXT3.1 board +/// @brief Class for Pervasive Displays EXT3, EXT3.1 and EXT3-Touch, EXT4 boards +/// @details Functions for EXT extension boards /// * GPIO /// * SPI for LCD and external Flash and SRAM memory /// * I2C for touch and haptic feedback @@ -66,6 +66,7 @@ class hV_Board /// /// @brief Set panelPower pin /// @param panelPowerPin panelPower pin + /// @note EXT4 requires panelPower /// @warning setPanelPowerPin() should be called before begin() /// void setPanelPowerPin(uint8_t panelPowerPin = NOT_CONNECTED); diff --git a/src/hV_Colours565.h b/src/hV_Colours565.h index a98d319..e32d67b 100755 --- a/src/hV_Colours565.h +++ b/src/hV_Colours565.h @@ -6,8 +6,8 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Mar 2024 -/// @version 801 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -42,7 +42,7 @@ /// /// @brief Library release number /// -#define hV_COLOURS_RELEASE 801 +#define hV_COLOURS_RELEASE 810 /// /// @class hV_Colours565 diff --git a/src/hV_Common.h b/src/hV_Common.h index edc199e..c95b659 100755 --- a/src/hV_Common.h +++ b/src/hV_Common.h @@ -6,8 +6,8 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 May 2024 -/// @version 803 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -36,7 +36,7 @@ /// /// @brief Library release number /// -#define hV_COMMON_RELEASE 803 +#define hV_COMMON_RELEASE 810 // SDK #include "hV_HAL_Peripherals.h" @@ -47,7 +47,7 @@ #include "hV_List_Options.h" #include "hV_List_Boards.h" #include "hV_List_Screens.h" -#include "hV_List_Screens_Legacy.h" +// #include "hV_List_Screens_Legacy.h" #include "hV_Documentation.h" diff --git a/src/hV_Configuration.h b/src/hV_Configuration.h index eb5b165..76afa41 100755 --- a/src/hV_Configuration.h +++ b/src/hV_Configuration.h @@ -20,8 +20,8 @@ /// * 12. Set debug options, not implemented /// /// @author Rei Vilo -/// @date 21 Aug 2024 -/// @version 805 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -62,27 +62,27 @@ #include "hV_List_Screens.h" // Checks -#if (hV_LIST_CONSTANTS_RELEASE < 801) -#error Required hV_LIST_CONSTANTS_RELEASE 801 +#if (hV_LIST_CONSTANTS_RELEASE < 810) +#error Required hV_LIST_CONSTANTS_RELEASE 810 #endif // hV_LIST_CONSTANTS_RELEASE -#if (hV_LIST_OPTIONS_RELEASE < 803) -#error Required hV_LIST_OPTIONS_RELEASE 803 +#if (hV_LIST_OPTIONS_RELEASE < 810) +#error Required hV_LIST_OPTIONS_RELEASE 810 #endif // hV_LIST_OPTIONS_RELEASE -#if (hV_LIST_BOARDS_RELEASE < 801) -#error Required hV_LIST_BOARDS_RELEASE 801 +#if (hV_LIST_BOARDS_RELEASE < 810) +#error Required hV_LIST_BOARDS_RELEASE 810 #endif // hV_LIST_BOARDS_RELEASE -#if (hV_LIST_SCREENS_RELEASE < 801) -#error Required hV_LIST_SCREENS_RELEASE 801 +#if (hV_LIST_SCREENS_RELEASE < 810) +#error Required hV_LIST_SCREENS_RELEASE 810 #endif // hV_LIST_SCREENS_RELEASE #ifndef hV_CONFIGURATION_RELEASE /// /// @brief Release /// -#define hV_CONFIGURATION_RELEASE 805 +#define hV_CONFIGURATION_RELEASE 810 /// /// @name 1- List of supported Pervasive Displays screens @@ -104,7 +104,7 @@ /// @name 9. Set GPIO expander mode, not implemented /// @name 10. String object of char array options for string. /// @name 11. Set storage mode, serial console by default -/// @name 12. Set debug options +/// @name 12. Set debug options, not implemented /// /// @see hV_List_Options.h /// diff --git a/src/hV_Documentation.h b/src/hV_Documentation.h index e7b086b..a8fbe6f 100755 --- a/src/hV_Documentation.h +++ b/src/hV_Documentation.h @@ -22,17 +22,20 @@ /// * **PDLS_EXT3_Basic_Fast** for [monochrome screens with embedded fast update](https://www.pervasivedisplays.com/products-e-ink-display/?_sft_etc_itc=pu) (film `P`), /// * **PDLS_EXT3_Basic_Wide** for [monochrome screens with wide temperature and embedded fast update](https://www.pervasivedisplays.com/products-e-ink-display/?_sft_etc_itc=pu&_sft_temperature_range=m15c-to-p60c) (film `K`), /// * **PDLS_EXT3_Basic_Touch** for [monochrome screens with capacitive touch](https://www.pervasivedisplays.com/products-e-ink-display/?_sft_etc_itc=tp), -/// * **PDLS_EXT3_Basic_BWRY** for [black-white-red-yellow screens](https://www.pervasivedisplays.com/products-e-ink-display/?_sft_product_colour=black-white-red-yellow) (film `Q`); +/// * **PDLS_EXT3_Basic_BWRY** for [black-white-red-yellow screens](https://www.pervasivedisplays.com/products-e-ink-display/?_sft_product_colour=black-white-red-yellow) (film `Q`), +/// * **PDLS_EXT4_Basic_Matter** for the [E-Paper Development Kit for Matter (EPDK-Matter)](https://www.pervasivedisplays.com); /// /// the boards /// -/// * [EPD Extension Kit Gen 3 (EXT3 or EXT3.1)](https://www.pervasivedisplays.com/product/epd-extension-kit-gen-3-EXT3/), -/// * [Touch Expansion Board for EXT3 (EXT3-Touch)](https://www.pervasivedisplays.com/product/touch-expansion-board-ext3-touch/); +/// * [EPD Extension Kit Gen 3 (EXT3 or EXT3-1)](https://www.pervasivedisplays.com/product/epd-extension-kit-gen-3-EXT3/), +/// * [Touch Expansion Board for EXT3 (EXT3-Touch)](https://www.pervasivedisplays.com/product/touch-expansion-board-ext3-touch/), +/// * [EPD Extension Kit Gen 4 (EXT4)](https://www.pervasivedisplays.com/product/epd-extension-kit-gen-4-EXT4/); /// /// the kits /// /// * [EPD Pico Kit (EPDK-266)](https://www.pervasivedisplays.com/product/epd-pico-kit-epdk/), which includes a Raspberry Pi Pico RP2040, an EXT3.1 extension board and a 2.66" monochrome panel, -/// * [EPD Pico Kit Touch (EPDK-271-Touch)](https://www.pervasivedisplays.com/product/touch-expansion-board-ext3-touch/#tab-3), which includes a Raspberry Pi Pico RP2040, an EXT3.1 and EXT3-Touch boards and a 2.71"-Touch monochrome panel with embedded fast update. +/// * [EPD Pico Kit Touch (EPDK-271-Touch)](https://www.pervasivedisplays.com/product/touch-expansion-board-ext3-touch/#tab-3), which includes a an EXT3.1 extension board, an EXT3-Touch expansion board, and a 2.71"-Touch monochrome panel with embedded fast update, +/// * [E-Paper Development Kit for Matter (EPDK-Matter)](https://www.pervasivedisplays.com/product/epdk-matter/), which bundles an Arduino Nano Matter, an EXT4 board and a 2.90" high-definition monochrome panel with wide temperature and embedded fast update. /// /// @b Documentation /// @@ -45,8 +48,8 @@ /// 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 12 Nov 2024 -/// @version 808 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright © Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -100,12 +103,11 @@ /// @image latex T2_WHOAMI.jpg width=8cm /// /// * Fast update -/// * Common_Speed.ino -/// @image html Global.jpeg -/// @image latex Global.jpeg width=8cm +/// * Fast_Line.ino +/// * Fast_Orientation.ino /// * Fast_Speed.ino -/// @image html Fast.jpeg -/// @image latex Fast.jpeg width=8cm +/// @image html Fast.png +/// @image latex Fast.png width=8cm /// /// * Black-White-Red-Yellow /// * BWRY_Colours.ino diff --git a/src/hV_Font.h b/src/hV_Font.h index 77c5615..31784cd 100755 --- a/src/hV_Font.h +++ b/src/hV_Font.h @@ -6,8 +6,8 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Mar 2024 -/// @version 801 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -58,7 +58,7 @@ /// /// @brief hV_Font release number /// -#define hV_FONT_TERMINAL_STRUCTURE_RELEASE 801 +#define hV_FONT_TERMINAL_STRUCTURE_RELEASE 810 /// /// @brief Structure for character width diff --git a/src/hV_Font_Terminal.h b/src/hV_Font_Terminal.h index 6e2a0ac..b0e8501 100755 --- a/src/hV_Font_Terminal.h +++ b/src/hV_Font_Terminal.h @@ -6,8 +6,8 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 May 2024 -/// @version 803 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -45,8 +45,8 @@ #include "hV_Utilities_Common.h" // Checks -#if (hV_CONFIGURATION_RELEASE < 803) -#error Required hV_CONFIGURATION_RELEASE 803 +#if (hV_CONFIGURATION_RELEASE < 810) +#error Required hV_CONFIGURATION_RELEASE 810 #endif // hV_CONFIGURATION_RELEASE // The Arduino IDE does not allow to select the libraries, hence this condition. @@ -56,7 +56,7 @@ /// /// @brief Release /// -#define hV_FONT_TERMINAL_RELEASE 801 +#define hV_FONT_TERMINAL_RELEASE 810 #include "hV_Utilities_Common.h" #include "hV_Font.h" diff --git a/src/hV_HAL_Peripherals.cpp b/src/hV_HAL_Peripherals.cpp index 450b177..6a46287 100644 --- a/src/hV_HAL_Peripherals.cpp +++ b/src/hV_HAL_Peripherals.cpp @@ -24,6 +24,7 @@ // Release 803: Improved stability // Release 804: Improved power management // Release 805: Improved stability +// Release 810: Added patches for some platforms // // Library header diff --git a/src/hV_HAL_Peripherals.h b/src/hV_HAL_Peripherals.h index df2409d..baffdea 100755 --- a/src/hV_HAL_Peripherals.h +++ b/src/hV_HAL_Peripherals.h @@ -6,8 +6,8 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Oct 2024 -/// @version 806 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -36,7 +36,7 @@ /// /// @brief Release /// -#define hV_HAL_PERIPHERALS_RELEASE 806 +#define hV_HAL_PERIPHERALS_RELEASE 810 /// /// @brief SDK library @@ -179,5 +179,57 @@ void hV_HAL_Wire_transfer(uint8_t address, uint8_t * dataWrite, size_t sizeWrite /// @} +/// +/// @name Miscellaneous +/// @details Patches for implementations on some platforms +/// +/// @{ + +/// +/// +/// @brief Minimum of two numbers +/// +/// @param a first number +/// @param b second number +/// @return minimum of a and b +/// +/// @note Macro more robust than bugged implementation on some platforms +/// +#define hV_HAL_min(a, b) ((a) < (b) ? (a) : (b)) + +/// +/// @brief Maximum of two numbers +/// +/// @param a first number +/// @param b second number +/// @return maximum of a and b +/// +/// @note Macro more robust than bugged implementation on some platforms +/// +#define hV_HAL_max(a, b) ((a) > (b) ? (a) : (b)) + +/// +/// @brief Swap numbers +/// @param[out] x first number +/// @param[out] y second number +/// +/// @note Macro more robust than template for some platforms +/// +/// @code +/// template T +/// hV_HAL_swap(T &x, T &y) +/// { +/// T w = x; +/// x = y; +/// y = w; +/// } +/// @endcode +/// +/// @note `__typeof__` recommended over `typeof` +/// +#define hV_HAL_swap(x, y) do { __typeof__(x) WORK = x; x = y; y = WORK; } while (0) + +/// @} + #endif // hV_HAL_PERIPHERALS_RELEASE diff --git a/src/hV_List_Boards.h b/src/hV_List_Boards.h index d5edb3b..9c1bf71 100755 --- a/src/hV_List_Boards.h +++ b/src/hV_List_Boards.h @@ -12,8 +12,8 @@ /// * 2.3 Deprecated boards /// /// @author Rei Vilo -/// @date 21 Sep 2024 -/// @version 806 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -48,13 +48,15 @@ /// /// @brief Release /// -#define hV_LIST_BOARDS_RELEASE 806 +#define hV_LIST_BOARDS_RELEASE 810 /// /// @brief Not connected pin /// #define NOT_CONNECTED (uint8_t)0xff +#if (USE_EXT_BOARD == BOARD_EXT3) + /// /// @brief EXT3 board configuration structure /// @note @@ -481,5 +483,218 @@ const pins_t boardCC1352 = /// @} +#elif (USE_EXT_BOARD == BOARD_EXT4) + +/// +/// @brief EXT4 board configuration structure +/// @note +/// * Pins 1 to 10 are common to all EXT boards +/// * Pins 11 to 20 are specific to EXT4 board +/// * Other pins are optional or external +/// @warning Only valid with EXT4 board +/// +struct pins_t +{ + // Shared + // Common + // ///< EXT3/EXT3.1/EXT4 pin 1 Black -> +3.3V + // ///< EXT3/EXT3.1/EXT4 pin 2 Brown -> SPI SCK + uint8_t panelBusy; ///< EXT3/EXT3.1/EXT4 pin 3 Red + uint8_t panelDC; ///< EXT3/EXT3.1/EXT4 pin 4 Orange + uint8_t panelReset; ///< EXT3/EXT3.1/EXT4 pin 5 Yellow + // ///< EXT3/EXT3.1/EXT4 pin 6 Green -> SPI MISO + // ///< EXT3/EXT3.1/EXT4 pin 7 Blue -> SPI MOSI + uint8_t flashCS; ///< EXT3/EXT3.1/EXT4 pin 8 Violet + uint8_t panelCS; ///< EXT3/EXT3.1/EXT4 pin 9 Grey + // ///< EXT3/EXT3.1/EXT4 pin 10 White -> GROUND + // End of Common + + // EXT3, EXT3.1 and EXT3-Touch, EXT4 specific + uint8_t panelCSS; ///< EXT4 not available + uint8_t flashCSS; ///< EXT4 pin 16 Yellow + // ///< EXT4 pin 14 Blue -> I2C SDA + // ///< EXT4 pin 15 Green -> I2C SCL + uint8_t touchInt; ///< EXT4 not available + uint8_t touchReset; ///< EXT4 not available + uint8_t panelPower; ///< EXT4 pin 11 White + // End of EXT3, EXT3.1 and EXT3-Touch specific + + // SD-card + uint8_t cardCS; ///< Separate SD-card board + uint8_t cardDetect; ///< Separate SD-card board + // End of SD-card + // End of Shared + + // EXT4 specific + uint8_t button; ///< EXT4 pin 12 Grey + uint8_t ledData; ///< EXT4 pin 13 Violet WS2813C + // ///< EXT4 pin 14 Blue -> I2C SDA + // ///< EXT4 pin 15 Green -> I2C SCL + // ///< EXT4 pin 16 Yellow, see above + uint8_t nfcFD; ///< EXT4 pin 17 Orange NFC NT3H2111_2211 !Field detect, I2C address = 0x55 + uint8_t imuInt1; ///< EXT4 pin 18 Red LIS2DH12 !INT2, I2C address = 0x19 + uint8_t imuInt2; ///< EXT4 pin 19 Brown LIS2DH12 !INT1, I2C address = 0x19 + uint8_t weatherInt; ///< EXT4 pin 20 Black HDC2080 !INT, I2C address = 0x40 + // End of EXT4 specific +}; + +/// +/// @name 2.1 Recommended boards +/// @{ + +/// +/// @brief Arduino Nano Matter with Silicon Labs MGM240P, tested +/// @details Variant of boardArduinoNanoMatter with panelPower, button and LED for EXT4 +/// @note Numbers refer to pins +/// @note Recommended board +/// +const pins_t boardArduinoNanoMatter = +{ + .panelBusy = 10, ///< EXT3 and EXT3.1 pin 3 Red -> D10 + .panelDC = 9, ///< EXT3 and EXT3.1 pin 4 Orange -> D9 + .panelReset = 8, ///< EXT3 and EXT3.1 pin 5 Yellow -> D8 + .flashCS = 7, ///< EXT3 and EXT3.1 pin 8 Violet -> D7 + .panelCS = 6, ///< EXT3 and EXT3.1 pin 9 Grey -> D6 + + .panelCSS = NOT_CONNECTED, ///< EXT4 not available + .flashCSS = 5, ///< EXT3 pin 20 or EXT3.1 pin 11 Black2 -> D5 + .touchInt = NOT_CONNECTED, ///< EXT3-Touch pin 3 Red + .touchReset = NOT_CONNECTED, ///< EXT3-Touch pin 4 Orange + .panelPower = 2, ///< EXT4 pin 20 White -> D2 + .cardCS = NOT_CONNECTED, ///< Separate SD-card board + .cardDetect = NOT_CONNECTED, ///< Separate SD-card board + + // EXT4 specific + .button = 3, // EXT4 pin 12 Grey -> D3 + .ledData = 4, // EXT4 pin 13 Violet WS2813C -> D4 + // ///< EXT4 pin 14 Blue -> I2C SDA + // ///< EXT4 pin 15 Green -> I2C SCL + // ///< EXT4 pin 16 Yellow, see above + .nfcFD = 17, // EXT4 pin 17 Orange NFC NT3H2111_2211 !Field detect, I2C address = 0x55 -> A3 + .imuInt1 = 16, // EXT4 pin 18 Red LIS2DH12 !INT1, I2C address = 0x19 -> A2 + .imuInt2 = 15, // EXT4 pin 19 Brown LIS2DH12 !INT2, I2C address = 0x19 -> A1 + .weatherInt = 14, // EXT4 pin 20 Black HDC2080 !INT, I2C address = 0x40 -> A0 + // End of EXT4 specific +}; + +/// +/// @brief Silicon Labs EFR32xG24 Explorer Kit (xG24-EK2703A) configuration, tested +/// @details Variant of boardSiLabsBG24Explorer with panelPower, button and LED for EXT4 +/// @note Numbers refer to pins +/// @note Recommended board +/// +const pins_t boardSiLabsBG24Explorer = +{ + .panelBusy = 4, ///< EXT3 and EXT3.1 pin 3 Red -> PC03 D4 4 + .panelDC = 5, ///< EXT3 and EXT3.1 pin 4 Orange -> PC06 D5 5 + .panelReset = 6, ///< EXT3 and EXT3.1 pin 5 Yellow -> PB00 D6 6 + .flashCS = NOT_CONNECTED, ///< EXT3 and EXT3.1 pin 8 Violet + .panelCS = 13, ///< EXT3 and EXT3.1 pin 9 Grey -> PB03 A6 13 + .panelCSS = NOT_CONNECTED, ///< EXT4 not available + .flashCSS = NOT_CONNECTED, ///< EXT3 pin 20 or EXT3.1 pin 11 Black2 + .touchInt = NOT_CONNECTED, ///< EXT4 not available + .touchReset = NOT_CONNECTED, ///< EXT4 not available + .panelPower = 14, ///< EXT4 pin 20 White -> PB04 A7 14 + .cardCS = NOT_CONNECTED, ///< Separate SD-card board + .cardDetect = NOT_CONNECTED, ///< Separate SD-card board + + // EXT4 specific + .button = 11, // EXT4 pin 12 Grey -> PB01 A4 11 + .ledData = 12, // EXT4 pin 13 Violet WS2813C -> PB02 A5 12 + // ///< EXT4 pin 14 Blue -> I2C SDA + // ///< EXT4 pin 15 Green -> I2C SCL + // ///< EXT4 pin 16 Yellow, see above + .nfcFD = NOT_CONNECTED, // EXT4 pin 17 Orange NFC NT3H2111_2211 !Field detect, I2C address = 0x55 + .imuInt1 = NOT_CONNECTED, // EXT4 pin 18 Red LIS2DH12 !INT1, I2C address = 0x19 + .imuInt2 = NOT_CONNECTED, // EXT4 pin 19 Brown LIS2DH12 !INT2, I2C address = 0x19 + .weatherInt = NOT_CONNECTED // EXT4 pin 20 Black HDC2080 !INT, I2C address = 0x40 + // End of EXT4 specific +}; + +/// +/// @brief Raspberry Pi Pico and Pico W with default RP2040 configuration, tested +/// @details Variant of boardRaspberryPiPico_RP2040 with panelPower, button and LED for EXT4 +/// @note Numbers refer to GPIOs, not pins +/// @see https://github.com/earlephilhower/arduino-pico +/// @note Recommended board +/// +const pins_t boardRaspberryPiPico_RP2040 = +{ + .panelBusy = 13, ///< EXT3 and EXT3.1 pin 3 Red -> GP13 + .panelDC = 12, ///< EXT3 and EXT3.1 pin 4 Orange -> GP12 + .panelReset = 11, ///< EXT3 and EXT3.1 pin 5 Yellow -> GP11 + .flashCS = 10, ///< EXT3 and EXT3.1 pin 8 Violet -> GP10 + + .panelCS = 17, ///< EXT4 pin 9 Grey -> GP17 + .panelCSS = NOT_CONNECTED, ///< EXT4 not available + .flashCSS = 6, ///< EXT4 pin 20 Black2 -> GP6 + .touchInt = NOT_CONNECTED, ///< EXT4 not available + .touchReset = NOT_CONNECTED, ///< EXT4 not available + .panelPower = 14, ///< EXT4 pin 20 White -> GP14 + .cardCS = NOT_CONNECTED, ///< Separate SD-card board + .cardDetect = NOT_CONNECTED, ///< Separate SD-card board + + // EXT4 specific + .button = 15, // EXT4 pin 12 Grey -> GP15 + .ledData = 2, // EXT4 pin 13 Violet WS2813C -> GP2 + // ///< EXT4 pin 14 Blue -> I2C SDA + // ///< EXT4 pin 15 Green -> I2C SCL + // ///< EXT4 pin 16 Yellow, see above + .nfcFD = 7, // EXT4 pin 17 Orange NFC NT3H2111_2211 !Field detect, I2C address = 0x55 -> GP7 + .imuInt1 = 8, // EXT4 pin 18 Red LIS2DH12 !INT2, I2C address = 0x19 -> GP8 + .imuInt2 = 9, // EXT4 pin 19 Brown LIS2DH12 !INT1, I2C address = 0x19 -> GP9 + .weatherInt = 3 // EXT4 pin 20 Black HDC2080 !INT, I2C address = 0x40 -> GP3 + // End of EXT4 specific +}; + +/// @} + +/// +/// @name 2.2 Other boards +/// @{ + +/// +/// @brief Silicon Labs BGM220-EK4314A and BG22-EK4108A Explorer Kit configuration, tested +/// @details Variant of boardSiLabsBGM220Explorer with panelPower, button and LED for EXT4 +/// @note Numbers refer to pins +/// +const pins_t boardSiLabsBGM220Explorer = +{ + .panelBusy = 4, ///< EXT3 and EXT3.1 pin 3 Red -> PC00 D4 4 + .panelDC = 5, ///< EXT3 and EXT3.1 pin 4 Orange -> PC08 D5 5 + .panelReset = 6, ///< EXT3 and EXT3.1 pin 5 Yellow -> PB00 D6 6 + .flashCS = NOT_CONNECTED, ///< EXT3 and EXT3.1 pin 8 Violet + .panelCS = 13, ///< EXT3 and EXT3.1 pin 9 Grey -> PB01 A6 13 + .panelCSS = NOT_CONNECTED, ///< EXT4 not available + .flashCSS = NOT_CONNECTED, ///< EXT3 pin 20 or EXT3.1 pin 11 Black2 + .touchInt = NOT_CONNECTED, ///< EXT3-Touch pin 3 Red + .touchReset = NOT_CONNECTED, ///< EXT3-Touch pin 4 Orange + .panelPower = 14, ///< EXT4 pin 20 White -> PA00 A7 14 + .cardCS = NOT_CONNECTED, ///< Separate SD-card board + .cardDetect = NOT_CONNECTED, ///< Separate SD-card board + + // EXT4 specific + .button = 11, // EXT4 pin 12 Grey -> PD04 A4 11 + .ledData = 12, // EXT4 pin 13 Violet WS2813C -> PD05 A5 12 + // ///< EXT4 pin 14 Blue -> I2C SDA + // ///< EXT4 pin 15 Green -> I2C SCL + // ///< EXT4 pin 16 Yellow, see above + .nfcFD = NOT_CONNECTED, // EXT4 pin 17 Orange NFC NT3H2111_2211 !Field detect, I2C address = 0x55 + .imuInt1 = NOT_CONNECTED, // EXT4 pin 18 Red LIS2DH12 !INT1, I2C address = 0x19 + .imuInt2 = NOT_CONNECTED, // EXT4 pin 19 Brown LIS2DH12 !INT2, I2C address = 0x19 + .weatherInt = NOT_CONNECTED // EXT4 pin 20 Black HDC2080 !INT, I2C address = 0x40 + // End of EXT4 specific +}; + +/// @} + +/// +/// @name 2.3 Deprecated boards +/// @{ + +/// @} + +#endif // USE_EXT_BOARD + #endif // hV_LIST_BOARDS_RELEASE diff --git a/src/hV_List_Constants.h b/src/hV_List_Constants.h index 9fb6bd5..b624c16 100755 --- a/src/hV_List_Constants.h +++ b/src/hV_List_Constants.h @@ -6,8 +6,8 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Aug 2024 -/// @version 805 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -39,7 +39,7 @@ /// /// @brief Release /// -#define hV_LIST_CONSTANTS_RELEASE 805 +#define hV_LIST_CONSTANTS_RELEASE 810 /// /// * General parameters diff --git a/src/hV_List_Options.h b/src/hV_List_Options.h index 9f59f70..5c7f6ac 100755 --- a/src/hV_List_Options.h +++ b/src/hV_List_Options.h @@ -16,10 +16,11 @@ /// * 10. String object for basic edition /// * 11. Set storage mode, not implemented /// * 12. Set debug options, not implemented +/// * 13. Select EXT board /// /// @author Rei Vilo -/// @date 21 Aug 2024 -/// @version 805 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -48,7 +49,7 @@ /// /// @brief Release /// -#define hV_LIST_OPTIONS_RELEASE 805 +#define hV_LIST_OPTIONS_RELEASE 810 /// /// @name 1- List of supported Pervasive Displays screens @@ -201,5 +202,19 @@ /// * Viewer edition: option /// +/// +/// @name 13- EXT boards +/// * Basic edition: EXT3 and EXT4 +/// * Evaluation edition: EXT3 +/// * Commercial edition: EXT3 +/// * Viewer edition: EXT3 +/// +/// @{ +#define BOARD_EXT3 3 ///< EXT3 and EXT3.1 boards +#define BOARD_EXT4 4 ///< EXT4 board + +#define USE_EXT_BOARD BOARD_EXT3 ///< Selected board +/// @} + #endif // hV_LIST_OPTIONS_RELEASE diff --git a/src/hV_List_Screens.h b/src/hV_List_Screens.h index c125949..833410d 100755 --- a/src/hV_List_Screens.h +++ b/src/hV_List_Screens.h @@ -10,8 +10,8 @@ /// * 1- List of supported Pervasive Displays screens /// /// @author Rei Vilo -/// @date 21 Aug 2024 -/// @version 807 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -43,7 +43,7 @@ /// /// @brief Release /// -#define hV_LIST_SCREENS_RELEASE 807 +#define hV_LIST_SCREENS_RELEASE 810 /// @deprecated Screen name format (8.0.0) /// * Name format eScreen_EPD_EXT3___ is deprecated (8.0.0). diff --git a/src/hV_List_Screens_Legacy.h b/src/hV_List_Screens_Legacy.h index c7100f1..f3b3724 100644 --- a/src/hV_List_Screens_Legacy.h +++ b/src/hV_List_Screens_Legacy.h @@ -10,8 +10,8 @@ /// * 1- List of supported Pervasive Displays screens /// /// @author Rei Vilo -/// @date 21 Mar 2024 -/// @version 801 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -43,7 +43,7 @@ /// /// @brief Release /// -#define hV_LIST_SCREENS_LEGACY_RELEASE 801 +#define hV_LIST_SCREENS_LEGACY_RELEASE 810 // Current list #include "hV_List_Screens.h" diff --git a/src/hV_Screen_Buffer.cpp b/src/hV_Screen_Buffer.cpp index 69b78b0..2e8261b 100755 --- a/src/hV_Screen_Buffer.cpp +++ b/src/hV_Screen_Buffer.cpp @@ -226,7 +226,7 @@ void hV_Screen_Buffer::line(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, { if (y1 > y2) { - swap(y1, y2); + hV_HAL_swap(y1, y2); } for (uint16_t y = y1; y <= y2; y++) { @@ -237,7 +237,7 @@ void hV_Screen_Buffer::line(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, { if (x1 > x2) { - swap(x1, x2); + hV_HAL_swap(x1, x2); } for (uint16_t x = x1; x <= x2; x++) { @@ -254,14 +254,14 @@ void hV_Screen_Buffer::line(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, bool flag = abs(wy2 - wy1) > abs(wx2 - wx1); if (flag) { - swap(wx1, wy1); - swap(wx2, wy2); + hV_HAL_swap(wx1, wy1); + hV_HAL_swap(wx2, wy2); } if (wx1 > wx2) { - swap(wx1, wx2); - swap(wy1, wy2); + hV_HAL_swap(wx1, wx2); + hV_HAL_swap(wy1, wy2); } int16_t dx = wx2 - wx1; @@ -322,11 +322,11 @@ void hV_Screen_Buffer::rectangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t { if (x1 > x2) { - swap(x1, x2); + hV_HAL_swap(x1, x2); } if (y1 > y2) { - swap(y1, y2); + hV_HAL_swap(y1, y2); } for (uint16_t x = x1; x <= x2; x++) { @@ -373,13 +373,13 @@ void hV_Screen_Buffer::s_triangleArea(uint16_t x1, uint16_t y1, uint16_t x2, uin if (dy1 > dx1) { - swap(dx1, dy1); // swap values + hV_HAL_swap(dx1, dy1); // swap values changed1 = true; } if (dy2 > dx2) { - swap(dx2, dy2); // swap values + hV_HAL_swap(dx2, dy2); // swap values changed2 = true; } @@ -468,14 +468,14 @@ void hV_Screen_Buffer::triangle(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t b = false; if ((b == false) and (y1 > y2)) { - swap(x1, x2); - swap(y1, y2); + hV_HAL_swap(x1, x2); + hV_HAL_swap(y1, y2); b = true; } if ((b == false) and (y2 > y3)) { - swap(x3, x2); - swap(y3, y2); + hV_HAL_swap(x3, x2); + hV_HAL_swap(y3, y2); b = true; } } @@ -603,7 +603,9 @@ void hV_Screen_Buffer::gText(uint16_t x0, uint16_t y0, uint8_t line, line1, line2, line3; uint16_t x, y; uint8_t i, j, k; + #if (MAX_FONT_SIZE > 0) + if (f_fontSize == 0) { for (k = 0; k < text.length(); k++) @@ -615,6 +617,7 @@ void hV_Screen_Buffer::gText(uint16_t x0, uint16_t y0, line = f_getCharacter(c, i); for (j = 0; j < 8; j++) + { if (bitRead(line, j)) { point(x0 + 6 * k + i, y0 + j, textColour); @@ -623,10 +626,13 @@ void hV_Screen_Buffer::gText(uint16_t x0, uint16_t y0, { point(x0 + 6 * k + i, y0 + j, backColour); } + } } } } + #if (MAX_FONT_SIZE > 1) + else if (f_fontSize == 1) { for (k = 0; k < text.length(); k++) @@ -660,7 +666,9 @@ void hV_Screen_Buffer::gText(uint16_t x0, uint16_t y0, } } } + #if (MAX_FONT_SIZE > 2) + else if (f_fontSize == 2) { @@ -696,6 +704,7 @@ void hV_Screen_Buffer::gText(uint16_t x0, uint16_t y0, } } #if (MAX_FONT_SIZE > 3) + else if (f_fontSize == 3) { for (k = 0; k < text.length(); k++) @@ -762,6 +771,7 @@ void hV_Screen_Buffer::gTextLarge(uint16_t x0, uint16_t y0, setPenSolid(true); #if (MAX_FONT_SIZE > 0) + if (f_fontSize == 0) { for (k = 0; k < text.length(); k++) @@ -790,6 +800,7 @@ void hV_Screen_Buffer::gTextLarge(uint16_t x0, uint16_t y0, } #if (MAX_FONT_SIZE > 1) + else if (f_fontSize == 1) { for (k = 0; k < text.length(); k++) @@ -827,6 +838,7 @@ void hV_Screen_Buffer::gTextLarge(uint16_t x0, uint16_t y0, } #if (MAX_FONT_SIZE > 2) + else if (f_fontSize == 2) { @@ -863,7 +875,9 @@ void hV_Screen_Buffer::gTextLarge(uint16_t x0, uint16_t y0, } } } + #if (MAX_FONT_SIZE > 3) + else if (f_fontSize == 3) { for (k = 0; k < text.length(); k++) diff --git a/src/hV_Screen_Buffer.h b/src/hV_Screen_Buffer.h index 9bec100..c7f934a 100755 --- a/src/hV_Screen_Buffer.h +++ b/src/hV_Screen_Buffer.h @@ -6,8 +6,8 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Aug 2024 -/// @version 805 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -42,7 +42,7 @@ /// /// @brief Library release number /// -#define hV_SCREEN_BUFFER_RELEASE 805 +#define hV_SCREEN_BUFFER_RELEASE 810 // Other libraries #include "hV_Colours565.h" diff --git a/src/hV_Utilities_Common.cpp b/src/hV_Utilities_Common.cpp index 6772942..56e1b30 100755 --- a/src/hV_Utilities_Common.cpp +++ b/src/hV_Utilities_Common.cpp @@ -225,23 +225,24 @@ uint32_t roundUp(uint32_t value, uint16_t modulo) return result; } -// Utilities -void swap(uint16_t & a, uint16_t & b) -{ - uint16_t w = a; - a = b; - b = w; -} -void swap(int16_t & a, int16_t & b) -{ - int16_t w = a; - a = b; - b = w; -} -void swap(uint8_t & a, uint8_t & b) -{ - uint8_t w = a; - a = b; - b = w; -} +// // Utilities +// Moved to hV_HAL_Peripherals +// void swap(uint16_t & a, uint16_t & b) +// { +// uint16_t w = a; +// a = b; +// b = w; +// } +// void swap(int16_t & a, int16_t & b) +// { +// int16_t w = a; +// a = b; +// b = w; +// } +// void swap(uint8_t & a, uint8_t & b) +// { +// uint8_t w = a; +// a = b; +// b = w; +// } diff --git a/src/hV_Utilities_Common.h b/src/hV_Utilities_Common.h index 69eaaf4..450ced7 100755 --- a/src/hV_Utilities_Common.h +++ b/src/hV_Utilities_Common.h @@ -6,8 +6,8 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 21 Sep 2024 -/// @version 806 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -42,14 +42,15 @@ /// /// @brief Library release number /// -#define hV_UTILITIES_RELEASE 806 +#define hV_UTILITIES_RELEASE 810 -#ifndef min -#define min(a, b) ((a) < (b) ? (a) : (b)) -#endif -#ifndef max -#define max(a, b) ((a) > (b) ? (a) : (b)) -#endif +// Moved to hV_HAL_Peripherals +// #ifndef min +// #define min(a, b) ((a) < (b) ? (a) : (b)) +// #endif +// #ifndef max +// #define max(a, b) ((a) > (b) ? (a) : (b)) +// #endif /// /// @name Orientation constants @@ -159,26 +160,27 @@ void setMinMax(uint16_t value, uint16_t & valueMin, uint16_t & valueMax); uint32_t roundUp(uint32_t value, uint16_t modulo); // Utilities -/// -/// @brief Swap number, int16_t -/// @param a first number -/// @param b second number -/// -void swap(int16_t & a, int16_t & b); - -/// -/// @brief Swap number, uint16_t -/// @param a first number -/// @param b second number -/// -void swap(uint16_t & a, uint16_t & b); - -/// -/// @brief Swap number, uint8_t -/// @param a first number -/// @param b second number -/// -void swap(uint8_t & a, uint8_t & b); +// Moved to hV_HAL_Peripherals +// /// +// /// @brief Swap number, int16_t +// /// @param a first number +// /// @param b second number +// /// +// void swap(int16_t & a, int16_t & b); +// +// /// +// /// @brief Swap number, uint16_t +// /// @param a first number +// /// @param b second number +// /// +// void swap(uint16_t & a, uint16_t & b); +// +// /// +// /// @brief Swap number, uint8_t +// /// @param a first number +// /// @param b second number +// /// +// void swap(uint8_t & a, uint8_t & b); /// @} diff --git a/src/hV_Utilities_PDLS.cpp b/src/hV_Utilities_PDLS.cpp index 4875979..5e330f3 100755 --- a/src/hV_Utilities_PDLS.cpp +++ b/src/hV_Utilities_PDLS.cpp @@ -17,6 +17,7 @@ // Release 804: Improved power management // Release 805: Improved stability // Release 806: New library for Wide temperature only +// Release 810: Added support for EXT4 and EPDK-Matter // // Library header diff --git a/src/hV_Utilities_PDLS.h b/src/hV_Utilities_PDLS.h index 746f475..4498e70 100755 --- a/src/hV_Utilities_PDLS.h +++ b/src/hV_Utilities_PDLS.h @@ -1,6 +1,6 @@ /// /// @file hV_Utilities_PDLS.h -/// @brief Driver for Pervasive Displays EXT3, EXT3.1 and EXT3-Touch boards +/// @brief Driver for Pervasive Displays EXT3, EXT3.1, EXT3-Touch and EXT4 boards /// /// @details Project Pervasive Displays Library Suite /// @n Based on highView technology @@ -8,8 +8,8 @@ /// * Edition: Advanced /// /// @author Rei Vilo -/// @date 21 Oct 2024 -/// @version 807 +/// @date 21 Nov 2024 +/// @version 810 /// /// @copyright (c) Rei Vilo, 2010-2024 /// @copyright All rights reserved @@ -47,23 +47,23 @@ #include "hV_Utilities_Common.h" // Checks -#if (hV_HAL_PERIPHERALS_RELEASE < 801) -#error Required hV_HAL_PERIPHERALS_RELEASE 801 +#if (hV_HAL_PERIPHERALS_RELEASE < 810) +#error Required hV_HAL_PERIPHERALS_RELEASE 810 #endif // hV_HAL_PERIPHERALS_RELEASE -#if (hV_CONFIGURATION_RELEASE < 803) -#error Required hV_CONFIGURATION_RELEASE 803 +#if (hV_CONFIGURATION_RELEASE < 810) +#error Required hV_CONFIGURATION_RELEASE 810 #endif // hV_CONFIGURATION_RELEASE -#if (hV_BOARD_RELEASE < 801) -#error Required hV_BOARD_RELEASE 801 +#if (hV_BOARD_RELEASE < 810) +#error Required hV_BOARD_RELEASE 810 #endif // hV_BOARD_RELEASE #ifndef hV_UTILITIES_PDLS_RELEASE /// /// @brief Library release number /// -#define hV_UTILITIES_PDLS_RELEASE 807 +#define hV_UTILITIES_PDLS_RELEASE 810 // Objects //