roo_display
API Documentation for roo_display
Loading...
Searching...
No Matches
esp32s3_parallel_ips_capacitive_43.h
Go to the documentation of this file.
1#pragma once
2
3// https://www.makerfabs.com/esp32-s3-parallel-tft-with-touch-4-3-inch.html
4// Maker: MakerFabs
5// Product Code: E32S3RGB43
6
12#include "roo_display/hal/i2c.h"
13#include "roo_display/hal/spi.h"
15
17
18namespace {
19constexpr esp32s3_dma::Config kTftConfig = {.width = 800,
20 .height = 480,
21 .de = 40,
22 .hsync = 39,
23 .vsync = 41,
24 .pclk = 42,
25 .hsync_pulse_width = 4,
26 .hsync_back_porch = 8,
27 .hsync_front_porch = 8,
28 .hsync_polarity = 0,
29 .vsync_pulse_width = 4,
30 .vsync_back_porch = 8,
31 .vsync_front_porch = 8,
32 .vsync_polarity = 0,
33 .pclk_active_neg = 1,
34 .prefer_speed = -1,
35 .r0 = 45,
36 .r1 = 48,
37 .r2 = 47,
38 .r3 = 21,
39 .r4 = 14,
40 .g0 = 5,
41 .g1 = 6,
42 .g2 = 7,
43 .g3 = 15,
44 .g4 = 16,
45 .g5 = 4,
46 .b0 = 8,
47 .b1 = 3,
48 .b2 = 46,
49 .b3 = 9,
50 .b4 = 1,
51 .bswap = false};
52}
53
54/// Makerfabs ESP32-S3 4.3" parallel IPS capacitive device.
56 public:
58 Orientation orientation = Orientation(),
60 int pwm_channel = 1)
61 : spi_(),
62 i2c_(i2c),
63 display_(kTftConfig),
64 touch_(i2c_, -1, 38),
65 backlit_(2) {
66 display_.setOrientation(orientation);
67 }
68
69 /// Initialize I2C transport for touch.
70 void initTransport() { i2c_.init(17, 18); }
71
72 /// Return display device.
73 DisplayDevice& display() override { return display_; }
74
75 /// Return touch device.
76 TouchDevice* touch() override { return &touch_; }
77
78 /// Return touch calibration.
80 return TouchCalibration(0, 0, 800, 480);
81 }
82
83 /// Return SPI bus handle.
84 roo_display::DefaultSpi& spi() { return spi_; }
85 /// SD card CS pin.
86 constexpr int8_t sd_cs() const { return 10; }
87
88 /// Return backlight controller.
89 Backlit& backlit() { return backlit_; }
90
91 private:
94 roo_display::esp32s3_dma::ParallelRgb565Buffered display_;
96 LedcBacklit backlit_;
97};
98
99} // namespace roo_display::products::makerfabs
Base class for displays with integrated, pre-calibrated touch.
Definition combo_device.h:9
Base class for display device drivers.
Definition device.h:223
Represents the orientation of a display device.
Definition orientation.h:25
Touch calibration parameters (bounds + orientation).
Definition calibration.h:10
Touch controller interface.
Definition device.h:428
Esp32s3ParallelIpsCapacitive43(Orientation orientation=Orientation(), roo_display::I2cMasterBusHandle i2c=roo_display::I2cMasterBusHandle(), int pwm_channel=1)