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

Driver for the New Vision NV3041A QSPI TFT controller (480x272 panels on Guition/Sunton JC4827W543-class ESP32-S3 boards). More...

#include <DisplayDriverQSPI.h>

Inheritance diagram for NV3041ADriver< RGB_T >:
Inheritance graph
[legend]
Collaboration diagram for NV3041ADriver< RGB_T >:
Collaboration graph
[legend]

Public Member Functions

 NV3041ADriver (int8_t cs, int8_t sclk, int8_t d0, int8_t d1, int8_t d2, int8_t d3, size_t width=480, size_t height=272, uint32_t pclkHz=32000000)
 
 NV3041ADriver (IQSPIBus &bus, size_t width=480, size_t height=272)
 Bus-injection constructor - see DisplayDriverQSPI's equivalent.
 
bool begin () override
 
- Public Member Functions inherited from DisplayDriverQSPI< RGB_T >
 DisplayDriverQSPI (int8_t cs, int8_t sclk, int8_t d0, int8_t d1, int8_t d2, int8_t d3, size_t width, size_t height, uint32_t pclkHz=40000000, spi_host_device_t host=SPI3_HOST)
 
 DisplayDriverQSPI (IQSPIBus &bus, size_t width, size_t height)
 
void end () override
 
 ~DisplayDriverQSPI () override
 
size_t width () const override
 
size_t height () const override
 
bool writeData (ISurface< RGB_T > &surface) override
 
bool writeData (ISurface< RGB_T > &surface, size_t x, size_t y) override
 
- Public Member Functions inherited from DisplayDriver< RGB_T >
virtual ~DisplayDriver ()=default
 
virtual bool begin ()=0
 
virtual void end ()
 
virtual bool writeData (ISurface< RGB_T > &surface)=0
 
virtual bool writeData (ISurface< RGB_T > &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, RGB_T color)
 

Additional Inherited Members

- Protected Member Functions inherited from DisplayDriverQSPI< RGB_T >
bool beginBus ()
 
bool writeCommand (uint8_t cmd, const uint8_t *param=nullptr, size_t len=0)
 
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
 
- Protected Attributes inherited from DisplayDriverQSPI< RGB_T >
IQSPIBus * bus_ = nullptr
 
size_t width_
 
size_t height_
 
- Protected Attributes inherited from DisplayDriver< RGB_T >
Font5x7< RGB_T > defaultFont
 
- Static Protected Attributes inherited from DisplayDriverQSPI< RGB_T >
static constexpr uint8_t kCmdRamWrite = 0x2C
 

Detailed Description

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

Driver for the New Vision NV3041A QSPI TFT controller (480x272 panels on Guition/Sunton JC4827W543-class ESP32-S3 boards).

The full vendor register-unlock/gate/source-timing/gamma init sequence, confirmed against real hardware (ported from moononournation/Arduino_GFX's Arduino_NV3041A driver - an earlier minimal sleep-out/pixel-format/MADCTL/display-on sequence produced a rotated color channel mapping: red rendered as blue, green as red, blue as green). Register 0x3A (pixel format) uses a chip-specific encoding on this part, not the standard MIPI-DCS one: 0x01 selects 16bpp RGB565 here, not the commonly-documented 0x55.

Platform-independent: works over any IQSPIBus, so the same class covers ESP32 (QSPIBusESP32, hardware/DMA), RP2040 and STM32 (QSPIBusBitBang, software) - see DisplayDriverQSPI's class comment. Only bring-up on ESP32 has been confirmed against real hardware; the RP2040/STM32 bit-bang path follows the same documented wire protocol but has not been run on real hardware.

Constructor & Destructor Documentation

◆ NV3041ADriver() [1/2]

NV3041ADriver ( int8_t  cs,
int8_t  sclk,
int8_t  d0,
int8_t  d1,
int8_t  d2,
int8_t  d3,
size_t  width = 480,
size_t  height = 272,
uint32_t  pclkHz = 32000000 
)
inline

◆ NV3041ADriver() [2/2]

NV3041ADriver ( IQSPIBus &  bus,
size_t  width = 480,
size_t  height = 272 
)
inline

Bus-injection constructor - see DisplayDriverQSPI's equivalent.

Member Function Documentation

◆ begin()

bool begin ( )
inlineoverridevirtual

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