From e95e5a4413aa58545e2f977414008c00577f6005 Mon Sep 17 00:00:00 2001 From: Rei Vilo Date: Sat, 19 Nov 2022 15:57:30 +0100 Subject: [PATCH] Release 6.0.2 --- .../Basic_Touch_Draw/Basic_Touch_Draw.ino | 4 +- examples/Basic_Touch_GUI/Basic_Touch_GUI.ino | 4 +- .../Basic_Touch_TicTacToe.ino | 4 +- library.properties | 2 +- src/Screen_EPD_EXT3.cpp | 53 +++++++++++-------- src/Screen_EPD_EXT3.h | 7 ++- src/hV_Configuration.h | 6 +-- src/hV_Documentation.h | 4 +- 8 files changed, 45 insertions(+), 39 deletions(-) mode change 100644 => 100755 examples/Basic_Touch_Draw/Basic_Touch_Draw.ino mode change 100644 => 100755 examples/Basic_Touch_GUI/Basic_Touch_GUI.ino mode change 100644 => 100755 examples/Basic_Touch_TicTacToe/Basic_Touch_TicTacToe.ino diff --git a/examples/Basic_Touch_Draw/Basic_Touch_Draw.ino b/examples/Basic_Touch_Draw/Basic_Touch_Draw.ino old mode 100644 new mode 100755 index 01e0f66..39e60c5 --- a/examples/Basic_Touch_Draw/Basic_Touch_Draw.ino +++ b/examples/Basic_Touch_Draw/Basic_Touch_Draw.ino @@ -5,8 +5,8 @@ /// @details Library for Pervasive Displays EXT3 - Basic level /// /// @author Rei Vilo -/// @date 12 Nov 2022 -/// @version 601 +/// @date 21 Nov 2022 +/// @version 602 /// /// @copyright (c) Rei Vilo, 2010-2022 /// @copyright CC = BY SA NC diff --git a/examples/Basic_Touch_GUI/Basic_Touch_GUI.ino b/examples/Basic_Touch_GUI/Basic_Touch_GUI.ino old mode 100644 new mode 100755 index aa4398f..095d41e --- a/examples/Basic_Touch_GUI/Basic_Touch_GUI.ino +++ b/examples/Basic_Touch_GUI/Basic_Touch_GUI.ino @@ -5,8 +5,8 @@ /// @details Library for Pervasive Displays EXT3 - Basic edition /// /// @author Rei Vilo -/// @date 12 Nov 2022 -/// @version 601 +/// @date 21 Nov 2022 +/// @version 602 /// /// @copyright (c) Rei Vilo, 2010-2022 /// @copyright CC = BY SA NC diff --git a/examples/Basic_Touch_TicTacToe/Basic_Touch_TicTacToe.ino b/examples/Basic_Touch_TicTacToe/Basic_Touch_TicTacToe.ino old mode 100644 new mode 100755 index be6db1a..f0bd2c5 --- a/examples/Basic_Touch_TicTacToe/Basic_Touch_TicTacToe.ino +++ b/examples/Basic_Touch_TicTacToe/Basic_Touch_TicTacToe.ino @@ -5,8 +5,8 @@ /// @details Library for Pervasive Displays EXT3 - Basic level /// /// @author Rei Vilo -/// @date 12 Nov 2022 -/// @version 601 +/// @date 21 Nov 2022 +/// @version 602 /// /// @copyright (c) Rei Vilo, 2010-2022 /// @copyright CC = BY SA NC diff --git a/library.properties b/library.properties index 80a70b0..19615aa 100755 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=PDLS_EXT3_Basic_Touch -version=6.0.1 +version=6.0.2 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/Screen_EPD_EXT3.cpp b/src/Screen_EPD_EXT3.cpp index 39058d2..eec3252 100755 --- a/src/Screen_EPD_EXT3.cpp +++ b/src/Screen_EPD_EXT3.cpp @@ -19,6 +19,7 @@ // Release 541: Improved support for ESP32 // Release 550: Tested Xiao ESP32-C3 with SPI exception // Release 601: Added support for screens with embedded fast update +// Release 602: Improve functions structure // // Library header @@ -106,21 +107,18 @@ void Screen_EPD_EXT3_Fast::COG_initial(uint8_t updateMode) void Screen_EPD_EXT3_Fast::COG_getUserData() { - // 2.7” = 0xcf, 0x8d - // 3.7” = 0xcf, 0x0f - uint16_t _codeSizeType = _eScreen_EPD_EXT3 & 0xffff; // Size cSize cType Driver switch (_codeSizeType) { - case 0x2709: + case 0x2709: // 2.70” = 2.71” = 0xcf, 0x8d index00_data[0] = 0xcf; index00_data[1] = 0x8d; break; - case 0x370C: + case 0x370C: // 3.70” = 0xcf, 0x0f index00_data[0] = 0xcf; index00_data[1] = 0x8f; @@ -132,6 +130,16 @@ void Screen_EPD_EXT3_Fast::COG_getUserData() } } +void Screen_EPD_EXT3_Fast::COG_sendImageDataFast() +{ + uint8_t * nextBuffer = _newImage; + uint8_t * previousBuffer = _newImage + _pageColourSize; + + _sendIndexData(0x10, previousBuffer, _frameSize); // Previous frame + _sendIndexData(0x13, nextBuffer, _frameSize); // Next frame + memcpy(previousBuffer, nextBuffer, _frameSize); // Copy displayed next to previous +} + void Screen_EPD_EXT3_Fast::COG_update() { _sendCommand8(0x04); // Power on @@ -384,16 +392,11 @@ String Screen_EPD_EXT3_Fast::WhoAmI() void Screen_EPD_EXT3_Fast::flush() { - // Configure + // Initialise COG_initial(UPDATE_FAST); // Send image data - uint8_t * nextBuffer = _newImage; - uint8_t * previousBuffer = _newImage + _pageColourSize; - - _sendIndexData(0x10, previousBuffer, _frameSize); // Previous frame - _sendIndexData(0x13, nextBuffer, _frameSize); // Next frame - memcpy(previousBuffer, nextBuffer, _frameSize); // Copy displayed next to previous + COG_sendImageDataFast(); // Update COG_update(); @@ -425,6 +428,17 @@ void Screen_EPD_EXT3_Fast::clear(uint16_t colour) } } +void Screen_EPD_EXT3_Fast::regenerate() +{ + clear(myColours.black); + flush(); + delay(100); + + clear(myColours.white); + flush(); + delay(100); +} + void Screen_EPD_EXT3_Fast::invert(bool flag) { _invert = flag; @@ -620,17 +634,6 @@ void Screen_EPD_EXT3_Fast::_sendIndexData(uint8_t index, const uint8_t * data, u digitalWrite(_pin.panelCS, HIGH); // CS High = Unselect } -void Screen_EPD_EXT3_Fast::regenerate() -{ - clear(myColours.black); - flush(); - - delay(100); - - clear(myColours.white); - flush(); -} - // // === Touch section // @@ -853,3 +856,7 @@ bool Screen_EPD_EXT3_Fast::_getInterruptTouch() } } #endif // TOUCH_MODE +// +// === End of Touch section +// + diff --git a/src/Screen_EPD_EXT3.h b/src/Screen_EPD_EXT3.h index b4c41d1..3f20d5c 100755 --- a/src/Screen_EPD_EXT3.h +++ b/src/Screen_EPD_EXT3.h @@ -16,8 +16,8 @@ /// * 3.70"-Touch reference xTP370PGH0x /// /// @author Rei Vilo -/// @date 12 Nov 2022 -/// @version 601 +/// @date 21 Nov 2022 +/// @version 602 /// /// @copyright (c) Rei Vilo, 2010-2022 /// @copyright Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) @@ -50,7 +50,7 @@ /// /// @brief Library release number /// -#define SCREEN_EPD_EXT3_RELEASE 601 +#define SCREEN_EPD_EXT3_RELEASE 602 // Other libraries #include "SPI.h" @@ -246,7 +246,6 @@ class Screen_EPD_EXT3_Fast final : public hV_Screen_Buffer uint8_t _codeExtra; uint8_t _codeSize; uint8_t _codeType; - uint8_t _codeDriver; // specific for small uint16_t _bufferSizeV, _bufferSizeH, _bufferDepth; uint32_t _pageColourSize, _frameSize; diff --git a/src/hV_Configuration.h b/src/hV_Configuration.h index c82cf51..f3a9c14 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 12 Nov 2022 -/// @version 601 +/// @date 21 Nov 2022 +/// @version 602 /// /// @copyright (c) Rei Vilo, 2010-2022 /// @copyright All rights reserved @@ -56,7 +56,7 @@ /// /// @brief Release /// -#define hV_CONFIGURATION_RELEASE 601 +#define hV_CONFIGURATION_RELEASE 602 /// /// @name 1- List of supported Pervasive Displays screens diff --git a/src/hV_Documentation.h b/src/hV_Documentation.h index e2914db..b2bdcea 100755 --- a/src/hV_Documentation.h +++ b/src/hV_Documentation.h @@ -35,8 +35,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 2022 -/// @version 601 +/// @date 21 Nov 2022 +/// @version 602 /// /// @copyright (c) Rei Vilo, 2010-2022 /// @copyright All rights reserved