Skip to content

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_EXT structure, synonym of pins_t;

  • Set the pins of the connected GPIOs, or specify NOT_CONNECTED otherwise;

  • Mention this variable to the screen constructor.

hV_List_Boards.h
const Board_EXT myBoard =
{
    .scope = BOARD_EXT3, ///< Extension boards EXT3, EXT3.1, EXT3.2

    .panelBusy = 11, ///< All EXT* pin 3 Red -> 11
    .panelDC = 12, ///< All EXT* pin 4 Orange -> 12
    .panelReset = 13, ///< All EXT* pin 5 Yellow -> 13
    .flashCS = 18, ///< All EXT* except EXT3.2 pin 8 Violet -> 18
    .panelCS = 19, ///< All EXT* pin 9 Grey -> 19
    .panelCSS = 39, ///< EXT3 and EXT3.1 pin 12 Grey2 -> 39
    .flashCSS = 38, ///< EXT3 pin 20 or EXT3.1 pin 11 Black2 -> 38
    .touchInt = 8, ///< EXT3-Touch pin 3 Red -> 8
    .touchReset = 6, ///< EXT3-Touch pin 4 Orange -> 6
    .panelPower = NOT_CONNECTED, ///< Optional power circuit -> 2
    .cardCS = NOT_CONNECTED, ///< External SD-card board -> 5
    .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 NFC NT3H2111_2211 !Field detect, I2C address = 0x55
    .imuInt1 = NOT_CONNECTED, ///< EXT4 pin 18 Red LIS2DH12 !INT2, I2C address = 0x19
    .imuInt2 = NOT_CONNECTED, ///< EXT4 pin 19 Brown LIS2DH12 !INT1, I2C address = 0x19
    .weatherInt = NOT_CONNECTED // EXT4 pin 20 Black HDC2080 !INT, I2C address = 0x40
    // 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, EXT3.2 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.


See also