42#include "driver/gpio.h"
44#include "freertos/FreeRTOS.h"
45#include "freertos/queue.h"
66typedef void (*DrawScanlineCallback)(
void * arg, uint8_t * dest,
int scanLine);
104 using VGABaseController::setResolution;
106 void setResolution(
VGATimings const& timings,
int viewPortWidth = -1,
int viewPortHeight = -1,
bool doubleBuffered =
false);
108 void readScreen(
Rect const & rect,
RGB888 * destBuf);
116 void setDrawScanlineCallback(DrawScanlineCallback drawScanlineCallback,
void * arg =
nullptr) { m_drawScanlineCallback = drawScanlineCallback; m_drawScanlineArg = arg; }
164 static bool VSync() {
return s_VSync; }
170 void onSetupDMABuffer(lldesc_t
volatile * buffer,
bool isStartOfVertFrontPorch,
int scan,
bool isVisible,
int visibleRow);
171 void allocateViewPort();
176 void setPixelAt(PixelDesc
const & pixelDesc,
Rect & updateRect);
179 void drawEllipse(
Size const & size,
Rect & updateRect);
182 void clear(
Rect & updateRect);
185 void VScroll(
int scroll,
Rect & updateRect);
188 void HScroll(
int scroll,
Rect & updateRect);
194 void invertRect(
Rect const & rect,
Rect & updateRect);
197 void copyRect(
Rect const & source,
Rect & updateRect);
200 void swapFGBG(
Rect const & rect,
Rect & updateRect);
203 void rawDrawBitmap_Native(
int destX,
int destY,
Bitmap const * bitmap,
int X1,
int Y1,
int XCount,
int YCount);
206 void rawDrawBitmap_Mask(
int destX,
int destY,
Bitmap const * bitmap,
void * saveBackground,
int X1,
int Y1,
int XCount,
int YCount);
209 void rawDrawBitmap_RGBA2222(
int destX,
int destY,
Bitmap const * bitmap,
void * saveBackground,
int X1,
int Y1,
int XCount,
int YCount);
212 void rawDrawBitmap_RGBA8888(
int destX,
int destY,
Bitmap const * bitmap,
void * saveBackground,
int X1,
int Y1,
int XCount,
int YCount);
215 void rawFillRow(
int y,
int x1,
int x2,
RGB888 color);
217 void rawFillRow(
int y,
int x1,
int x2, uint8_t colorIndex);
219 void rawInvertRow(
int y,
int x1,
int x2);
221 void rawCopyRow(
int x1,
int x2,
int srcY,
int dstY);
223 void swapRows(
int yA,
int yB,
int x1,
int x2);
229 int getBitmapSavePixelSize() {
return 1; }
231 static void ISRHandler(
void * arg);
235 static volatile int s_scanLine;
236 static lldesc_t
volatile * s_frameResetDesc;
238 static lldesc_t
volatile * * s_DMALines;
240 int32_t m_linesCount;
245 DrawScanlineCallback m_drawScanlineCallback;
246 void * m_drawScanlineArg;
void run()
Begins to call the callback function and to display video frames.
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...
void setScanlinesPerCallBack(int value)
Sets number of scanlines to draw in a single callback.
static VGADirectController * instance()
Returns the singleton instance of VGADirectController class.
NativePixelFormat nativePixelFormat()
Represents the native pixel format used by this display.
void setScanlineBuffer(int scanline, uint8_t volatile *lineBuffer)
Sets a scanline buffer.
uint8_t volatile * getDefaultScanlineBuffer(int scanline)
Gets default scanline buffer.
VGADirectController(bool autoRun=true)
Initializes a new instance of VGADirectController.
static bool VSync()
Determines if retracing is in progress.
uint8_t volatile * getScanlineBuffer(int scanline)
Gets current scanline buffer.
Represents a base abstract class for direct draw VGA controller.
This file contains fabgl::BitmappedDisplayController definition.
This file contains FabGL library configuration settings, like number of supported colors,...
This file contains some utility classes and functions.
NativePixelFormat
This enum defines the display controller native pixel format.
Represents a glyph position, size and binary data.
Represents a 24 bit RGB color.
Represents a bidimensional size.
Specifies the VGA timings. This is a modeline decoded.
This file contains fabgl::GPIOStream definition.
Specifies various glyph painting options.
This file contains fabgl::VGABaseController definition.