38 #include "rom/lldesc.h" 39 #include "driver/gpio.h" 41 #include "freertos/FreeRTOS.h" 42 #include "freertos/queue.h" 57 #if FABGLIB_VGAXCONTROLLER_PERFORMANCE_CHECK 58 extern volatile uint64_t s_vgapalctrlcycles;
83 using VGABaseController::setResolution;
85 void setResolution(
VGATimings const& timings,
int viewPortWidth = -1,
int viewPortHeight = -1,
bool doubleBuffered =
false);
103 static uint8_t * sgetScanline(
int y) {
return (uint8_t*) s_viewPort[y]; }
113 virtual void setupDefaultPalette() = 0;
115 void updateRGB2PaletteLUT();
116 void calculateAvailableCyclesForDrawings();
117 static void primitiveExecTask(
void * arg);
119 uint8_t RGB888toPaletteIndex(
RGB888 const & rgb) {
120 return m_packedRGB222_to_PaletteIndex[RGB888toPackedRGB222(rgb)];
123 uint8_t RGB2222toPaletteIndex(uint8_t value) {
124 return m_packedRGB222_to_PaletteIndex[value & 0b00111111];
127 uint8_t RGB8888toPaletteIndex(
RGBA8888 value) {
128 return RGB888toPaletteIndex(RGB888(value.R, value.G, value.B));
135 TaskHandle_t m_primitiveExecTask;
137 volatile uint8_t * * m_lines;
140 static volatile uint8_t * * s_viewPort;
141 static volatile uint8_t * * s_viewPortVisible;
143 static lldesc_t
volatile * s_frameResetDesc;
145 static volatile int s_scanLine;
152 void allocateViewPort();
154 void checkViewPortSize();
155 void onSetupDMABuffer(lldesc_t
volatile * buffer,
bool isStartOfVertFrontPorch,
int scan,
bool isVisible,
int visibleRow);
158 volatile uint32_t m_primitiveExecTimeoutCycles;
160 volatile bool m_taskProcessingPrimitives;
164 bool m_processPrimitivesOnBlank;
166 uint8_t m_packedRGB222_to_PaletteIndex[64];
171 int m_viewPortRatioDiv;
172 int m_viewPortRatioMul;
173 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.
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..