Migrate from release 9 to release 10¶
This technical note lists how to migrate from from release 9 to release 10.
The user guide has been adapted to new release 10. Special boxes provide the reference for legacy release 9.
Legacy release 9
Special boxes provide the reference for Legacy release 9.
New features¶
16-bit fonts¶
Up to release 9, PDLS featured 8-bit fonts, limited to 255 characters, based on ISO-8859-1 or Latin 1.
With release 10, PDLS brings 16-bit fonts, with a set of up to 65536 characters, based on ISO-10646 or Unicode.
The corresponding parameter for FONT_MODE is USE_FONT16_HEADER.
The new multilingual fonts
The new font is Noto.
The Noto family of fonts includes fixed Monospace, and proportional Serif and Sans Serif variants, and supports non-Latin sets of characters.
Basic edition
The Basic edition keeps the 8-bit extended Terminal font.
Text coded in UTF-8¶
Up to release 9, PDLS only accepted text coded on ISO-8859-1 or Latin 1. Text coded in UTF-8 had to be converted first into ISO-8859-1 or Latin 1.
With release 10, PDLS now supports text coded in UTF-8 directly. This is valid for gText(), and the Graphics and GUI elements.
Text coded in UTF-16¶
gText() also accepts text with characters coded in UTF-16.
The new utf8to16() function converts a text with characters coded in UTF-8 into a text with characters coded in UTF-16.
The new utf16to8() function converts a text with characters coded in UTF-16 into a text with characters coded in UTF-8.
Unified board definition¶
Up to release 9, PDLS required setting a parameter at built-time to allow access to the EXT4 extension board.
With release 10, PDLS provides a unified structure for the definition of the main controller boards. The name of the main controller board includes a suffix EXT3 or EXT4 to select the extension board.
With the suffix EXT3, the Arduino Nano Matter definition sets NOT_CONNECTED for the unused pins.
///
/// @brief Arduino Nano Matter with Silicon Labs MGM240P, tested
/// @note Numbers refer to pins
/// @note Recommended board
///
const pins_t boardArduinoNanoMatter_EXT3 =
{
.scope = BOARD_EXT3, ///< EXT3, EXT3.1
.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, ///< EXT3 and EXT3.1 pin 12 Grey2
.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 = NOT_CONNECTED, ///< EXT4 pin 20 White power circuit -> D2
.cardCS = NOT_CONNECTED, ///< External SD-card board
.cardDetect = NOT_CONNECTED, ///< External SD-card board
// EXT4 specific
.button = NOT_CONNECTED, // EXT4 pin 12 Grey
.ledData = NOT_CONNECTED, // EXT4 pin 13 Violet WS2813C
.nfcFD = NOT_CONNECTED, // EXT4 pin 17 Orange NT3H2111 !Field detect
.imuInt1 = NOT_CONNECTED, // EXT4 pin 18 Red LIS2DH12 !INT2
.imuInt2 = NOT_CONNECTED, // EXT4 pin 19 Brown LIS2DH12 !INT1
.weatherInt = NOT_CONNECTED // EXT4 pin 20 Black HDC2080 !INT
// End of EXT4 specific
};
With the suffix EXT4, the Arduino Nano Matter definition includes additionnal pins for the RGB LED, button, panel power and sensors interrupts.
///
/// @brief Arduino Nano Matter with Silicon Labs MGM240P, tested
/// @details Variant with panelPower, button and LED for EXT4
/// @note Numbers refer to pins
/// @note Recommended board for EXT4
///
const pins_t boardArduinoNanoMatter_EXT4 =
{
.scope = BOARD_EXT4, ///< EXT4
.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, ///< External SD-card board
.cardDetect = NOT_CONNECTED, ///< External SD-card board
// EXT4 specific
.button = 3, // EXT4 pin 12 Grey
.ledData = 4, // EXT4 pin 13 Violet WS2813C
.nfcFD = 17, // EXT4 pin 17 Orange NFC NT3H2111_2211 !Field detect
.imuInt1 = 16, // EXT4 pin 18 Red LIS2DH12 !INT1, I2C address = 0x19
.imuInt2 = 15, // EXT4 pin 19 Brown LIS2DH12 !INT2, I2C address = 0x19
.weatherInt = 14, // EXT4 pin 20 Black HDC2080 !INT, I2C address = 0x40
// End of EXT4 specific
};
Viewer edition¶
The Viewer edition now supports all the screens, including the four colours black-white-red-yellow.
Deprecated features¶
Conversion of UTF-8¶
Because PDLS now supports text coded in UTF-8 directly, the utf2iso() is no longer required and is deprecated.
Fonts in external SPI Flash¶
The new 16-bit fonts are stored as header files only and added to the application statically at build-time.
The option with fonts stored in external SPI Flash and used dynamically at run-time is no longer available.
The parameters USE_FONT_HEADER and USE_FONT_FLASH for FONT_MODE are deprecated.
Modified features¶
Font family¶
The multilingual Noto font, under the SIL Open Font License , is added to the DejaVu font.
Display of text¶
gText(), the Graphics and GUI elements, now accept text with characters coded in UTF-8.
gText() directly accepts text with characters coded in UTF-8.
char text8[] = "éàîüç $£€¥ ¿?";
myScreen.gText(10, 10, text8);
gText() also accepts text with characters coded in UTF-16.
// Null-terminated 16-bit text
uint16_t text16[] = {0xe9, 0xe0, 0xee, 0xfc, 0xe7, 0x20, 0x24, 0xa3, 0x20ac, 0xa5, 0x20, 0xbf, 0x3f, 0x00};
myScreen.gText(10, 40, text16);
gText() only accepted text with characters coded in ISO-8859-1 or Latin 1.
Text coded in UTF-8 needed first to be converted into ISO-8859-1 or Latin 1 with utf2iso().
char text8[16] = [0];
strcpy(text8, utf2iso("éàîüç $£€¥ ¿?"));
myScreen.gText(10, 10, text8);
Selection of board¶
// Boards
pins_t myBoard = boardArduinoNanoMatter_EXT4;
#include "Pervasive_Wide_Small.h"
Pervasive_Wide_Small myDriver(eScreen_EPD_290_KS_0F, myBoard);
#define BOARD_EXT4 4 ///< EXT4 board
#define USE_EXT_BOARD BOARD_EXT4 ///< Selected board
The build-time parameter USE_EXT_BOARD is set to BOARD_EXT4 on the hV_List_Options header file.
// Boards
pins_t myBoard = boardArduinoNanoMatter;
#include "Pervasive_Wide_Small.h"
Pervasive_Wide_Small myDriver(eScreen_EPD_290_KS_0F, myBoard);
The main code selects the board.
Editions and variants names¶
Evaluation and Commercial editions¶
PDLS_Advanced is the single variant for the Evaluation and Commercial editions.
Viewer edition¶
PDLS_Viewer and Driver_EPD are the new names for the PDLS_Viewer_Touch and Driver_EPD_Viewer libraries.
PDLS_Viewer is the single variant for the Viewer edition.
Basic edition¶
PDLS_Basic is the single variant for the Basic edition.