Created Drivers folder with ILI934x subproject (#209)

Refactored all existing boards to re-use the ILI934x driver code.
This commit is contained in:
Ken Van Hoeylandt
2025-02-08 18:54:09 +01:00
committed by GitHub
parent 8ccba15c25
commit c74006f8b6
27 changed files with 355 additions and 610 deletions
@@ -1,37 +1,6 @@
#pragma once
#include "lvgl.h"
#include <Tactility/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:
std::string getName() const final { return "ILI9341"; }
std::string getDescription() const final { return "SPI display"; }
bool start() override;
bool stop() override;
std::shared_ptr<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; }
};
#include <memory>
std::shared_ptr<tt::hal::Display> createDisplay();