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

"Guition ESP32-P4 4.3" 480x800 Capacitive Touch Display" (JC4880P443C_I_W): it has an ST7701 MIPI-DSI display, GT911 capacitive touch (I2C), and an ES8311 audio codec with NS4150 speaker amp (speaker output only - this board has no mic). The board also has a WiFi SDIO interface and an SD_MMC interface, both of which need their own pin setup. More...

#include <LCDBoardsESP32.h>

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

Public Member Functions

 LCDBoardGuitionESP32H4_4_3Display ()=default
 
 ~LCDBoardGuitionESP32H4_4_3Display ()
 
bool begin () override
 
void setAmplifierActive (bool active)
 
size_t width () const override
 Panel width in pixels.
 
size_t height () const override
 Panel height in pixels.
 
ST7701Driver< RGB565 > & display () override
 The board's display driver.
 
TouchDriver * touch () override
 The board's touch controller.
 
const I2SPins & i2s () const override
 The board's I2S pin assignment.
 
const LEDPins & led () const override
 This board has no RGB LED - every LEDPins field is -1.
 
int8_t backlightPin () const override
 The board's backlight GPIO pin.
 
int battery (int battery_readings_=100)
 Reads and returns the battery charge percentage (0 - 100).
 
- Public Member Functions inherited from LCDBoard
virtual ~LCDBoard ()=default
 
virtual bool begin ()=0
 
virtual size_t width () const =0
 Panel width in pixels.
 
virtual size_t height () const =0
 Panel height in pixels.
 
virtual DisplayDriver< RGB565 > & display ()=0
 The board's display driver.
 
virtual TouchDriver * touch ()=0
 The board's touch controller, or nullptr if none is wired up.
 
virtual const I2SPins & i2s () const =0
 The board's I2S/PA pin assignment.
 
virtual const LEDPins & led () const =0
 The board's LED pin assignment.
 
virtual int8_t backlightPin () const
 
template<typename I2SConfig >
void setI2SPins (I2SConfig &cfg)
 

Detailed Description

"Guition ESP32-P4 4.3" 480x800 Capacitive Touch Display" (JC4880P443C_I_W): it has an ST7701 MIPI-DSI display, GT911 capacitive touch (I2C), and an ES8311 audio codec with NS4150 speaker amp (speaker output only - this board has no mic). The board also has a WiFi SDIO interface and an SD_MMC interface, both of which need their own pin setup.

Note: despite the class name (kept for historical/API-compatibility reasons), the chip on this board is an ESP32-P4, not an ESP32-H4 - see ST7701Driver's docs in DisplayDriverDSI.h and the guition-jc4880p4-bsp source this driver was transcribed from.

Note
SD card power: kSdLdoChannel (TF_VCC) is recorded from the BSP source but not currently driven by begin() - unlike kDsiPhyLdoChan, which IS wired into ST7701Driver. If the TF socket needs that LDO switched on to work, SD_MMC.begin() may fail until this is enabled explicitly.
Audio setup: this board's ES8311 codec needs its own I2C init (volume, mic gain, ...), not just I2S pins, so plain I2SStream leaves the codec unconfigured. If the sketch also depends on arduino-audio-driver, use its ready-made board definition instead, which owns the codec init and I2S pins together:

#include "AudioTools.h" #include "AudioTools/AudioLibs/AudioBoardStream.h"

AudioBoardStream i2s(GenericES8311); auto config = i2s.defaultConfig(TX_MODE); board.setI2SPins<I2SConfig>(config); i2s.begin(config); i2s.setVolume(0.5f); board.setAmplifierActive(true);

Without arduino-audio-driver, i2s()/setI2SPins() still give the raw MCLK/BCK/WS/DOUT/DIN pins for a plain I2SStream, but the caller is then responsible for the ES8311's I2C init and driving the PA-enable pin (i2s().paEnable, active low per paEnableActiveLow) itself.

Constructor & Destructor Documentation

◆ LCDBoardGuitionESP32H4_4_3Display()

◆ ~LCDBoardGuitionESP32H4_4_3Display()

Member Function Documentation

◆ backlightPin()

int8_t backlightPin ( ) const
inlineoverridevirtual

The board's backlight GPIO pin.

Reimplemented from LCDBoard.

◆ battery()

int battery ( int  battery_readings_ = 100)
inline

Reads and returns the battery charge percentage (0 - 100).

◆ begin()

bool begin ( )
inlineoverridevirtual

Sets up the backlight, QSPI display controller, touch controller, WiFi SDIO pins, and SD_MMC pins. Returns false if the display or touch begin() fails. The speaker amp is not activated - call setAmplifierActive(true) explicitly.

Implements LCDBoard.

◆ display()

ST7701Driver< RGB565 > & display ( )
inlineoverridevirtual

The board's display driver.

Implements LCDBoard.

◆ height()

size_t height ( ) const
inlineoverridevirtual

Panel height in pixels.

Implements LCDBoard.

◆ i2s()

const I2SPins & i2s ( ) const
inlineoverridevirtual

The board's I2S pin assignment.

Implements LCDBoard.

◆ led()

const LEDPins & led ( ) const
inlineoverridevirtual

This board has no RGB LED - every LEDPins field is -1.

Implements LCDBoard.

◆ setAmplifierActive()

void setAmplifierActive ( bool  active)
inline

Activates or deactivates the NS4150 speaker amp. The amp is active when the pin is driven low, so this function inverts the active state to make it more intuitive to the caller.

◆ touch()

TouchDriver * touch ( )
inlineoverridevirtual

The board's touch controller.

Implements LCDBoard.

◆ width()

size_t width ( ) const
inlineoverridevirtual

Panel width in pixels.

Implements LCDBoard.


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