diff --git a/library.properties b/library.properties index 111100a..f2bcfa7 100755 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=PDLS_EXT3_Basic_Touch -version=6.0.9 +version=6.1.0 author=Rei Vilo for Pervasive Displays maintainer=Rei Vilo sentence=Library for Pervasive Displays monochrome e-paper screens with touch and EXT3-1 + EXT3-Touch diff --git a/src/PDLS_EXT3_Basic_Touch.h b/src/PDLS_EXT3_Basic_Touch.h index 931c7cf..ac414ea 100755 --- a/src/PDLS_EXT3_Basic_Touch.h +++ b/src/PDLS_EXT3_Basic_Touch.h @@ -16,7 +16,7 @@ /// @n Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) /// /// * Evaluation edition: for professionals or organisations -/// @n All rights reserved, evaluation only, no commercial usage +/// @n All rights reserved, evaluation only, no commercial usage /// /// * Commercial edition: for professionals or organisations, for commercial usage /// @n All rights reserved diff --git a/src/Screen_EPD_EXT3.cpp b/src/Screen_EPD_EXT3.cpp index d40b65c..92e7324 100755 --- a/src/Screen_EPD_EXT3.cpp +++ b/src/Screen_EPD_EXT3.cpp @@ -212,7 +212,7 @@ void Screen_EPD_EXT3_Fast::begin() { Serial.println(""); Serial.println(formatString("! Error - Screen %06x non touch", _eScreen_EPD_EXT3)); - } + } switch (_codeSize) { @@ -730,6 +730,7 @@ uint8_t Screen_EPD_EXT3_Fast::checkTemperatureMode(uint8_t updateMode) // #define FEATURE_OTHER 0x04 ///< With other feature // #define FEATURE_WIDE_TEMPERATURE 0x08 ///< With wide operating temperature // #define FEATURE_RED 0x10 ///< With red colour + updateMode = UPDATE_FAST; switch (_codeExtra & 0x19) @@ -753,7 +754,7 @@ uint8_t Screen_EPD_EXT3_Fast::checkTemperatureMode(uint8_t updateMode) break; default: // CS series - + // Normal CS Global update above 0 °C FU: - GU: 0 to +50 °C updateMode = UPDATE_NONE; break; @@ -768,8 +769,9 @@ uint8_t Screen_EPD_EXT3_Fast::flushMode(uint8_t updateMode) switch (updateMode) { - // case UPDATE_GLOBAL: case UPDATE_FAST: + case UPDATE_PARTIAL: + case UPDATE_GLOBAL: _flushFast(); break; diff --git a/src/Screen_EPD_EXT3.h b/src/Screen_EPD_EXT3.h index e18d622..788bf0b 100755 --- a/src/Screen_EPD_EXT3.h +++ b/src/Screen_EPD_EXT3.h @@ -17,8 +17,8 @@ /// * 3.70"-Touch reference xTP370PGH0x /// /// @author Rei Vilo -/// @date 02 May 2023 -/// @version 609 +/// @date 22 May 2023 +/// @version 610 /// /// @copyright (c) Rei Vilo, 2010-2023 /// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) @@ -51,7 +51,7 @@ /// /// @brief Library release number /// -#define SCREEN_EPD_EXT3_RELEASE 609 +#define SCREEN_EPD_EXT3_RELEASE 610 // Other libraries #include "SPI.h" @@ -62,6 +62,10 @@ #error Required hV_SCREEN_BUFFER_RELEASE 523 #endif // hV_SCREEN_BUFFER_RELEASE +#if (TOUCH_MODE != USE_TOUCH_YES) +#error TOUCH_MODE should be USE_TOUCH_YES +#endif // TOUCH_MODE + // Objects // /// diff --git a/src/Terminal12x16e.h b/src/Terminal12x16e.h index aecc5be..5af3b83 100755 --- a/src/Terminal12x16e.h +++ b/src/Terminal12x16e.h @@ -15,7 +15,7 @@ /// * 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, evaluation only, no commercial usage +/// * Evaluation edition: for professionals or organisations, evaluation only, no commercial usage /// @n All rights reserved /// /// * Commercial edition: for professionals or organisations, commercial usage diff --git a/src/Terminal16x24e.h b/src/Terminal16x24e.h index 2172f7b..38bf874 100755 --- a/src/Terminal16x24e.h +++ b/src/Terminal16x24e.h @@ -15,7 +15,7 @@ /// * 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, evaluation only, no commercial usage +/// * Evaluation edition: for professionals or organisations, evaluation only, no commercial usage /// @n All rights reserved /// /// * Commercial edition: for professionals or organisations, commercial usage diff --git a/src/Terminal6x8e.h b/src/Terminal6x8e.h index c920906..ec29423 100755 --- a/src/Terminal6x8e.h +++ b/src/Terminal6x8e.h @@ -15,7 +15,7 @@ /// * 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, evaluation only, no commercial usage +/// * Evaluation edition: for professionals or organisations, evaluation only, no commercial usage /// @n All rights reserved /// /// * Commercial edition: for professionals or organisations, commercial usage diff --git a/src/Terminal8x12e.h b/src/Terminal8x12e.h index d7b03a1..ba7f3b4 100755 --- a/src/Terminal8x12e.h +++ b/src/Terminal8x12e.h @@ -15,7 +15,7 @@ /// * 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, evaluation only, no commercial usage +/// * Evaluation edition: for professionals or organisations, evaluation only, no commercial usage /// @n All rights reserved /// /// * Commercial edition: for professionals or organisations, commercial usage diff --git a/src/hV_Configuration.h b/src/hV_Configuration.h index e3e1a3b..cc20413 100755 --- a/src/hV_Configuration.h +++ b/src/hV_Configuration.h @@ -19,8 +19,8 @@ /// * 11. Set storage mode, not implemented /// /// @author Rei Vilo -/// @date 02 May 2023 -/// @version 609 +/// @date 22 May 2023 +/// @version 610 /// /// @copyright (c) Rei Vilo, 2010-2023 /// @copyright All rights reserved @@ -56,7 +56,7 @@ /// /// @brief Release /// -#define hV_CONFIGURATION_RELEASE 609 +#define hV_CONFIGURATION_RELEASE 610 /// /// @name 1- List of supported Pervasive Displays screens diff --git a/src/hV_Constants.h b/src/hV_Constants.h old mode 100644 new mode 100755 index 96173be..0b8e616 --- a/src/hV_Constants.h +++ b/src/hV_Constants.h @@ -6,8 +6,8 @@ /// @n Based on highView technology /// /// @author Rei Vilo -/// @date 02 May 2023 -/// @version 609 +/// @date 22 May 2023 +/// @version 610 /// /// @copyright (c) Rei Vilo, 2010-2023 /// @copyright All rights reserved @@ -29,8 +29,7 @@ /// /// @brief Release /// -#define hV_CONSTANTS_RELEASE 609 -#endif // hV_CONSTANTS_RELEASE +#define hV_CONSTANTS_RELEASE 610 /// /// @name 1- List of supported Pervasive Displays screens @@ -53,6 +52,7 @@ /// /// @brief Update mode /// @note Numbers are sequential and exclusive +/// @deprecated Partial update is deprecated. Use fast update instead. /// @{ #define UPDATE_NONE 0x00 ///< No update #define UPDATE_GLOBAL 0x01 ///< Global update, default @@ -62,7 +62,7 @@ /// /// @brief Large screens sub-panels selection -/// @note Numbers are sequential and exclusive +/// @note Numbers are sequential and exclusive /// @{ #define PANEL_CS_MAIN 0x01 ///< Large screens sub-panels: first panel only #define PANEL_CS_SECOND 0x02 ///< Large screens sub-panels: second panel only @@ -71,7 +71,7 @@ /// /// @brief Power state -/// @note Numbers are sequential and exclusive +/// @note Numbers are sequential and exclusive /// @{ #define FSM_POWER_UNKNOWN 0x00 ///< Unknown #define FSM_POWER_ON 0x01 ///< On @@ -80,7 +80,8 @@ /// /// @brief Partial update state -/// @note Numbers are sequential and exclusive +/// @deprecated Use fast update instead. +/// @note Numbers are sequential and exclusive /// @{ #define PARTIAL_OFF 0x00 ///< Non-activated #define PARTIAL_ON 0x01 ///< Activated but not populated @@ -89,7 +90,7 @@ /// /// @brief Continuity mode state -/// @note Numbers are sequential and exclusive +/// @note Numbers are sequential and exclusive /// @{ #define CONTINUITY_OFF 0x00 ///< Non-activated #define CONTINUITY_ON 0x01 ///< Activated but not initialised @@ -98,7 +99,7 @@ /// /// @brief Touch events -/// @note Numbers are sequential and exclusive +/// @note Numbers are sequential and exclusive /// @{ #define TOUCH_EVENT_NONE 0 ///< No touch event #define TOUCH_EVENT_PRESS 1 ///< Touch press event @@ -109,7 +110,7 @@ /// /// @brief Results -/// @note Numbers are sequential and exclusive +/// @note Numbers are sequential and exclusive /// @{ #define RESULT_SUCCESS 0 ///< Success #define RESULT_ERROR 1 ///< Error @@ -124,3 +125,6 @@ #define ORIENTATION_LANDSCAPE 7 ///< Landscape or horizontal, larger than high /// @} /// + +#endif // hV_CONSTANTS_RELEASE + diff --git a/src/hV_Documentation.h b/src/hV_Documentation.h index dc07b24..49aea06 100755 --- a/src/hV_Documentation.h +++ b/src/hV_Documentation.h @@ -21,7 +21,7 @@ /// * **PDLS_EXT3_Basic** for [monochrome](https://www.pervasivedisplays.com/products/?_sft_product_colour=black-white) and [colour (black-white-red)](https://www.pervasivedisplays.com/products/?_sft_product_colour=black-white-red) screens; /// * **PDLS_EXT3_Basic_Fast** for [monochrome screens with embedded fast update](https://www.pervasivedisplays.com/product/2-71-e-ink-display-aurora-mb-v231/); /// * **PDLS_EXT3_Basic_Touch** for [monochrome screens with capacitive touch](https://www.pervasivedisplays.com/product/2-71-e-ink-display-aurora-mb-v231/). -/// +/// /// The screens are connected to the [EPD Extension Kit Gen 3 (EXT3 or EXT3-1)](https://www.pervasivedisplays.com/product/epd-extension-kit-gen-3-EXT3/) and [Touch Expansion Board for EXT3 (EXT3-Touch)](https://www.pervasivedisplays.com/product/touch-expansion-board-ext3-touch/). /// /// Two introductory kits are also available: @@ -40,8 +40,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 02 May 2023 -/// @version 609 +/// @date 22 May 2023 +/// @version 610 /// /// @copyright (c) Rei Vilo, 2010-2023 /// @copyright All rights reserved diff --git a/src/hV_Font.h b/src/hV_Font.h index 1601551..3b21fb9 100755 --- a/src/hV_Font.h +++ b/src/hV_Font.h @@ -15,7 +15,7 @@ /// * 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, evaluation only, no commercial usage +/// * Evaluation edition: for professionals or organisations, evaluation only, no commercial usage /// @n All rights reserved /// /// * Commercial edition: for professionals or organisations, commercial usage diff --git a/src/hV_Font_Terminal.cpp b/src/hV_Font_Terminal.cpp index 31f49af..e7808ad 100755 --- a/src/hV_Font_Terminal.cpp +++ b/src/hV_Font_Terminal.cpp @@ -13,7 +13,7 @@ // * Basic edition: for hobbyists and for basic usage // Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) // -// * Evaluation edition: for professionals or organisations, evaluation only, no commercial usage +// * Evaluation edition: for professionals or organisations, evaluation only, no commercial usage // All rights reserved // // * Commercial edition: for professionals or organisations, commercial usage diff --git a/src/hV_Font_Terminal.h b/src/hV_Font_Terminal.h index 2e7fbd3..d81c2cf 100755 --- a/src/hV_Font_Terminal.h +++ b/src/hV_Font_Terminal.h @@ -15,7 +15,7 @@ /// * 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, evaluation only, no commercial usage +/// * Evaluation edition: for professionals or organisations, evaluation only, no commercial usage /// @n All rights reserved /// /// * Commercial edition: for professionals or organisations, commercial usage diff --git a/src/hV_Screen_Buffer.cpp b/src/hV_Screen_Buffer.cpp index 47f6c35..da1ef79 100755 --- a/src/hV_Screen_Buffer.cpp +++ b/src/hV_Screen_Buffer.cpp @@ -806,7 +806,7 @@ void hV_Screen_Buffer::clearTouch() { uint16_t tx, ty, tz, tt; while (getTouch(tx, ty, tz, tt)) - // while (getTouchInterrupt()) + // while (getTouchInterrupt()) { delay(10); } diff --git a/src/hV_Screen_Buffer.h b/src/hV_Screen_Buffer.h index 60eeff0..7618f9e 100755 --- a/src/hV_Screen_Buffer.h +++ b/src/hV_Screen_Buffer.h @@ -341,6 +341,8 @@ class hV_Screen_Buffer : protected hV_Font_Terminal uint16_t backColour = myColours.white); /// @} +#if (TOUCH_MODE != USE_TOUCH_NONE) + /// @name Touch /// @note Those functions are optional, and thus defined as empty and not compulsory. /// @{ @@ -388,6 +390,8 @@ class hV_Screen_Buffer : protected hV_Font_Terminal /// @} +#endif // TOUCH_MODE + protected: /// @cond /// @@ -418,11 +422,6 @@ class hV_Screen_Buffer : protected hV_Font_Terminal virtual void _setPoint(uint16_t x1, uint16_t y1, uint16_t colour) = 0; // compulsory // Write and Read - void _writeData88(uint8_t dataHigh8, uint8_t dataLow8); - - // Touch - virtual void _getRawTouch(uint16_t & x0, uint16_t & y0, uint16_t & z0, uint16_t & t0); // compulsory - virtual bool _getInterruptTouch(); // compulsory // Other functions // required by triangle() @@ -452,9 +451,15 @@ class hV_Screen_Buffer : protected hV_Font_Terminal uint16_t _screenWidth, _screenHeigth, _screenDiagonal; uint8_t _orientation; uint16_t _screenColourBits; - + #if (TOUCH_MODE != USE_TOUCH_NONE) + void _writeData88(uint8_t dataHigh8, uint8_t dataLow8); + + // Touch + virtual void _getRawTouch(uint16_t & x0, uint16_t & y0, uint16_t & z0, uint16_t & t0); // compulsory + virtual bool _getInterruptTouch(); // compulsory + bool _touchEvent; uint8_t _touchTrim, _fsmArea; uint16_t _touchXmin, _touchXmax, _touchYmin, _touchYmax;