TinyGPU
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QSPIBusESP32 Class Reference

Hardware-accelerated IQSPIBus backend for ESP32, built on top of ESP-IDF's esp_lcd_new_panel_io_spi(quad_mode=1) - DMA-driven, with a persistent scratch buffer and completion callback for writeColor() (see that method's doc comment for why: esp_lcd_panel_io_tx_color() is asynchronous). This is a straight extraction of what used to live directly in DisplayDriverQSPI before the IQSPIBus split - behavior is unchanged from before. More...

#include <QSPIBusESP32.h>

Inheritance diagram for QSPIBusESP32:
Inheritance graph
[legend]
Collaboration diagram for QSPIBusESP32:
Collaboration graph
[legend]

Public Member Functions

 QSPIBusESP32 (int8_t cs, int8_t sclk, int8_t d0, int8_t d1, int8_t d2, int8_t d3, size_t maxTransferBytes, uint32_t pclkHz, spi_host_device_t host)
 
 ~QSPIBusESP32 () override
 
bool begin () override
 Sets up the bus (pins/peripheral). Returns false on failure.
 
void end () override
 
bool writeCommand (uint8_t cmd, const uint8_t *param, size_t len) override
 
bool writeColor (uint8_t cmd, const uint8_t *data, size_t len) override
 
- Public Member Functions inherited from IQSPIBus
virtual ~IQSPIBus ()=default
 
virtual bool begin ()=0
 Sets up the bus (pins/peripheral). Returns false on failure.
 
virtual void end ()=0
 
virtual bool writeCommand (uint8_t cmd, const uint8_t *param, size_t len)=0
 
virtual bool writeColor (uint8_t cmd, const uint8_t *data, size_t len)=0
 

Detailed Description

Hardware-accelerated IQSPIBus backend for ESP32, built on top of ESP-IDF's esp_lcd_new_panel_io_spi(quad_mode=1) - DMA-driven, with a persistent scratch buffer and completion callback for writeColor() (see that method's doc comment for why: esp_lcd_panel_io_tx_color() is asynchronous). This is a straight extraction of what used to live directly in DisplayDriverQSPI before the IQSPIBus split - behavior is unchanged from before.

Constructor & Destructor Documentation

◆ QSPIBusESP32()

QSPIBusESP32 ( int8_t  cs,
int8_t  sclk,
int8_t  d0,
int8_t  d1,
int8_t  d2,
int8_t  d3,
size_t  maxTransferBytes,
uint32_t  pclkHz,
spi_host_device_t  host 
)
inline

◆ ~QSPIBusESP32()

~QSPIBusESP32 ( )
inlineoverride

Member Function Documentation

◆ begin()

bool begin ( )
inlineoverridevirtual

Sets up the bus (pins/peripheral). Returns false on failure.

Implements IQSPIBus.

◆ end()

void end ( )
inlineoverridevirtual

Releases any peripheral resources. Safe to call even if begin() was never called or already failed.

Implements IQSPIBus.

◆ writeColor()

bool writeColor ( uint8_t  cmd,
const uint8_t *  data,
size_t  len 
)
inlineoverridevirtual

Sends len bytes of pixel/color data for the given RAM-write command (usually 0x2C), framed with the 0x32 ("data over 4 lines") opcode. Returns false on transport failure. Blocks until the whole transfer has been accepted by the panel (synchronous from the caller's point of view, even if the underlying transport is internally asynchronous/DMA-driven).

Implements IQSPIBus.

◆ writeCommand()

bool writeCommand ( uint8_t  cmd,
const uint8_t *  param,
size_t  len 
)
inlineoverridevirtual

Sends one MIPI-DCS/vendor register command with up to len parameter bytes, framed with the 0x02 ("param bytes over 1 line") opcode. Returns false on transport failure.

Implements IQSPIBus.


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