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
+26
View File
@@ -0,0 +1,26 @@
#pragma once
#include "hal/Keyboard.h"
#include <TactilityCore.h>
class SdlKeyboard : public tt::hal::Keyboard {
private:
lv_indev_t* _Nullable handle = nullptr;
public:
bool start(lv_display_t* display) override {
handle = lv_sdl_keyboard_create();
return handle != nullptr;
}
bool stop() override { tt_crash("Not supported"); }
bool isAttached() const override { return true; }
lv_indev_t* _Nullable getLvglIndev() override { return handle; }
};
tt::hal::Keyboard* createKeyboard() {
return static_cast<tt::hal::Keyboard*>(new SdlKeyboard());
}