Fixes and improvements (#620)

- Standardized keyboard input using Unicode-based key codes across supported devices and the simulator. Keyboards don't emit `LV_KEY_*` anymore.
- Refactored lilygo encoder driver into a reusable GPIO rotary encoder driver (see `Drivers/gpio-encoder-module/`). Added more features to the config file.
- Improved LVGL keyboard device management, including duplicate prevention and reliable reconnects.
- LVGL file mutex now registers with lvgl start/stop
- Improved LVGL startup/shutdown stability and memory allocation reliability.
- Increased simulator LVGL memory capacity and improved USB device-class handling.
This commit is contained in:
Ken Van Hoeylandt
2026-08-23 17:21:16 +02:00
committed by GitHub
parent 4fea48f433
commit db48dfe812
51 changed files with 1219 additions and 602 deletions
+1 -1
View File
@@ -3,5 +3,5 @@ file(GLOB_RECURSE SOURCE_FILES source/*.c*)
idf_component_register(
SRCS ${SOURCE_FILES}
INCLUDE_DIRS "source"
REQUIRES TactilityKernel lvgl-module lilygo-module
REQUIRES TactilityKernel lvgl-module gpio-encoder-module
)
+1 -1
View File
@@ -6,5 +6,5 @@ dependencies:
- Drivers/tca8418-module
- Drivers/bq25896-module
- Drivers/drv2605-module
- Drivers/lilygo-module
- Drivers/gpio-encoder-module
dts: lilygo,tlora-pager.dts
@@ -18,7 +18,7 @@
#include <bindings/tca8418.h>
#include <bindings/bq25896.h>
#include <bindings/drv2605.h>
#include <lilygo/bindings/tpager_encoder.h>
#include <bindings/gpio_encoder.h>
// Reference: https://wiki.lilygo.cc/get_started/en/LoRa_GPS/T-LoraPager/T-LoraPager.html
/ {
@@ -60,13 +60,13 @@
columns = <10>;
keymap-lc = [
113 119 101 114 116 121 117 105 111 112 // q w e r t y u i o p
97 115 100 102 103 104 106 107 108 10 // a s d f g h j k l ENTER
97 115 100 102 103 104 106 107 108 13 // a s d f g h j k l ENTER
0 122 120 99 118 98 110 109 0 8 // z x c v b n m BACKSPACE
32 0 0 0 0 0 0 0 0 0 // SPC
];
keymap-uc = [
81 87 69 82 84 89 85 73 79 80 // Q W E R T Y U I O P
65 83 68 70 71 72 74 75 76 10 // A S D F G H J K L ENTER
65 83 68 70 71 72 74 75 76 13 // A S D F G H J K L ENTER
0 90 88 67 86 66 78 77 0 8 // Z X C V B N M BACKSPACE
32 0 0 0 0 0 0 0 0 0 // SPC
];
@@ -201,7 +201,7 @@
// Encoder wheel next to the display.
encoder {
compatible = "lilygo,tpager-encoder";
compatible = "tactility,gpio-encoder";
pin-a = <&gpio0 40 GPIO_FLAG_NONE>;
pin-b = <&gpio0 41 GPIO_FLAG_NONE>;
pin-enter = <&gpio0 7 GPIO_FLAG_NONE>;
+1 -4
View File
@@ -2,17 +2,14 @@
#include <tactility/module.h>
#include <tactility/system_event.h>
#include <lilygo/drivers/tpager_encoder_input.h>
constexpr auto* TAG = "T-Lora Pager";
extern "C" {
static void on_boot_completed(struct SystemEvent* /*event*/, void* /*context*/) {
// The kernel tpager_encoder device is already started by kernel_init(); this just
// The kernel gpio_encoder device is already started by kernel_init(); this just
// registers it as an LVGL input device, which requires LVGL to be up first.
lvgl_lock();
tpager_encoder::init();
lvgl_unlock();
}