Hal refactored (#99)

This commit is contained in:
Ken Van Hoeylandt
2024-12-02 00:32:39 +01:00
committed by GitHub
parent 0188ce721c
commit 33bb742dfb
103 changed files with 1222 additions and 1228 deletions
@@ -0,0 +1,33 @@
#pragma once
#include "lvgl.h"
#include "hal/Display.h"
extern lv_disp_t* displayHandle;
class M5stackDisplay : public tt::hal::Display {
private:
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 {}
uint8_t getBacklightDuty() const override { return 255; }
bool supportsBacklightDuty() const override { return false; }
lv_display_t* _Nullable getLvglDisplay() const override { return displayHandle; }
};
tt::hal::Display* createDisplay();