roo_display
API Documentation for roo_display
Loading...
Searching...
No Matches
waveshare_esp32s3_touch_lcd_43.h
Go to the documentation of this file.
1// 2026-02-14 19:00:00 v1.5.0 - Remove lazy init; let driver handle full reset.
2#pragma once
3
5
6#if !defined(ESP32) || !(CONFIG_IDF_TARGET_ESP32S3)
7#warning Compilation target must be ESP32_S3 for this device.
8#else
9
12#include "roo_display/hal/i2c.h"
14
16{
17
18// Waveshare ESP32-S3 Touch LCD 4.3" device wrapper.
19//
20// GT911 reset is routed through a CH422G I/O expander (GpioSetter lambda).
21// The INT pin has a hardware pull-down on the board, keeping it LOW during
22// reset so the GT911 reliably selects I2C address 0x5D without software
23// intervention.
24class WaveshareEsp32s3TouchLcd43 : public ComboDevice {
25 public:
26 // Constructs the device without bus initialization.
27 // Call initTransport() before use.
28 WaveshareEsp32s3TouchLcd43(Orientation orientation = Orientation(),
29 I2cMasterBusHandle i2c = I2cMasterBusHandle());
30
31 // Initializes PSRAM, I2C bus, and CH422G expander.
32 bool initTransport();
33
34 DisplayDevice& display() override;
35 TouchDevice* touch() override;
36 TouchCalibration touch_calibration() override;
37
38 void setBacklight(bool on);
39
40 private:
41 void writeEXIO(uint8_t pin, bool state);
42
43 I2cMasterBusHandle i2c_;
44 I2cSlaveDevice ch422g_wr_set_;
45 I2cSlaveDevice ch422g_wr_io_;
46 esp32s3_dma::ParallelRgb565Buffered display_;
47 TouchGt911 touch_;
48 uint8_t exio_shadow_;
49};
50
51} // namespace roo_display::products::waveshare
52
53
54#endif // ESP32 && CONFIG_IDF_TARGET_ESP32S3