|
FabGL
ESP32 Display Controller and Graphics Library
|
| void begin | ( | int | SCK, |
| int | MOSI, | ||
| int | DC, | ||
| int | RESX, | ||
| int | CS, | ||
| int | host | ||
| ) |
Initializes TFT display controller.
This initializer uses SDK API to get access to the SPI channel.
| SCK | GPIO of clock signal (sometimes named SCL). |
| MOSI | GPIO of data out signal (sometimes named SDA). |
| DC | GPIO of D/C signal. |
| RESX | GPIO of optional reset signal (sometimes named RESX, can be -1). |
| CS | GPIO of optional selet signal (can be -1). Without CS signal it is impossible to share SPI channel with other devices. |
| host | SPI bus to use (1 = HSPI, 2 = VSPI). |
Example:
// setup using VSPI (compatible with SD Card, which uses HSPI) // SCK = 18, MOSI = 23, D/C = 22, RESET = 21, no CS (WARN: disconnect VGA connector!!) DisplayController.begin(18, 23, 22, 21, -1, VSPI_HOST); DisplayController.setResolution(TFT_240x240);
Definition at line 180 of file TFTControllerGeneric.cpp.