roo_display
API Documentation for roo_display
Loading...
Searching...
No Matches
esp32s3_parallel_ips_capacitive.h
Go to the documentation of this file.
1#pragma once
2
3// https://www.makerfabs.com/esp32-s3-parallel-tft-with-touch-7-inch.html
4// Maker: MakerFabs
5// Product Code: MTESPS37
6
12#include "roo_display/hal/i2c.h"
14
15#if !defined(ESP_PLATFORM) || !(CONFIG_IDF_TARGET_ESP32S3)
16#warning Compilation target must be ESP32_S3 for this device.
17#else
18
20
21/// Makerfabs ESP32-S3 Parallel IPS capacitive display family.
22///
23/// Note: these combos have a built-in SD card reader. Use SD_MMC interface
24/// with pins: clk=12, cmd=11, d0=13.
25
26class Esp32s3ParallelIpsCapacitive : public ComboDevice {
27 public:
28 using Display =
29 roo_display::esp32s3_dma::ParallelRgb565<esp32s3_dma::FLUSH_MODE_LAZY>;
30
31 using ColorMode = Display::ColorMode;
32 static constexpr ColorPixelOrder pixel_order = Display::pixel_order;
33 static constexpr ByteOrder byte_order = Display::byte_order;
34
35 /// Supported panel resolutions.
36 enum Resolution { k800x480, k1024x600 };
37 /// Create a device for the given resolution and orientation.
38 Esp32s3ParallelIpsCapacitive(Resolution resolution,
39 Orientation orientation = Orientation(),
40 I2cMasterBusHandle i2c = I2cMasterBusHandle());
41
42 /// Initialize I2C transport for touch.
43 void initTransport() { i2c_.init(17, 18); }
44
45 Display& display() override { return display_; }
46
47 TouchDevice* touch() override { return &touch_; }
48
49 /// Return touch calibration for the panel.
50 TouchCalibration touch_calibration() override;
51
52 private:
53 Resolution resolution_;
54 I2cMasterBusHandle i2c_;
55 Display display_;
57};
58
59/// Makerfabs 800x480 variant.
60class Esp32s3ParallelIpsCapacitive800x480
61 : public Esp32s3ParallelIpsCapacitive {
62 public:
63 Esp32s3ParallelIpsCapacitive800x480(
64 Orientation orientation = Orientation(),
65 I2cMasterBusHandle i2c = I2cMasterBusHandle())
66 : Esp32s3ParallelIpsCapacitive(k800x480, orientation, i2c) {}
67};
68
69/// Makerfabs 1024x600 variant.
70class Esp32s3ParallelIpsCapacitive1024x600
71 : public Esp32s3ParallelIpsCapacitive {
72 public:
73 Esp32s3ParallelIpsCapacitive1024x600(
74 Orientation orientation = Orientation(),
75 I2cMasterBusHandle i2c = I2cMasterBusHandle())
76 : Esp32s3ParallelIpsCapacitive(k1024x600, orientation, i2c) {}
77};
78
79} // namespace roo_display::products::makerfabs
80
81#endif // ESP32 && CONFIG_IDF_TARGET_ESP32S3
roo_io::ByteOrder ByteOrder
Definition byte_order.h:7