FabGL
ESP32 Display Controller and Graphics Library
|
void begin | ( | SPIClass * | spi, |
gpio_num_t | DC, | ||
gpio_num_t | RESX = GPIO_UNUSED , |
||
gpio_num_t | CS = GPIO_UNUSED |
||
) |
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, GPIO_NUM_22, GPIO_NUM_21); DisplayController.setResolution(TFT_240x240);
Definition at line 151 of file TFTControllerGeneric.cpp.