mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
39 lines
973 B
C++
39 lines
973 B
C++
#pragma once
|
|
|
|
#include "lvgl.h"
|
|
#include "hal/Display.h"
|
|
#include "esp_lcd_panel_io.h"
|
|
|
|
extern lv_disp_t* displayHandle;
|
|
|
|
class YellowDisplay : public tt::hal::Display {
|
|
|
|
private:
|
|
|
|
esp_lcd_panel_io_handle_t ioHandle = nullptr;
|
|
esp_lcd_panel_handle_t panelHandle = nullptr;
|
|
lv_display_t* displayHandle = nullptr;
|
|
|
|
public:
|
|
|
|
bool start() override;
|
|
|
|
bool stop() override;
|
|
|
|
void setPowerOn(bool turnOn) override {}
|
|
bool isPoweredOn() const override { return true; };
|
|
bool supportsPowerControl() const override { return false; }
|
|
|
|
tt::hal::Touch* _Nullable createTouch() override;
|
|
|
|
void setBacklightDuty(uint8_t backlightDuty) override;
|
|
bool supportsBacklightDuty() const override { return true; }
|
|
|
|
void setGammaCurve(uint8_t index) override;
|
|
uint8_t getGammaCurveCount() const override { return 4; };
|
|
|
|
lv_display_t* _Nullable getLvglDisplay() const override { return displayHandle; }
|
|
};
|
|
|
|
tt::hal::Display* createDisplay();
|