mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 10:53:17 +00:00
Adapted from pull request https://github.com/ByteWelder/Tactility/pull/238 - JC2432W328C - ST7789 - CST820 (816) 240x320 - 2.8 inch - ESP32-8048S043C - ST7262 - GT911 800x480 - 4.3 inch - JC8048W550C - ST7262 - GT911 800x480 - 5 inch
33 lines
887 B
C++
33 lines
887 B
C++
#pragma once
|
|
|
|
#include "Tactility/hal/display/DisplayDevice.h"
|
|
#include <esp_lcd_types.h>
|
|
#include <lvgl.h>
|
|
|
|
class YellowDisplay : public tt::hal::display::DisplayDevice {
|
|
|
|
private:
|
|
|
|
esp_lcd_panel_io_handle_t ioHandle = nullptr;
|
|
esp_lcd_panel_handle_t panelHandle = nullptr;
|
|
lv_display_t* displayHandle = nullptr;
|
|
|
|
public:
|
|
|
|
std::string getName() const final { return "ST7262"; }
|
|
std::string getDescription() const final { return "RGB Display"; }
|
|
|
|
bool start() override;
|
|
|
|
bool stop() override;
|
|
|
|
std::shared_ptr<tt::hal::touch::TouchDevice> _Nullable createTouch() override;
|
|
|
|
void setBacklightDuty(uint8_t backlightDuty) override;
|
|
bool supportsBacklightDuty() const override { return true; }
|
|
|
|
lv_display_t* _Nullable getLvglDisplay() const override { return displayHandle; }
|
|
};
|
|
|
|
std::shared_ptr<tt::hal::display::DisplayDevice> createDisplay();
|