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

Hardware-SPI4 ST7735 driver for the WeAct MiniSTM32H7xx's bundled 0.96" 160x80 TFT. More...

#include <LCDBoardsSTM32.h>

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

Public Member Functions

 ST7735DriverHardwareSPI (SPIClass &spi, int8_t cs, int8_t dc, int8_t rst, size_t xOffset, size_t yOffset, size_t width, size_t height, uint8_t madctl, uint32_t frequencyHz=15000000)
 
size_t width () const override
 
size_t height () const override
 
bool begin () override
 
bool writeData (ISurface< RGB565 > &surface) override
 
bool writeData (ISurface< RGB565 > &surface, size_t x, size_t y) override
 
- Public Member Functions inherited from DisplayDriver< RGB565 >
virtual ~DisplayDriver ()=default
 
virtual bool begin ()=0
 
virtual void end ()
 
virtual bool writeData (ISurface< RGB565 > &surface)=0
 
virtual bool writeData (ISurface< RGB565 > &surface, size_t x, size_t y)=0
 
virtual void setRotation (DisplayRotation rotation)
 
virtual size_t width () const=0
 
virtual size_t height () const=0
 
void writeColor (size_t width, size_t height, RGB565 color)
 

Protected Member Functions

bool setAddressWindow (size_t x, size_t y, size_t w, size_t h) override
 
virtual bool setAddressWindow (size_t x, size_t y, size_t w, size_t h)=0
 

Additional Inherited Members

- Protected Attributes inherited from DisplayDriver< RGB565 >
Font5x7< RGB565 > defaultFont
 

Detailed Description

Hardware-SPI4 ST7735 driver for the WeAct MiniSTM32H7xx's bundled 0.96" 160x80 TFT.

Getting this panel working took a few rounds of hardware debugging:

Constructor & Destructor Documentation

◆ ST7735DriverHardwareSPI()

ST7735DriverHardwareSPI ( SPIClass &  spi,
int8_t  cs,
int8_t  dc,
int8_t  rst,
size_t  xOffset,
size_t  yOffset,
size_t  width,
size_t  height,
uint8_t  madctl,
uint32_t  frequencyHz = 15000000 
)
inline
Parameters
frequencyHzSPI clock - 15MHz default matches WeAct's own factory firmware for this exact panel (SPI4 at APB1/8, ~120MHz/8), itself in line with the ST7735's typical 15-20MHz datasheet ceiling.

Member Function Documentation

◆ begin()

bool begin ( )
inlineoverridevirtual

◆ height()

size_t height ( ) const
inlineoverridevirtual

◆ setAddressWindow()

bool setAddressWindow ( size_t  x,
size_t  y,
size_t  w,
size_t  h 
)
inlineoverrideprotectedvirtual

◆ width()

size_t width ( ) const
inlineoverridevirtual

Current addressable panel width/height in pixels - for a driver that supports setRotation(), these reflect the current rotation (landscape vs portrait swaps them; see isLandscapeFamily()), not necessarily the panel's native/physical orientation. Callers that need to lay out content (e.g. OutputTinyGPU's scale_to_fit target, or clearScreen()'s band loop) should read these fresh rather than caching their own copy, so a setRotation() call is picked up automatically without needing separate bookkeeping.

Implements DisplayDriver< RGB565 >.

◆ writeData() [1/2]

bool writeData ( ISurface< RGB565 > &  surface)
inlineoverridevirtual

◆ writeData() [2/2]

bool writeData ( ISurface< RGB565 > &  surface,
size_t  x,
size_t  y 
)
inlineoverridevirtual

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