Refactor LVGL code into kernel module (#472)

* **New Features**
  * Added a standalone LVGL module and enabled LVGL support in the simulator for richer local UI testing.

* **Refactor**
  * HAL and LVGL split into distinct modules; startup and device attach/detach flows reorganized for clearer lifecycle management.
  * Public APIs tightened with clearer nullability/documentation.

* **Bug Fixes**
  * More consistent LVGL start/stop and device attach/detach behavior for improved stability.
This commit is contained in:
Ken Van Hoeylandt
2026-02-01 22:57:45 +01:00
committed by GitHub
parent 3fe1dc0312
commit 9f721e6655
135 changed files with 1553 additions and 667 deletions
@@ -5,7 +5,7 @@
class TpagerEncoder final : public tt::hal::encoder::EncoderDevice {
lv_indev_t* _Nullable encHandle = nullptr;
lv_indev_t* encHandle = nullptr;
pcnt_unit_handle_t encPcntUnit = nullptr;
bool initEncoder();
@@ -26,5 +26,5 @@ public:
int getEncoderPulses() const;
lv_indev_t* _Nullable getLvglIndev() override { return encHandle; }
lv_indev_t* getLvglIndev() override { return encHandle; }
};
@@ -10,7 +10,7 @@
class TpagerKeyboard final : public tt::hal::keyboard::KeyboardDevice {
lv_indev_t* _Nullable kbHandle = nullptr;
lv_indev_t* kbHandle = nullptr;
gpio_num_t backlightPin = GPIO_NUM_NC;
ledc_timer_t backlightTimer;
ledc_channel_t backlightChannel;
@@ -45,7 +45,7 @@ public:
bool stopLvgl() override;
bool isAttached() const override;
lv_indev_t* _Nullable getLvglIndev() override { return kbHandle; }
lv_indev_t* getLvglIndev() override { return kbHandle; }
bool setBacklightDuty(uint8_t duty);
void makeBacklightImpulse();
@@ -19,10 +19,10 @@ static int stop(Device* device) {
Driver tlora_pager_driver = {
.name = "T-Lora Pager",
.compatible = (const char*[]) { "lilygo,tlora-pager", nullptr },
.startDevice = start,
.stopDevice = stop,
.start_device = start,
.stop_device = stop,
.api = nullptr,
.deviceType = nullptr,
.device_type = nullptr,
.owner = &device_module,
.driver_private = nullptr
};