Skip to content

Commit

Permalink
Release 6.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rei-vilo committed Nov 19, 2022
1 parent eb376ef commit e95e5a4
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 39 deletions.
4 changes: 2 additions & 2 deletions examples/Basic_Touch_Draw/Basic_Touch_Draw.ino
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions examples/Basic_Touch_GUI/Basic_Touch_GUI.ino
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions examples/Basic_Touch_TicTacToe/Basic_Touch_TicTacToe.ino
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
53 changes: 30 additions & 23 deletions src/Screen_EPD_EXT3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
//
Expand Down Expand Up @@ -853,3 +856,7 @@ bool Screen_EPD_EXT3_Fast::_getInterruptTouch()
}
}
#endif // TOUCH_MODE
//
// === End of Touch section
//

7 changes: 3 additions & 4 deletions src/Screen_EPD_EXT3.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions src/hV_Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -56,7 +56,7 @@
///
/// @brief Release
///
#define hV_CONFIGURATION_RELEASE 601
#define hV_CONFIGURATION_RELEASE 602

///
/// @name 1- List of supported Pervasive Displays screens
Expand Down
4 changes: 2 additions & 2 deletions src/hV_Documentation.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e95e5a4

Please sign in to comment.