Define a non-listed board¶
This procedure explains how to define a non-listed board.
If the hV_List_Boards header file does not include the configuration of a main controller board, it needs to be defined.
-
Create a variable with the
Board_EXTstructure, synonym ofpins_t; -
Set the pins of the connected GPIOs, or specify
NOT_CONNECTEDotherwise; -
Mention this variable to the screen constructor.
hV_List_Boards.h
const Board_EXT myBoard =
{
.scope = BOARD_EXT3, ///< EXT3, EXT3.1
.panelBusy = 11, ///< EXT3 and EXT3.1 pin 3 Red
.panelDC = 12, ///< EXT3 and EXT3.1 pin 4 Orange
.panelReset = 13, ///< EXT3 and EXT3.1 pin 5 Yellow
.flashCS = 18, ///< EXT3 and EXT3.1 pin 8 Violet
.panelCS = 19, ///< EXT3 and EXT3.1 pin 9 Grey
.panelCSS = 39, ///< EXT3 and EXT3.1 pin 12 Grey2
.flashCSS = 38, ///< EXT3 and EXT3.1 pin 20 Black2
.touchInt = NOT_CONNECTED, ///< EXT3-Touch pin 3 Red
.touchReset = NOT_CONNECTED, ///< EXT3-Touch pin 4 Orange
.panelPower = NOT_CONNECTED, ///< Optional power circuit
.cardCS = NOT_CONNECTED, ///< Separate SD-card board
.cardDetect = NOT_CONNECTED, ///< Separate 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
};
// Driver
#include "Pervasive_Wide_Small.h"
Pervasive_Wide_Small myDriver(eScreen_EPD_271_KS_09, myBoard);
// Screen
#include "PDLS_Basic.h"
Screen_EPD myScreen(&myDriver);
The EXT3, EXT3.1 and EXT4 extension boards share the same first ten pins. The other pins are specific.
Warning
The EXT4 extension board requires .scope set to BOARD_EXT4.
The EXT4 extension board requires the panelPower in pin 20, as the power control circuit is normally off.