From e750ec19190247d46803dead9a1c4b03dadc6d0f Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Mon, 9 Feb 2026 20:14:34 +0100 Subject: [PATCH 01/10] Revert esp_lvgl_port upgrade --- Firmware/idf_component.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firmware/idf_component.yml b/Firmware/idf_component.yml index 6d15beae6..0f1db8ffd 100644 --- a/Firmware/idf_component.yml +++ b/Firmware/idf_component.yml @@ -54,7 +54,7 @@ dependencies: version: "1.7.6~1" rules: - if: "target == esp32s3" - espressif/esp_lvgl_port: "2.7.0" + espressif/esp_lvgl_port: "2.5.0" lvgl/lvgl: "9.3.0" FastEPD: git: https://github.com/bitbank2/FastEPD.git From e017b7415f6096d2a478646779ad4505a31874e1 Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Mon, 9 Feb 2026 20:14:55 +0100 Subject: [PATCH 02/10] Fix for T-Deck apps not showing up and added new kernel functionality --- Tactility/Source/Tactility.cpp | 33 ++++++++++--------- TactilityKernel/Include/tactility/device.h | 8 +++++ .../Include/tactility/drivers/root.h | 10 ++++++ TactilityKernel/Include/tactility/error.h | 1 + TactilityKernel/Source/device.cpp | 5 +++ TactilityKernel/Source/drivers/root.cpp | 6 ++++ TactilityKernel/Source/kernel_symbols.c | 4 +++ 7 files changed, 51 insertions(+), 16 deletions(-) diff --git a/Tactility/Source/Tactility.cpp b/Tactility/Source/Tactility.cpp index 5d83a1a81..942a9dcb6 100644 --- a/Tactility/Source/Tactility.cpp +++ b/Tactility/Source/Tactility.cpp @@ -32,6 +32,7 @@ #include #ifdef ESP_PLATFORM +#include "tactility/drivers/root.h" #include #endif @@ -61,8 +62,6 @@ namespace service { namespace statusbar { extern const ServiceManifest manifest; } #ifdef ESP_PLATFORM namespace displayidle { extern const ServiceManifest manifest; } -#endif -#if defined(ESP_PLATFORM) && defined(CONFIG_TT_DEVICE_LILYGO_TDECK) namespace keyboardidle { extern const ServiceManifest manifest; } #endif #if TT_FEATURE_SCREENSHOT_ENABLED @@ -112,11 +111,8 @@ namespace app { #ifdef ESP_PLATFORM namespace crashdiagnostics { extern const AppManifest manifest; } namespace webserversettings { extern const AppManifest manifest; } -#endif - -#if defined(ESP_PLATFORM) && defined(CONFIG_TT_DEVICE_LILYGO_TDECK) - namespace keyboardsettings { extern const AppManifest manifest; } - namespace trackballsettings { extern const AppManifest manifest; } + namespace keyboardsettings { extern const AppManifest manifest; } // T-Deck only for now + namespace trackballsettings { extern const AppManifest manifest; } // T-Deck only for now #endif #if TT_FEATURE_SCREENSHOT_ENABLED @@ -162,11 +158,13 @@ static void registerInternalApps() { addAppManifest(app::webserversettings::manifest); addAppManifest(app::crashdiagnostics::manifest); addAppManifest(app::development::manifest); -#endif - -#if defined(ESP_PLATFORM) && defined(CONFIG_TT_DEVICE_LILYGO_TDECK) - addAppManifest(app::keyboardsettings::manifest); - addAppManifest(app::trackballsettings::manifest); + // T-Deck only: + auto* root_device = device_find_by_name("/"); + check(root_device); + if (root_is_model(root_device, "LilyGO T-Deck")) { + addAppManifest(app::keyboardsettings::manifest); + addAppManifest(app::trackballsettings::manifest); + } #endif #if defined(CONFIG_TINYUSB_MSC_ENABLED) && CONFIG_TINYUSB_MSC_ENABLED @@ -251,13 +249,16 @@ static void registerAndStartSecondaryServices() { addService(service::loader::manifest); addService(service::gui::manifest); addService(service::statusbar::manifest); + addService(service::memorychecker::manifest); #ifdef ESP_PLATFORM addService(service::displayidle::manifest); + // T-Deck only: + auto* root_device = device_find_by_name("/"); + check(root_device); + if (root_is_model(root_device, "LilyGO T-Deck")) { + addService(service::keyboardidle::manifest); + } #endif -#if defined(ESP_PLATFORM) && defined(CONFIG_TT_DEVICE_LILYGO_TDECK) - addService(service::keyboardidle::manifest); -#endif - addService(service::memorychecker::manifest); #if TT_FEATURE_SCREENSHOT_ENABLED addService(service::screenshot::manifest); #endif diff --git a/TactilityKernel/Include/tactility/device.h b/TactilityKernel/Include/tactility/device.h index 1be4b4984..af4595e5a 100644 --- a/TactilityKernel/Include/tactility/device.h +++ b/TactilityKernel/Include/tactility/device.h @@ -178,6 +178,14 @@ struct Device* device_get_parent(struct Device* device); */ bool device_is_ready(const struct Device* device); +/** + * Indicates whether the device is compatible with the given compatible string. + * @param[in] device non-null device pointer + * @param[in] compatible compatible string + * @return true if the device is compatible + */ +bool device_is_compatible(const struct Device* device, const char* compatible); + /** * Set the driver data for a device. * diff --git a/TactilityKernel/Include/tactility/drivers/root.h b/TactilityKernel/Include/tactility/drivers/root.h index e2797b937..f6fe8aa15 100644 --- a/TactilityKernel/Include/tactility/drivers/root.h +++ b/TactilityKernel/Include/tactility/drivers/root.h @@ -2,6 +2,8 @@ #pragma once +#include + #ifdef __cplusplus extern "C" { #endif @@ -10,6 +12,14 @@ struct RootConfig { const char* model; }; +/** + * Indicates whether the device's model matches the specified model. + * @param[in] device the device to check (non-null) + * @param[in] model the model to check against + * @return true if the device's model matches the specified model' + */ +bool root_is_model(const struct Device* device, const char* model); + #ifdef __cplusplus } #endif diff --git a/TactilityKernel/Include/tactility/error.h b/TactilityKernel/Include/tactility/error.h index f01ee259b..094a4c92f 100644 --- a/TactilityKernel/Include/tactility/error.h +++ b/TactilityKernel/Include/tactility/error.h @@ -23,6 +23,7 @@ typedef int error_t; #define ERROR_OUT_OF_MEMORY 9 #define ERROR_NOT_SUPPORTED 10 #define ERROR_NOT_ALLOWED 11 +#define ERROR_BUFFER_OVERFLOW 12 /** Convert an error_t to a human-readable text. Useful for logging. */ const char* error_to_string(error_t error); diff --git a/TactilityKernel/Source/device.cpp b/TactilityKernel/Source/device.cpp index 3e19b5b5c..b752faae5 100644 --- a/TactilityKernel/Source/device.cpp +++ b/TactilityKernel/Source/device.cpp @@ -277,6 +277,11 @@ bool device_is_ready(const struct Device* device) { return device->internal->state.started; } +bool device_is_compatible(const struct Device* device, const char* compatible) { + if (device->internal->driver == nullptr) return false; + return driver_is_compatible(device->internal->driver, compatible); +} + void device_set_driver_data(struct Device* device, void* driver_data) { device->internal->driver_data = driver_data; } diff --git a/TactilityKernel/Source/drivers/root.cpp b/TactilityKernel/Source/drivers/root.cpp index 0288e4c19..f1c04ccd5 100644 --- a/TactilityKernel/Source/drivers/root.cpp +++ b/TactilityKernel/Source/drivers/root.cpp @@ -1,10 +1,16 @@ // SPDX-License-Identifier: Apache-2.0 +#include #include #include extern "C" { +bool root_is_model(const struct Device* device, const char* buffer) { + auto* config = static_cast(device->config); + return strcmp(config->model, buffer) == 0; +} + Driver root_driver = { .name = "root", .compatible = (const char*[]) { "root", nullptr }, diff --git a/TactilityKernel/Source/kernel_symbols.c b/TactilityKernel/Source/kernel_symbols.c index e9686ea25..205383c57 100644 --- a/TactilityKernel/Source/kernel_symbols.c +++ b/TactilityKernel/Source/kernel_symbols.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -36,6 +37,7 @@ const struct ModuleSymbol KERNEL_SYMBOLS[] = { DEFINE_MODULE_SYMBOL(device_get_driver_data), DEFINE_MODULE_SYMBOL(device_is_added), DEFINE_MODULE_SYMBOL(device_is_ready), + DEFINE_MODULE_SYMBOL(device_is_compatible), DEFINE_MODULE_SYMBOL(device_lock), DEFINE_MODULE_SYMBOL(device_try_lock), DEFINE_MODULE_SYMBOL(device_unlock), @@ -79,6 +81,8 @@ const struct ModuleSymbol KERNEL_SYMBOLS[] = { DEFINE_MODULE_SYMBOL(i2s_controller_get_config), DEFINE_MODULE_SYMBOL(i2s_controller_reset), DEFINE_MODULE_SYMBOL(I2S_CONTROLLER_TYPE), + // drivers/root + DEFINE_MODULE_SYMBOL(root_is_model), // drivers/spi_controller DEFINE_MODULE_SYMBOL(spi_controller_lock), DEFINE_MODULE_SYMBOL(spi_controller_try_lock), From 2edeb4f8053b9b1ac4e19320f66fad57005a2d90 Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Mon, 9 Feb 2026 20:15:31 +0100 Subject: [PATCH 03/10] Cleanup copy-pasted messages that were likely copied in error --- Devices/elecrow-crowpanel-advance-28/Source/devices/Display.cpp | 1 - Devices/elecrow-crowpanel-advance-35/Source/devices/Display.cpp | 1 - Devices/lilygo-tdeck/Source/devices/Display.cpp | 1 - Devices/m5stack-cores3/Source/devices/Display.cpp | 1 - Devices/waveshare-s3-touch-lcd-147/Source/devices/Display.cpp | 1 - 5 files changed, 5 deletions(-) diff --git a/Devices/elecrow-crowpanel-advance-28/Source/devices/Display.cpp b/Devices/elecrow-crowpanel-advance-28/Source/devices/Display.cpp index 1b79ebb04..3d1d12b29 100644 --- a/Devices/elecrow-crowpanel-advance-28/Source/devices/Display.cpp +++ b/Devices/elecrow-crowpanel-advance-28/Source/devices/Display.cpp @@ -5,7 +5,6 @@ #include static std::shared_ptr createTouch() { - // Note for future changes: Reset pin is 48 and interrupt pin is 47 auto configuration = std::make_unique( I2C_NUM_0, LCD_HORIZONTAL_RESOLUTION, diff --git a/Devices/elecrow-crowpanel-advance-35/Source/devices/Display.cpp b/Devices/elecrow-crowpanel-advance-35/Source/devices/Display.cpp index 6b5919f6b..3771b46ca 100644 --- a/Devices/elecrow-crowpanel-advance-35/Source/devices/Display.cpp +++ b/Devices/elecrow-crowpanel-advance-35/Source/devices/Display.cpp @@ -5,7 +5,6 @@ #include static std::shared_ptr createTouch() { - // Note for future changes: Reset pin is 48 and interrupt pin is 47 auto configuration = std::make_unique( I2C_NUM_0, 320, diff --git a/Devices/lilygo-tdeck/Source/devices/Display.cpp b/Devices/lilygo-tdeck/Source/devices/Display.cpp index 275654b05..82de3d710 100644 --- a/Devices/lilygo-tdeck/Source/devices/Display.cpp +++ b/Devices/lilygo-tdeck/Source/devices/Display.cpp @@ -5,7 +5,6 @@ #include static std::shared_ptr createTouch() { - // Note for future changes: Reset pin is 48 and interrupt pin is 47 auto configuration = std::make_unique( I2C_NUM_0, 240, diff --git a/Devices/m5stack-cores3/Source/devices/Display.cpp b/Devices/m5stack-cores3/Source/devices/Display.cpp index b7e716779..0409a1c17 100644 --- a/Devices/m5stack-cores3/Source/devices/Display.cpp +++ b/Devices/m5stack-cores3/Source/devices/Display.cpp @@ -17,7 +17,6 @@ static void setBacklightDuty(uint8_t backlightDuty) { } static std::shared_ptr createTouch() { - // Note for future changes: Reset pin is 48 and interrupt pin is 47 auto configuration = std::make_unique( I2C_NUM_0, LCD_HORIZONTAL_RESOLUTION, diff --git a/Devices/waveshare-s3-touch-lcd-147/Source/devices/Display.cpp b/Devices/waveshare-s3-touch-lcd-147/Source/devices/Display.cpp index f23e7fdde..5834a74be 100644 --- a/Devices/waveshare-s3-touch-lcd-147/Source/devices/Display.cpp +++ b/Devices/waveshare-s3-touch-lcd-147/Source/devices/Display.cpp @@ -12,7 +12,6 @@ constexpr auto LCD_VERTICAL_RESOLUTION = 320; void setBacklightDuty(uint8_t level); static std::shared_ptr createTouch() { - // Note for future changes: Reset pin is 48 and interrupt pin is 47 auto configuration = std::make_unique( I2C_NUM_0, 172, From a0d097b53c48fbbf4586d6c53ce954f01ecc87cd Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Mon, 9 Feb 2026 20:15:42 +0100 Subject: [PATCH 04/10] Use interrupt-driven touch on T-Deck --- Devices/lilygo-tdeck/Source/devices/Display.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Devices/lilygo-tdeck/Source/devices/Display.cpp b/Devices/lilygo-tdeck/Source/devices/Display.cpp index 82de3d710..bb17a6d31 100644 --- a/Devices/lilygo-tdeck/Source/devices/Display.cpp +++ b/Devices/lilygo-tdeck/Source/devices/Display.cpp @@ -11,7 +11,9 @@ static std::shared_ptr createTouch() { 320, true, true, - false + false, + GPIO_NUM_NC, + GPIO_NUM_16 ); return std::make_shared(std::move(configuration)); From a7ee91725c4ad1da1d045cbae2cb5bd38daa3b84 Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Mon, 9 Feb 2026 20:17:01 +0100 Subject: [PATCH 05/10] Update checkout github action from v2 to v4 --- .github/actions/build-simulator/action.yml | 2 +- .github/workflows/tests.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/build-simulator/action.yml b/.github/actions/build-simulator/action.yml index b257b2c7e..8f759699f 100644 --- a/.github/actions/build-simulator/action.yml +++ b/.github/actions/build-simulator/action.yml @@ -15,7 +15,7 @@ runs: using: "composite" steps: - name: "Checkout repo" - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: recursive - name: Install Linux Dependencies for SDL diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e129a72e1..96631892a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout repo" - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: recursive - name: "Configure Project" @@ -31,7 +31,7 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout repo" - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: recursive - name: "Install Python Dependencies" From 420fdfdd8842e805bbaa7f4ff320be71ebe9dfa7 Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Mon, 9 Feb 2026 20:27:06 +0100 Subject: [PATCH 06/10] Fix for PC target --- TactilityKernel/Source/drivers/root.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/TactilityKernel/Source/drivers/root.cpp b/TactilityKernel/Source/drivers/root.cpp index f1c04ccd5..c6dc53498 100644 --- a/TactilityKernel/Source/drivers/root.cpp +++ b/TactilityKernel/Source/drivers/root.cpp @@ -3,6 +3,7 @@ #include #include #include +#include extern "C" { @@ -18,7 +19,8 @@ Driver root_driver = { .stop_device = nullptr, .api = nullptr, .device_type = nullptr, - .owner = nullptr + .owner = nullptr, + .internal = nullptr }; } From d3c6e52ce39051960d881c966abae4df872e7524 Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Mon, 9 Feb 2026 20:27:38 +0100 Subject: [PATCH 07/10] Fix for build --- TactilityKernel/Include/tactility/drivers/root.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TactilityKernel/Include/tactility/drivers/root.h b/TactilityKernel/Include/tactility/drivers/root.h index f6fe8aa15..62a2ae194 100644 --- a/TactilityKernel/Include/tactility/drivers/root.h +++ b/TactilityKernel/Include/tactility/drivers/root.h @@ -2,7 +2,7 @@ #pragma once -#include +#include #ifdef __cplusplus extern "C" { From 801eacee16bb46bf1315a05843a14558ff5102c9 Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Mon, 9 Feb 2026 20:29:30 +0100 Subject: [PATCH 08/10] Fixes --- TactilityKernel/Include/tactility/drivers/root.h | 2 +- TactilityKernel/Source/error.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/TactilityKernel/Include/tactility/drivers/root.h b/TactilityKernel/Include/tactility/drivers/root.h index 62a2ae194..7682262f2 100644 --- a/TactilityKernel/Include/tactility/drivers/root.h +++ b/TactilityKernel/Include/tactility/drivers/root.h @@ -16,7 +16,7 @@ struct RootConfig { * Indicates whether the device's model matches the specified model. * @param[in] device the device to check (non-null) * @param[in] model the model to check against - * @return true if the device's model matches the specified model' + * @return true if the device's model matches the specified model */ bool root_is_model(const struct Device* device, const char* model); diff --git a/TactilityKernel/Source/error.cpp b/TactilityKernel/Source/error.cpp index 7a6e144ec..408832508 100644 --- a/TactilityKernel/Source/error.cpp +++ b/TactilityKernel/Source/error.cpp @@ -29,6 +29,8 @@ const char* error_to_string(error_t error) { return "not supported"; case ERROR_NOT_ALLOWED: return "not allowed"; + case ERROR_BUFFER_OVERFLOW: + return "buffer overlow"; default: return "unknown"; } From a34e059c74c2d36e99ff5fa430a31701b14bf5f9 Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Mon, 9 Feb 2026 21:01:53 +0100 Subject: [PATCH 09/10] Typo fix --- TactilityKernel/Source/error.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TactilityKernel/Source/error.cpp b/TactilityKernel/Source/error.cpp index 408832508..e5e149da1 100644 --- a/TactilityKernel/Source/error.cpp +++ b/TactilityKernel/Source/error.cpp @@ -30,7 +30,7 @@ const char* error_to_string(error_t error) { case ERROR_NOT_ALLOWED: return "not allowed"; case ERROR_BUFFER_OVERFLOW: - return "buffer overlow"; + return "buffer overflow"; default: return "unknown"; } From adb23a0e665431c81eaa953031e3d612cea3e44c Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Mon, 9 Feb 2026 21:40:03 +0100 Subject: [PATCH 10/10] Fix for build --- Firmware/Kconfig | 8 +++++++- Tactility/Source/Tactility.cpp | 20 ++++++++------------ device.py | 3 +++ 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/Firmware/Kconfig b/Firmware/Kconfig index 393e75e28..548887e86 100644 --- a/Firmware/Kconfig +++ b/Firmware/Kconfig @@ -6,7 +6,13 @@ menu "Tactility App" config TT_DEVICE_ID string "Device Identifier" default "" - config TT_SPLASH_DURATION + # T-Deck device-related code was directly referenced from Tactility in a pull request. + # This breaks other devices because the code does not exist in those implementations. + # Until we move it out into a proper driver, we have to have pre-processor definition for that. + config TT_TDECK_WORKAROUND + bool "Temporary work-around until we fix the T-Deck keyboard and trackball settings" + default n + config TT_SPLASH_DURATION int "Splash Duration (ms)" default 1000 range 0 3000 diff --git a/Tactility/Source/Tactility.cpp b/Tactility/Source/Tactility.cpp index 942a9dcb6..976064c6f 100644 --- a/Tactility/Source/Tactility.cpp +++ b/Tactility/Source/Tactility.cpp @@ -111,9 +111,11 @@ namespace app { #ifdef ESP_PLATFORM namespace crashdiagnostics { extern const AppManifest manifest; } namespace webserversettings { extern const AppManifest manifest; } +#if CONFIG_TT_TDECK_WORKAROUND == 1 namespace keyboardsettings { extern const AppManifest manifest; } // T-Deck only for now namespace trackballsettings { extern const AppManifest manifest; } // T-Deck only for now #endif +#endif #if TT_FEATURE_SCREENSHOT_ENABLED namespace screenshot { extern const AppManifest manifest; } @@ -158,13 +160,10 @@ static void registerInternalApps() { addAppManifest(app::webserversettings::manifest); addAppManifest(app::crashdiagnostics::manifest); addAppManifest(app::development::manifest); - // T-Deck only: - auto* root_device = device_find_by_name("/"); - check(root_device); - if (root_is_model(root_device, "LilyGO T-Deck")) { +#if defined(CONFIG_TT_TDECK_WORKAROUND) addAppManifest(app::keyboardsettings::manifest); addAppManifest(app::trackballsettings::manifest); - } +#endif #endif #if defined(CONFIG_TINYUSB_MSC_ENABLED) && CONFIG_TINYUSB_MSC_ENABLED @@ -250,14 +249,11 @@ static void registerAndStartSecondaryServices() { addService(service::gui::manifest); addService(service::statusbar::manifest); addService(service::memorychecker::manifest); -#ifdef ESP_PLATFORM +#if defined(ESP_PLATFORM) addService(service::displayidle::manifest); - // T-Deck only: - auto* root_device = device_find_by_name("/"); - check(root_device); - if (root_is_model(root_device, "LilyGO T-Deck")) { - addService(service::keyboardidle::manifest); - } +#if defined(CONFIG_TT_TDECK_WORKAROUND) + addService(service::keyboardidle::manifest); +#endif #endif #if TT_FEATURE_SCREENSHOT_ENABLED addService(service::screenshot::manifest); diff --git a/device.py b/device.py index 3048fcc0f..a68cbfede 100644 --- a/device.py +++ b/device.py @@ -105,6 +105,9 @@ def write_tactility_variables(output_file, device_properties: ConfigParser, devi else: output_file.write(f"CONFIG_TT_DEVICE_NAME=\"{board_vendor} {board_name}\"\n") output_file.write(f"CONFIG_TT_DEVICE_ID=\"{device_id}\"\n") + if device_id == "lilygo-tdeck": + output_file.write("CONFIG_TT_TDECK_WORKAROUND=y\n") + def write_core_variables(output_file, device_properties: ConfigParser): idf_target = get_property_or_exit(device_properties, "hardware", "target").lower()