FabGL
ESP32 Display Controller and Graphics Library
|
void begin | ( | SPIClass * | spi, |
int | DC, | ||
int | RESX = -1 , |
||
int | CS = -1 |
||
) |
Initializes TFT display controller with Arduino style SPIClass object.
spi | SPIClass object. |
DC | GPIO of D/C signal (Data/Command). |
RESX | GPIO of Reset signal (can be GPIO_UNUSED). |
CS | GPIO 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 171 of file TFTControllerGeneric.cpp.