The Native C++ fork of Adafruit GFX includes direct framebuffer rendering support designed for high-performance displays on microcontrollers such as STM32 with LTDC (LCD-TFT Display Controller) or custom memory-mapped display buffers. This architecture delivers efficient graphics rendering while retaining full compatibility with the standard Adafruit GFX drawing interface.
Unlike traditional display drivers that transmit graphical primitives or dirty regions over serial buses (SPI or I2C), framebuffer support operates directly on a memory-mapped RAM buffer:
The library serves as a drop-in migration path for existing Adafruit GFX codebases:
drawPixel, drawLine, fillRect, drawRect, drawCircle, drawTriangle, etc.) work as expected.Print API Compatibility: Implements standard text formatting and output methods (print(), println()) identical to the original library.To use this library in your native C++ or CMake-based project, include the following dependencies:
https://github.com/TcMenu/TaskManagerIO
https://github.com/TcMenu/tcUnicodeHelper
https://github.com/TcMenu/IoAbstraction
https://github.com/TcMenu/SimpleCollections
https://github.com/TcMenu/TcMenuLog
https://github.com/TcMenu/Adafruit-GFX-mbed-fork
// Example: Creating a framebuffer instance pointing to LTDC display memory
// Framebuffer requires dimensions and the pointer to memory-mapped display RAM
uint16_t* displayBuffer = (uint16_t*)LTDC_FRAMEBUFFER_ADDRESS;
Adafruit_Framebuffer gfx(DISPLAY_WIDTH, DISPLAY_HEIGHT, displayBuffer);
void initDisplay() {
gfx.begin();
gfx.fillScreen(0x0000); // Clear buffer (black)
gfx.setTextColor(0xFFFF); // White text
gfx.println("Hello Framebuffer!");
}
Want to let us know about something?