42 #include "driver/gpio.h" 44 #include "freertos/FreeRTOS.h" 45 #include "freertos/queue.h" 66 typedef 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; }
139 static bool VSync() {
return s_VSync; }
145 void onSetupDMABuffer(lldesc_t
volatile * buffer,
bool isStartOfVertFrontPorch,
int scan,
bool isVisible,
int visibleRow);
146 void allocateViewPort();
151 void setPixelAt(PixelDesc
const & pixelDesc,
Rect & updateRect);
154 void drawEllipse(
Size const & size,
Rect & updateRect);
157 void clear(
Rect & updateRect);
160 void VScroll(
int scroll,
Rect & updateRect);
163 void HScroll(
int scroll,
Rect & updateRect);
169 void invertRect(
Rect const & rect,
Rect & updateRect);
172 void copyRect(
Rect const & source,
Rect & updateRect);
175 void swapFGBG(
Rect const & rect,
Rect & updateRect);
178 void rawDrawBitmap_Native(
int destX,
int destY,
Bitmap const * bitmap,
int X1,
int Y1,
int XCount,
int YCount);
181 void rawDrawBitmap_Mask(
int destX,
int destY,
Bitmap const * bitmap,
void * saveBackground,
int X1,
int Y1,
int XCount,
int YCount);
184 void rawDrawBitmap_RGBA2222(
int destX,
int destY,
Bitmap const * bitmap,
void * saveBackground,
int X1,
int Y1,
int XCount,
int YCount);
187 void rawDrawBitmap_RGBA8888(
int destX,
int destY,
Bitmap const * bitmap,
void * saveBackground,
int X1,
int Y1,
int XCount,
int YCount);
190 void rawFillRow(
int y,
int x1,
int x2,
RGB888 color);
192 void rawFillRow(
int y,
int x1,
int x2, uint8_t colorIndex);
194 void rawInvertRow(
int y,
int x1,
int x2);
196 void rawCopyRow(
int x1,
int x2,
int srcY,
int dstY);
198 void swapRows(
int yA,
int yB,
int x1,
int x2);
204 int getBitmapSavePixelSize() {
return 1; }
206 static void ISRHandler(
void * arg);
210 static volatile int s_scanLine;
211 static lldesc_t
volatile * s_frameResetDesc;
214 int32_t m_linesCount;
219 DrawScanlineCallback m_drawScanlineCallback;
220 void * m_drawScanlineArg;
Represents a 24 bit RGB color.
NativePixelFormat nativePixelFormat()
Represents the native pixel format used by this display.
void setScanlinesPerCallBack(int value)
Sets number of scanlines to draw in a single callback.
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.
static bool VSync()
Determines if retracing is in progress.
This file contains FabGL library configuration settings, like number of supported colors...
Represents a bidimensional size.
void run()
Begins to call the callback function and to display video frames.
VGADirectController(bool autoRun=true)
Initializes a new instance of VGADirectController.
static VGADirectController * instance()
Returns the singleton instance of VGADirectController class.