38 #include "rom/lldesc.h" 39 #include "driver/gpio.h" 41 #include "freertos/FreeRTOS.h" 42 #include "freertos/queue.h" 52 #define VGAD_LinesCount 2 65 typedef void (*DrawScanlineCallback)(
void * arg, uint8_t * dest,
int scanLine);
98 using VGABaseController::setResolution;
100 void setResolution(
VGATimings const& timings,
int viewPortWidth = -1,
int viewPortHeight = -1,
bool doubleBuffered =
false);
102 void readScreen(
Rect const & rect,
RGB888 * destBuf);
110 void setDrawScanlineCallback(DrawScanlineCallback drawScanlineCallback,
void * arg =
nullptr) { m_drawScanlineCallback = drawScanlineCallback; m_drawScanlineArg = arg; }
116 void onSetupDMABuffer(lldesc_t
volatile * buffer,
bool isStartOfVertFrontPorch,
int scan,
bool isVisible,
int visibleRow);
117 void allocateViewPort();
122 void setPixelAt(PixelDesc
const & pixelDesc,
Rect & updateRect);
125 void drawEllipse(
Size const & size,
Rect & updateRect);
128 void clear(
Rect & updateRect);
131 void VScroll(
int scroll,
Rect & updateRect);
134 void HScroll(
int scroll,
Rect & updateRect);
140 void invertRect(
Rect const & rect,
Rect & updateRect);
143 void copyRect(
Rect const & source,
Rect & updateRect);
146 void swapFGBG(
Rect const & rect,
Rect & updateRect);
149 void rawDrawBitmap_Native(
int destX,
int destY,
Bitmap const * bitmap,
int X1,
int Y1,
int XCount,
int YCount);
152 void rawDrawBitmap_Mask(
int destX,
int destY,
Bitmap const * bitmap,
void * saveBackground,
int X1,
int Y1,
int XCount,
int YCount);
155 void rawDrawBitmap_RGBA2222(
int destX,
int destY,
Bitmap const * bitmap,
void * saveBackground,
int X1,
int Y1,
int XCount,
int YCount);
158 void rawDrawBitmap_RGBA8888(
int destX,
int destY,
Bitmap const * bitmap,
void * saveBackground,
int X1,
int Y1,
int XCount,
int YCount);
161 void rawFillRow(
int y,
int x1,
int x2,
RGB888 color);
163 void rawFillRow(
int y,
int x1,
int x2, uint8_t colorIndex);
165 void rawInvertRow(
int y,
int x1,
int x2);
167 void rawCopyRow(
int x1,
int x2,
int srcY,
int dstY);
169 void swapRows(
int yA,
int yB,
int x1,
int x2);
175 int getBitmapSavePixelSize() {
return 1; }
177 static void ISRHandler(
void * arg);
180 static VGADirectController * s_instance;
181 static volatile int s_scanLine;
182 static lldesc_t
volatile * s_frameResetDesc;
185 volatile uint8_t * m_lines[VGAD_LinesCount];
189 DrawScanlineCallback m_drawScanlineCallback;
190 void * m_drawScanlineArg;
Represents a 24 bit RGB color.
NativePixelFormat nativePixelFormat()
Represents the native pixel format used by this display.
This file contains fabgl::VGABaseController definition.
This file contains fabgl::GPIOStream definition.
This file contains fabgl::BitmappedDisplayController definition.
Represents an base abstract class for direct draw VGA controller.
void setDrawScanlineCallback(DrawScanlineCallback drawScanlineCallback, void *arg=nullptr)
Sets the callback used when VGADirectController needs to prepare a new scanline to be sent to the VGA...
Specifies the VGA timings. This is a modeline decoded.
Represents a glyph position, size and binary data.
This file contains some utility classes and functions.
NativePixelFormat
This enum defines the display controller native pixel format.
Specifies various glyph painting options.
This file contains FabGL library configuration settings, like number of supported colors...
Represents a bidimensional size.
static VGADirectController * instance()
Returns the singleton instance of VGADirectController class.