Skip to content

Migrate from Viewer to Commercial edition and back

This application note lists how to migrate from Viewer to Commercial edition and back.

At the application level, the code is fully compatible between the Viewer and Commercial editions.

Only a limited set of libraries needs to be adapted.

Include folders and libraries

Shared folders and libraries

Below are listed the names of the folders of the libraries to be provided for building and linking. Differences are in bold.

Libraries  Viewer Commercial
Common hV_Common
hV_HAL_Peripherals_Viewer
hV_Board_Viewer
hV_Utilities_PDLS
hV_Common
hV_HAL_Peripherals
hV_Board_EXT3
hV_Utilities_PDLS
Font  hV_Font_DejaVu_Header hV_Font_DejaVu_Header

The include statements are the same for the Viewer and Commercial editions.

// SDK
#include "hV_HAL_Peripherals.h"

// Configuration
#include "hV_Configuration.h"

Screen folders and libraries

Below are listed the names of the folders of the libraries to be provided for building and linking.

Libraries  Viewer Commercial
Screen PDLS_EXT3_Viewer_Touch PDLS_EXT3_Advanced_Touch

The include statements differ for the Viewer and Commercial editions.

// Screen
#include "PDLS_EXT3_Viewer_Touch.h"
// Screen
#include "PDLS_EXT3_Advanced_Touch.h"

However, both PDLS_EXT3_Viewer_Touch and PDLS_EXT3_Advanced_Touch are umbrella header files.

By calling the screen header file directly, the include statement is the same for the Viewer and Commercial editions.

// Screen
#include "Screen_EPD_EXT3.h"

Application folders and libraries

Below are listed the names of the folders of the libraries to be provided for building and linking. Differences are in bold.

Libraries  Viewer Commercial
Code  hV_Code hV_Code
Graphics  hV_Graphics hV_Graphics
GUI   hV_GUI_Fast hV_GUI_Fast
File  hV_File hV_File
SD
Serial   hV_Serial hV_Serial

On the Commercial edition, the file library requires an external third-party SD library compatible with the SDK and the MCU.

The include statements are the same for the Viewer and Commercial editions.

// Applications
#include "hV_Code.h"
#include "hV_Graphics.h"
#include "hV_GUI.h"
#include "hV_Serial.h"
#include "hV_File_Linux.h"

Check list

Configuration

The Viewer edition requires specific options for the configuration of strings and storage, as detailed at the Configure section:

  • String should be set to C-standard char array;

  • Storage should be set to Linux;

  • Although the board can be omitted, it is highly recommended to mention the board with the targeted MCU.

Viewer specific functions

The Viewer edition exposes specific functions.

For optimal compatibility with the Commercial edition, use and check the WITH_VIEWER macro.

#if defined(WITH_VIEWER)

    myScreen.setViewerHelp(true);

#endif // WITH_VIEWER

Screen refresh

Although both the Viewer and Commercial editions expose the flush() and flushFast() refresh functions, the Viewer edition performs them the same way.

Files

Both the Viewer and Commercial editions write files in BMP, pixmap or PBM, image and 16-bit image formats.

Both the Viewer and Commercial editions read files in BMP, pixmap or PBM formats.

Additionnally, the Viewer edition writes and reads files in PNG format.

Info

For the Commercial edition, files operations are not recommended, as the management of the SD-card by an MCU is rather slow and prone to interferences.