mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-04-19 09:55:06 +00:00
To avoid keeping track of a list that maps board project names to board ids. Because of this change, we don't have to manually edit `boards.cmake` anymore when adding a new board.
26 lines
703 B
C++
26 lines
703 B
C++
#pragma once
|
|
|
|
#include <Tactility/hal/keyboard/KeyboardDevice.h>
|
|
#include <Tactility/TactilityCore.h>
|
|
|
|
class SdlKeyboard final : public tt::hal::keyboard::KeyboardDevice {
|
|
|
|
lv_indev_t* _Nullable handle = nullptr;
|
|
|
|
public:
|
|
|
|
std::string getName() const override { return "SDL Keyboard"; }
|
|
std::string getDescription() const override { return "SDL keyboard device"; }
|
|
|
|
bool startLvgl(lv_display_t* display) override {
|
|
handle = lv_sdl_keyboard_create();
|
|
return handle != nullptr;
|
|
}
|
|
|
|
bool stopLvgl() override { tt_crash("Not supported"); }
|
|
|
|
bool isAttached() const override { return true; }
|
|
|
|
lv_indev_t* _Nullable getLvglIndev() override { return handle; }
|
|
};
|