Skip to content

Migrate from Basic to Evaluation or Commercial edition

This technical note lists how to migrate from Basic to Evaluation or Commercial edition.

Remove prior installation

If another edition of PDLS has been installed,

  • Open the sub-folder library of the Arduino folder.

  • Delete all the sub-folders starting with hV_, PDLS_ and Pervasive_.

This ensures a clean installation of the new edition.

In case of an edition mismatch, an error is raised at build-time.

./PDLS_Advanced/src/PDLS_Advanced.h:43:2: error: #error Required Advanced (Commercial or Evaluation) edition of PDLS_Common
   43 | #error Required Advanced (Commercial or Evaluation) edition of PDLS_Common
      |  ^~~~~

Changes

Included library

The name of the PDLS library to include changes.

Main code
// Screen
#include "PDLS_Basic.h"
Screen_EPD myScreen(&myDriver);
Main code
// Screen
#include "PDLS_Advanced.h"
Screen_EPD myScreen(&myDriver);

Fonts

The Basic edition includes the Terminal fonts. No pre-processor statements are needed to use them.

The Evaluation and Commercial editions use 16-bit fonts. The Mono variant is the recommended replacement for the fixed-size Terminal font.

The Evaluation and Commercial editions require a pre-processor statement to include the fonts. The main code selects and adds the fonts.

Main code
// Fonts
uint8_t fontSmall, fontMedium, fontLarge, fontVery;
Main code
fontSmall = Font_Terminal6x8;
fontMedium = Font_Terminal8x12;
fontLarge = Font_Terminal12x16;
fontVery = Font_Terminal16x24;
Main code
// Fonts
#include "hV_Font16_Latin_DejaVu.h"
uint8_t fontSmall, fontMedium, fontLarge, fontVery;

#include "hV_Font16_Chinese_Noto.h"
uint8_t fontChinese;
Main code
fontSmall = myScreen.addFont(Font16_Latin_DejaVuMono12);
fontSmall -= ((fontSmall > 0) ? 1 : 0);
fontMedium = myScreen.addFont(Font16_Latin_DejaVuMono14);
fontMedium -= ((fontMedium > 0) ? 1 : 0);
fontLarge = myScreen.addFont(Font16_Latin_DejaVuMono18);
fontLarge -= ((fontLarge > 0) ? 1 : 0);
fontVery = myScreen.addFont(Font16_Latin_DejaVuMono28);
fontVery -= ((fontVery > 0) ? 1 : 0);

fontChinese = myScreen.addFont(Font16_Chinese_Latin_NotoSans12);
fontChinese -= (fontChinese > 0) ? 1 : 0;

Screen update

The Basic edition shares the same command across the different variants.

  • flush() performs a fast update when the driver supports it, otherwise a normal update.

The Evaluation and Commercial editions have specific commands for each update mode.

  • flush() performs a normal update;

  • flushFast() performs a fast update;

  • flushMode() is a parametic variant.

Main code
myScreen.flush();
Main code
myScreen.flush();
myScreen.flushFast();
myScreen.flushMode(UPDATE_NORMAL);
myScreen.flushMode(UPDATE_FAST);

Specific boards

ESP32 SPI

The Basic edition uses the default SPI port.

SPI.begin(14, 12, 13); // SCK MISO MOSI

The Evaluation and Commercial editions set the pins for the SPI port explicitly.

SPI.begin(14, 12, 13); // SCK MISO MOSI

Warning

The ESP32 boards have a specific implementation of SPI on the Arduino SDK. The source code may require to be manually adapted.

PSRAM

If PSRAM is available, the Basic edition uses PSRAM by default.

The Advanced and Commercial editions require PSRAM to be explicitly defined for the frame-buffer.

Main code
// Screen
Screen_EPD myScreen(&myDriver);
Main code
// Frame-buffer
uint8_t * myFrameBuffer = (uint8_t *) ps_malloc(frameSize_EPD_271);

// Screen
Screen_EPD myScreen(&myDriver, myFrameBuffer);

SDK

The Basic edition focuses on the Arduino SDK and can be interfaced to another SDK by adapting the Peripherals library.

The Evaluation edition only supports the Arduino SDK.

The Commercial edition gives access to other SDKs and APIs by adapting the Peripherals library. The twenty-four functions manages general initialisation and exit; configuration and use of GPIOs and UART, SPI and I²C buses; and miscellaneous like time and random.