FabGL
ESP32 Display Controller and Graphics Library
|
Represents the VGA text-only controller. More...
#include <vgatextcontroller.h>
Public Member Functions | |
void | adjustMapSize (int *columns, int *rows) |
Adjust columns and rows to the controller limits. More... | |
void | begin (gpio_num_t redGPIO, gpio_num_t greenGPIO, gpio_num_t blueGPIO, gpio_num_t HSyncGPIO, gpio_num_t VSyncGPIO) |
This is the 8 colors (5 GPIOs) initializer. More... | |
void | begin (gpio_num_t red1GPIO, gpio_num_t red0GPIO, gpio_num_t green1GPIO, gpio_num_t green0GPIO, gpio_num_t blue1GPIO, gpio_num_t blue0GPIO, gpio_num_t HSyncGPIO, gpio_num_t VSyncGPIO) |
This is the 64 colors (8 GPIOs) initializer. More... | |
void | begin () |
This is the 64 colors (8 GPIOs) initializer using default pinout. More... | |
DisplayControllerType | controllerType () |
Determines the display controller type. More... | |
int | getScreenHeight () |
Determines the screen height in pixels. More... | |
int | getScreenWidth () |
Determines the screen width in pixels. More... | |
void | setResolution (char const *modeline=nullptr, int viewPortWidth=-1, int viewPortHeight=-1, bool doubleBuffered=false) |
Sets fixed resolution. More... | |
void | setTextMap (uint32_t const *map, int rows) |
Sets text map to display. More... | |
Represents the VGA text-only controller.
The text only VGA controller allows only text, but requires less than 50K of RAM. Resolution is fixed at 640x480, with 80 columns by 34 rows, 16 colors.
Text only output is very CPU intensive process and consumes up to 30% of one CPU core. Anyway this allows to have more than 290K free for your application.
Graphics (Canvas) aren't possible. Also, some character styles aren't also possible (double size, 132 columns, italic).
This example initializes VGA Text Controller with 64 colors (16 usable):
fabgl::VGATextController VGAController; // the default assigns GPIO22 and GPIO21 to Red, GPIO19 and GPIO18 to Green, GPIO5 and GPIO4 to Blue, GPIO23 to HSync and GPIO15 to VSync VGAController.begin(); VGAController.setResolution();
Definition at line 83 of file vgatextcontroller.h.