Driver object¶
The driver object manages the panel and the board. It sends the content of the frame-buffer to the screen and refreshes the panel. It is based on the film and the size of the screen.
All the libraries support the EXT3, EXT3.1 and EXT4 extension boards. The Pervasive_Touch_Small
library requires the additional EXT3-Touch expansion board.
The driver library is common to all the PDLS editions.
The driver libraries are developed and maintained by Pervasive Displays.
Configure¶
#include "Pervasive_Wide_Small.h"
The pre-processor statement includes the driver library.
The exposed class has the same name as the driver library.
1 2 |
|
The constructor Pervasive_Wide_Small
creates the driver object.
The required parameters are
-
The first line sets the model of the screen;
-
The second line selects the configuration of the main controller board connected to the EXT3, EXT3.1 or EXT4 extension board.
Screen model¶
The header file of the driver library lists the screens it supports.
The screen constant starts with eScreen_EPD
, contains the size, the film and the controller taken from the product number and separated with a _
.
The product number of the panel is printed on the back of the screen, on the top line close to the QR-code.
Example
The screen with product number CE2271KS094
corresponds to a 2.71” panel with film KS
and controler 09
. The last digit 4
is ignored.
- | Size | Film | Controller | - |
---|---|---|---|---|
CE2 |
271 |
KS |
09 |
4 |
eScreen_EPD |
_271 |
_KS |
_09 |
The screen model for the constructor is eScreen_EPD_271_KS_09
.
Pervasive_Wide_Small myDriver(eScreen_EPD_271_KS_09, boardRaspberryPiPico_RP2040);
The dedicated section Screen constants explains how the screen constants used by the constructor are built from the screen product numbers.
Board configuration¶
The board configuration defines all the GPIOs connected to the EXT3, EXT3.1 and EXT4 extension boards.
Example
boardRaspberryPiPico_RP204
sets the Raspberry Pi Pico as main controller board.
// Driver
#include "Pervasive_Wide_Small.h"
Pervasive_Wide_Small myDriver(eScreen_EPD_271_KS_09, boardRaspberryPiPico_RP2040);
// Screen
#include "PDLS_Advanced.h"
Screen_EPD myScreen(&myDriver);
Legacy version 8
Screen_EPD_EXT3_Fast myScreen(eScreen_EPD_271_KS_09, boardRaspberryPiPico_RP2040);
The dedicated section Boards definition details the content of the configuration and lists the pre-configured main controller boards.
Use¶
The driver is entirely managed by the PDLS library when used with it.
Otherwise, when used alone, the driver needs to be initialised.
myDriver.begin();
begin()
initialises the driver, including the required GPIOs, and the SPI and I²C ports.
myDriver.updateNormal(imageNew, imageSize);
myDriver.updateFast(imageNew, imageOld, imageSize);
Depending of the screen, updateNormal()
and updateFast()
perform the update of the screen in normal or fast mode.
For more information, please refer to the documentation of the driver library.