FabGL
ESP32 Display Controller and Graphics Library

◆ begin() [2/4]

void begin ( SPIClass *  spi,
int  DC,
int  RESX = -1,
int  CS = -1 
)

Initializes TFT display controller with Arduino style SPIClass object.

Parameters
spiSPIClass object.
DCGPIO of D/C signal (Data/Command).
RESXGPIO of Reset signal (can be GPIO_UNUSED).
CSGPIO of optional select signal (can be GPIO_UNUSED). Without CS signal it is impossible to share SPI channel with other devices.

Example:

fabgl::ST7789Controller DisplayController;

// SCK = 18, MOSI = 23, D/C = 22, RESX = 21
SPI.begin(18, -1, 23);
DisplayController.begin(&SPI, 22, 21);
DisplayController.setResolution(TFT_240x240);

Definition at line 164 of file TFTControllerGeneric.cpp.