TinyGPU
Loading...
Searching...
No Matches
Public Member Functions | List of all members
DeviceOutput< RGB_T > Class Template Reference

Hardware abstraction for writing framebuffers to SPI-based color displays. More...

#include <DeviceOutput.h>

Public Member Functions

 DeviceOutput (DisplayDriver< RGB_T > &driver)
 Construct a DeviceOutput with a display driver.
 
bool begin ()
 Initializes the display and prepares it for receiving data.
 
void end ()
 
bool writeData (ISurface< RGB_T > &surface)
 Write a framebuffer to the display (w x h, RGB565, 2 bytes per pixel).
 

Detailed Description

template<typename RGB_T = RGB565>
class tinygpu::DeviceOutput< RGB_T >

Hardware abstraction for writing framebuffers to SPI-based color displays.

DeviceOutput provides a unified interface for sending RGB565 framebuffer data to common embedded display controllers (ST7735, ST7789, ILI9341, HX8357) using the Arduino SPI API.

Features:

Usage: DeviceOutput out(new ILI9341Driver(spi, cs, dc, rst), 240, 320); out.writeData(framebuffer);

Note
For color order, set RGB565::setColorOrderBGR(true/false) as needed for your display, before creating any data.

Constructor & Destructor Documentation

◆ DeviceOutput()

DeviceOutput ( DisplayDriver< RGB_T > &  driver)
inline

Construct a DeviceOutput with a display driver.

Parameters
driverPointer to a display driver (ownership not taken)
widthDisplay width in pixels
heightDisplay height in pixels

Member Function Documentation

◆ begin()

bool begin ( )
inline

Initializes the display and prepares it for receiving data.

◆ end()

void end ( )
inline

◆ writeData()

bool writeData ( ISurface< RGB_T > &  surface)
inline

Write a framebuffer to the display (w x h, RGB565, 2 bytes per pixel).


The documentation for this class was generated from the following file: