roo_display
API Documentation for roo_display
Loading...
Searching...
No Matches
t_display_s3.h
Go to the documentation of this file.
1#pragma once
2
3// https://www.lilygo.cc/products/t-display-s3
4// Maker: LILYGO
5// Product Code: T-Display-S3
6
7#if !defined(ESP32) || !(CONFIG_IDF_TARGET_ESP32S3)
8#warning Compilation target must be ESP32_S3 for this device.
9#else
10
17
18namespace roo_display::products::lilygo {
19
20/// LILYGO T-Display S3 device wrapper.
21class TDisplayS3 : public ComboDevice {
22 public:
23 using DisplayType = roo_display::St7789_Generic<esp32s3::ParallelLcd8Bit, 170,
24 320, 35, 0, 35, 0>;
25
26 using ColorMode = typename DisplayType::ColorMode;
27 static constexpr ColorPixelOrder pixel_order = DisplayType::pixel_order;
28 static constexpr ByteOrder byte_order = DisplayType::byte_order;
29
30 TDisplayS3(Orientation orientation = Orientation())
31 : display_(esp32s3::ParallelLcd8Bit(
32 6, 7, 5, 8, 9,
33 esp32s3::ParallelLcd8Bit::DataBus{.pinD0 = 39,
34 .pinD1 = 40,
35 .pinD2 = 41,
36 .pinD3 = 42,
37 .pinD4 = 45,
38 .pinD5 = 46,
39 .pinD6 = 47,
40 .pinD7 = 48})),
41 backlit_(38) {
42 display_.setOrientation(orientation);
43 }
44
45 /// Initialize transport/backlight.
46 void initTransport() { backlit_.begin(); }
47
48 /// Return display device.
49 DisplayType& display() override { return display_; }
50
51 const ColorMode& color_mode() const { return display_.color_mode(); }
52
53 /// Return backlight controller.
54 Backlit& backlit() { return backlit_; }
55
56 private:
57 DisplayType display_;
58
59 LedcBacklit backlit_;
60};
61
62} // namespace roo_display::products::lilygo
63
64#endif
roo_io::ByteOrder ByteOrder
Definition byte_order.h:7