FabGL
ESP32 Display Controller and Graphics Library
ST7789Controller Class Reference

Implements ST7789 display driver controller. More...

#include <TFTControllerSpecif.h>

Inheritance diagram for ST7789Controller:

Public Member Functions

void begin ()
 Initializes TFT display controller. More...
 
void begin (int SCK, int MOSI, int DC, int RESX, int CS, int host)
 Initializes TFT display controller. More...
 
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. More...
 
void begin (SPIClass *spi, int DC, int RESX=-1, int CS=-1)
 Initializes TFT display controller with Arduino style SPIClass object. More...
 
virtual int colorsCount ()
 Determines number of colors this display can provide. More...
 
DisplayControllerType controllerType ()
 Determines the display controller type. More...
 
void enableBackgroundPrimitiveExecution (bool value)
 Enables or disables drawings inside vertical retracing time. More...
 
void enableBackgroundPrimitiveTimeout (bool value)
 Enables or disables execution time limitation inside vertical retracing interrupt. More...
 
int getScreenHeight ()
 Determines the screen height in pixels. More...
 
int getScreenWidth ()
 Determines the screen width in pixels. More...
 
int getViewPortHeight ()
 Determines vertical size of the viewport. More...
 
int getViewPortWidth ()
 Determines horizontal size of the viewport. More...
 
bool isDoubleBuffered ()
 Determines whether BitmappedDisplayController is on double buffered mode. More...
 
NativePixelFormat nativePixelFormat ()
 Represents the native pixel format used by this display. More...
 
void processPrimitives ()
 Draws immediately all primitives in the queue. More...
 
void refreshSprites ()
 Forces the sprites to be updated. More...
 
void removeSprites ()
 Empties the list of active sprites. More...
 
void reset ()
 Performs display hardware and software. More...
 
void resumeBackgroundPrimitiveExecution ()
 Resumes drawings after suspendBackgroundPrimitiveExecution(). More...
 
int screenCol ()
 Gets initial left column of the viewport. More...
 
int screenRow ()
 Gets initial top row of the viewport. More...
 
void setMouseCursor (Cursor *cursor)
 Sets mouse cursor and make it visible. More...
 
void setMouseCursor (CursorName cursorName)
 Sets mouse cursor from a set of predefined cursors. More...
 
void setMouseCursorPos (int X, int Y)
 Sets mouse cursor position. More...
 
void setOrientation (TFTOrientation value, bool force=false)
 Set display orientation and rotation. More...
 
void setResolution (char const *modeline, int viewPortWidth=-1, int viewPortHeight=-1, bool doubleBuffered=false)
 Sets TFT resolution and viewport size. More...
 
void setReverseHorizontal (bool value)
 Inverts horizontal axis. More...
 
void setScreenCol (int value)
 Set initial left column of the viewport. More...
 
void setScreenRow (int value)
 Set initial top row of the viewport. More...
 
template<typename T >
void setSprites (T *sprites, int count)
 Sets the list of active sprites. More...
 
void suspendBackgroundPrimitiveExecution ()
 Suspends drawings. More...
 

Static Public Attributes

static int queueSize = 1024
 Size of display controller primitives queue. More...
 

Detailed Description

Implements ST7789 display driver controller.

Example:

fabgl::ST7789Controller DisplayController;

void setup() {
  // 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);

  Canvas cv(&DisplayController);
  cv.clear();
  cv.drawText(0, 0, "Hello World!");
}
Examples
ST7789_TFT/240x240/DoubleBuffer/DoubleBuffer.ino, ST7789_TFT/240x240/FileBrowser/FileBrowser.ino, ST7789_TFT/240x240/SimpleTerminalOut/SimpleTerminalOut.ino, and ST7789_TFT/240x240/Sprites/Sprites.ino.

Definition at line 69 of file TFTControllerSpecif.h.


The documentation for this class was generated from the following files: