42 #include "driver/gpio.h" 44 #include "freertos/FreeRTOS.h" 45 #include "freertos/queue.h" 83 using VGABaseController::setResolution;
85 void setResolution(
VGATimings const& timings,
int viewPortWidth = -1,
int viewPortHeight = -1,
bool doubleBuffered =
false);
105 static uint8_t * sgetScanline(
int y) {
return (uint8_t*) s_viewPort[y]; }
115 virtual void setupDefaultPalette() = 0;
117 void updateRGB2PaletteLUT();
118 void calculateAvailableCyclesForDrawings();
119 static void primitiveExecTask(
void * arg);
121 uint8_t RGB888toPaletteIndex(
RGB888 const & rgb) {
122 return m_packedRGB222_to_PaletteIndex[RGB888toPackedRGB222(rgb)];
125 uint8_t RGB2222toPaletteIndex(uint8_t value) {
126 return m_packedRGB222_to_PaletteIndex[value & 0b00111111];
129 uint8_t RGB8888toPaletteIndex(
RGBA8888 value) {
130 return RGB888toPaletteIndex(RGB888(value.R, value.G, value.B));
137 TaskHandle_t m_primitiveExecTask;
139 volatile uint8_t * * m_lines;
142 static volatile uint8_t * * s_viewPort;
143 static volatile uint8_t * * s_viewPortVisible;
145 static lldesc_t
volatile * s_frameResetDesc;
147 static volatile int s_scanLine;
154 void allocateViewPort();
156 void checkViewPortSize();
157 void onSetupDMABuffer(lldesc_t
volatile * buffer,
bool isStartOfVertFrontPorch,
int scan,
bool isVisible,
int visibleRow);
160 volatile uint32_t m_primitiveExecTimeoutCycles;
162 volatile bool m_taskProcessingPrimitives;
166 bool m_processPrimitivesOnBlank;
168 uint8_t m_packedRGB222_to_PaletteIndex[64];
172 int m_columnsQuantum;
174 int m_viewPortRatioDiv;
175 int m_viewPortRatioMul;
176 intr_handler_t m_isrHandler;
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.
void suspendBackgroundPrimitiveExecution()
Suspends drawings.
Specifies the VGA timings. This is a modeline decoded.
void setProcessPrimitivesOnBlank(bool value)
Determines the maximum time allowed to process primitives.
This file contains some utility classes and functions.
virtual int colorsCount()
Determines number of colors this display can provide.
NativePixelFormat
This enum defines the display controller native pixel format.
This file contains FabGL library configuration settings, like number of supported colors...
Represents the base class for paletted bitmapped controllers like VGA16Controller, VGA8Controller, etc..