FabGL
ESP32 Display Controller and Graphics Library
VGATextController Class Reference

Represents the VGA text-only controller. More...

#include <vgatextcontroller.h>

Inheritance diagram for VGATextController:

Public Member Functions

void adjustMapSize (int *columns, int *rows)
 Adjusts columns and rows to the controller limits. More...
 
void begin ()
 This is the 64 colors (8 GPIOs) initializer using default pinout. 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 (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...
 
int colorsCount ()
 Determines number of colors this display can provide. 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...
 
int getViewPortHeight ()
 Determines vertical size of the viewport. More...
 
int getViewPortWidth ()
 Determines horizontal size of the viewport. More...
 
void setFont (FontInfo const *value)
 Sets font. 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...
 

Detailed Description

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 a selectable number of 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();
Examples
Others/KeyboardScanCodes/KeyboardScanCodes.ino, VGA/Altair8800/Altair8800.ino, VGA/LoopbackTerminal/LoopbackTerminal.ino, VGA/MultitaskingCPM/MultitaskingCPM.ino, VGA/NetworkTerminal/NetworkTerminal.ino, and VGA/SimpleTextTerminalOut/SimpleTextTerminalOut.ino.

Definition at line 79 of file vgatextcontroller.h.


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