69 Commits

Author SHA1 Message Date
Ken Van Hoeylandt
cb4ce5246d
USB host refactored (#684)
- Create `USB_HOST_TYPE` base driver in TactilityKernel
- Refactor esp32_usbhost dts format, and create child devices dynamically
- Use PSRAM for task stacks where possible: saving 20 kB from just the task stacks, but roughly 30 kB when nothing is connected.
- Allow the user to disable USB host interface in the USB settings app, saving an additionaly 20 kB of IRAM when nothing was connected.
- Change listener-based APIs to subscribe and poll/await pattern. This avoids callstacks of apps and services leaking into the USB API

This results in big IRAM savings: 30 kB when USB host is on and nothing is connected, and 50 kB total when USB host is disabled.
This brings the total free IRAM after boot from roughly 170 kB to 200 kB (host enabled) or 220 kB (host disabled).
2026-10-10 13:33:32 +02:00
Ken Van Hoeylandt
def65ef899
CL-32 v0.4 implementation + split v0.2/v0.3 (#683)
- Implement ST7305 driver at `Drivers/st7305-module`
- Rename `cl32` device project to `cl32-v02-v03` and removed v0.4 drivers
- Implement CL-32 v0.4 device as `cl32-v04`: display, keyboard, backlight/frontlight driver and power supply
- Remove `TT_LAUNCHER_APP_ID` (it was always the same setting)
- Remove `TT_LVGL_STATUSBAR_COLORS_INVERTED` (unused since recent changes)
- Wi-Fi only refreshes once, so users can navigate with the keyboard through the results, without constently resetting focus/selection. After initial scan, manual scans can be requested via the toolbar.
- Themes: material and material_mono theme don't show post-selection border animation anymore. It looks weird on monochrome devices and it doesn't add anything on other devices either.
- Made `merge.sh` executable
- backlight driver API change: min/max brightness functions are now optional, defaults to [0, 255]
2026-10-10 00:51:20 +02:00
Ken Van Hoeylandt
0f12fcce53
New themes (#677)
- Implemented themes with LSS: material, material mono
- Implemented grid-based navigation
- Added new Launcher
- Updated Appearance app to add theme configuration
- Updated various apps to improve UX/UI
- Added LVGL widgets: cards, badges, chips, icon buttons
- Added support for round/rounded displays
- Added the concept of insets to LVGL and implemented it in toolbar + statusbar
- Terminal app now hides toolbar by default, but tapping the terminal toggles visibility
- File browsing now opens the configured user-data location by default
- Added missing licenses to subprojects
- Updated README.md screenshots and intro text
2026-10-07 23:00:09 +02:00
Ken Van Hoeylandt
7ea8c346b0
Various improvements (#673)
Graphics & rendering

- Implement `binfont-module` to generate bitmap fonts on the device itself
- Remove lodepng support from LVGL library and create `Modules/lodepng-module` to make the feature re-usable in non-LVGL apps too. Add binding functions for LVGL support.
- Implement large icons for boot screen (Tactility and USB logos)
- Remove unused asset files in `Data/`

Boot

- Split up `Tactility.cpp` and its `run()` function into various `Init*.cpp` files.
- Re-implement `Boot.cpp` app as non-LVGL app
- Boot app now has a `BootSequence.cpp` for the init code.
- LVGL is now started when the Boot app finishes
- Move more init logic into Boot app

BLE

- Don't allocate scan result buffers unless BLE is on
- Allocate scan results in external memory if possible

UX & UI

- USB Settings app: remove border from the button container
2026-10-04 18:09:21 +02:00
Shadowtrance
ffab897fe4
LilyGo T-Embed CC1101 Plus & Led Strip Driver (#670) 2026-10-03 18:58:55 +02:00
Ken Van Hoeylandt
5bac1ada82
stdio, keyboard, compact UI, package manifest, and more (#667) 2026-10-01 18:09:57 +02:00
Ken Van Hoeylandt
e42545d284
Improve compact UI, improve DisplayApi, cleanup (#660) 2026-09-25 20:18:23 +02:00
Ken Van Hoeylandt
79d3dd4fdb
Improvements for apps, filesystems, terminal and shell (#659)
app-module

- Apps now have support for:
  - environment variables (inherit from parent app)
  - current workdir
  - window size (when running in terminal)
- Add type aliases like `AppId` and `PackageId`
- Remove data duplication between ledger and app instance records: create `AppManifestSet`
- `AppManifest` usage safety improved: pass by value where needed, or use `AppId` instead of a manifest.

Terminal and shell

- Moved shell commands into coreutils-module as proper apps.
- Refine stack size for terminal and shell because apps now run with their own task and stack (including in-memory apps)

Platform

- Fix for listing root dir on ESP32: wrap posix directory functions and wire in file systems.
- Moved all platform-specific file system init code to platform subprojects

Other

- Fix for screenshot capture (issue with paths)
- Fixes for coreutils app correctness
- Memory optimizations (use more PSRAM where possible) in various locations such as app-module, shell and terminal.
- `ls` and `help` commands now use terminal width and show columns of data by default
- Created fs helpers at `TactilityKernel/include/tactility/filesystem/fs.h` (partially ported from `ShellFs`)
2026-09-25 08:29:27 +02:00
Ken Van Hoeylandt
86010186d8
Improve Terminal, App List, app starting, and more (#658)
app-module:

- Implement `AppStartContext` to reduce amount of `app_start_` and `app_exec` functions: replace them with `app_start_with_context()`
- Add support for environment variables when starting apps
- Implement support for environment variables for apps

graphics-module:

- Add this new module
- Move font-module code into this module
- Implement pixel_buffer

apps:

- Terminal app: reduce memory usage by only buffering a single row of characters, and try to buffer in IRAM when possible. Implement new pixel_buffer.
- App List: Mark apps as favourite to pin them on top. Use touch or press "x" key.
- App List: Add toolbar button that shows alert dialog with info about using favourites
2026-09-24 00:44:28 +02:00
Ken Van Hoeylandt
4279a8ed72
Terminal and shell support based on BreezyBox (#656)
Features:
- Implemented terminal app based on BreezyBox
- Implemented shell based on BreezyBox
- Added font-module with fixed-width fonts

Improvements:
- Improved application standard-output and error-output routing, including dynamically loaded applications.
- Updated shared icons and Material Symbols mappings.
- Other improvements & fixes
2026-09-22 23:01:03 +02:00
Shadowtrance
bdb50505e7
Improvements and fixes (#655)
USB Audio Class (UAC) output
Audio codec re-binding
Keyboard / Bluetooth HID
HID Consumer Control (media keys)
Symbol exports
Other fixes
IMU-based screen auto-rotate

See PR for details: https://github.com/TactilityProject/Tactility/pull/655
2026-09-22 19:19:53 +02:00
Ken Van Hoeylandt
89f1804184
Async keyboard API and device probing support (#654)
- Implemented async keyboard API. Made it backwards compatible.
- `KeyboardApi::read_key` and `keyboard_read_key()` automatically forward to subscribing pollers.
- Implement `Device::probe` for device hot-plug support.
- Implement probing for Tab5 keyboard
- Updated coding style guide
2026-09-20 17:31:07 +02:00
Ken Van Hoeylandt
65ee223876
CL-32 drivers & more (#652)
- CL-32 features added:
  - Hardware revision detection
  - v0.3 and v0.4 keyboard 
  - v0.4 power supply
  - Inlined epd library (was a module) and made changes to the device definition (don't do full update after 5 small updates)
- Statusbar: add support for inverted colors
- e-paper driver improvements and warning fixes
- Implemented gpio_controller_get_level()
- Keyboard support improvements (unicode for tca drivers)
2026-09-14 00:06:55 +02:00
Shadowtrance
0c08774657
PaperS3: Fix ghosting and speed up partial updates (#651) 2026-09-12 18:47:08 +02:00
Shadowtrance
70af88ca5b
Kernel IMU API (#650) 2026-09-11 15:58:31 +02:00
Ken Van Hoeylandt
643cbc3806
Implement posix app loading (#643)
- Added POSIX desktop support for SDK builds, application packaging, and integration testing.
- Added POSIX filesystem partitions and improved application path handling.
- Added simulator support for loading and running applications dynamically.
- Improved simulator task stack handling and display startup reliability.
- Improved simulator display scaling, resizing, high-DPI support, and pointer accuracy.
- Fixed LVGL timers and input polling on POSIX. (fixes simulator with Linux on some Intel graphics platforms)
- Standardized data paths across platforms.
- Logging now works via separate task: this allows apps to write to log without it affecting their stdout (for apps that output text as relevant date for other apps, like the File Selection app)
- Fixes for app stdio
2026-08-31 22:09:04 +02:00
Ken Van Hoeylandt
64fb1a9f52
display backlight and bluetooth reference counting (#639) 2026-08-29 23:37:31 +02:00
Ken Van Hoeylandt
19b11eb9a8
Remove TactilityC and Firmware subprojects (#638)
- Removed TactilityC, moved its symbols to existing modules and several new ones (pthread-module, c-symbols-module, cpp-symbols-module, posix-symbols-module, freertos-module).
- Removed Firmware subproject and moved main() into Tactility subproject.
- Strengthened application archive, path, version, stack-size, and device validation.
- Moved symbol resolution for elf_loader to app-esp32-module.
- Improved `struct Module` declarations and made module and symbol definitions in modules more consistent.
- Removed old http download code from Tactility subproject.
- Rename app-module's source files for consistency.
- Add missing pthread symbols.
- Kernel module symbols are now resolvable on all platforms.
2026-08-29 21:06:43 +02:00
Ken Van Hoeylandt
d2442bedb4
LoraApi callbacks refactored to events (#632) 2026-08-28 18:56:12 +02:00
Ken Van Hoeylandt
020aa471e2
File locking refactored (#631)
Remove FileMutex and wire locking into driver subsystems.
2026-08-28 01:06:53 +02:00
Ken Van Hoeylandt
92ca046681
app-module events & callstack config, crash diagnostics (#630)
- Apps can specify task stack depth and preferred memory placement in their manifests.
- App identifiers are validated against length and character requirements.
- Crash diagnostics now show the crash cause, reason, fault address, call stack, and program-counter details, with logs saved for review.
- App closing is more consistent across built-in screens. There's now a dedicated function, and the old _emit() function is made private.
- Crash diagnostics no longer display a QR code without a call stack.
- Improved memory allocation for unrestricted requests.
2026-08-27 21:50:12 +02:00
Ken Van Hoeylandt
0ee2415f3b
Bluetooth and Wi-Fi improvements (#622)
- Enable BT by default in DTS, and create separate radio on/of functionality (like recent Wi-Fi changes)
- Bluetooth event handling now uses queued subscriptions, improving event delivery and application responsiveness.
- Improved synchronization of Bluetooth advertising, connections, HID, MIDI, and SPP operations.
- Enhanced cleanup during Bluetooth shutdown and subscription removal.
- Clarified Bluetooth start and stop behavior.
- Improved wifi driver subscription stability to prevent endless loops
2026-08-26 00:30:03 +02:00
Ken Van Hoeylandt
ab75d2022d
Refactored events (#621)
Event handling:

- Added unified event handling for application, system, and Wi‑Fi events.
- Updated all apps to reflect event handling changes

Wi-Fi:

- Refactored event handling from listener interface to task & event group.
- Added direct Wi‑Fi radio controls and improved event subscriptions.
- Wi‑Fi screens now refresh asynchronously and handle unavailable devices more gracefully.
- Enabled Wi‑Fi by default on in dts files, but radio on/off is still done by code. The main reason was reliable event subscription and consistent devicetree states.
- Improved Wi‑Fi shutdown cleanup and radio-state handling.

Other:
- Renamed the Kernel Display app to Display.
2026-08-25 17:44:20 +02:00
Ken Van Hoeylandt
db48dfe812
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.
2026-08-23 17:21:16 +02:00
Ken Van Hoeylandt
0ff1627385
Fixes and improvements (#617) 2026-08-20 17:22:01 +02:00
Ken Van Hoeylandt
b03759a111
Fixes and improvements (#616) 2026-08-18 20:43:07 +02:00
Shadowtrance
cc8be3faef
USB device-mode support (#613) 2026-08-12 21:29:35 +02:00
Ken Van Hoeylandt
37c507544b
Refactor app loading and window management (#609) 2026-08-11 23:40:59 +02:00
Shadowtrance
dc3f6104b8
Papers3 improvements (#611)
- And Tab5 keyboard improvements
- Usb host keyboard improvements
- Symbols
- Requires the device.py change from CL-32 PR but that only affects visuals and not build breaking
2026-08-08 15:02:49 +02:00
Ken Van Hoeylandt
d2c69ee7e8
Move service API from TactilityKernel to service-module (#604)
Extracted the service API from TactilityKernel and put it in a new module at `Modules/service-module`
2026-08-01 20:51:43 +02:00
Crazypedia
f13c18f398
LoRa device type + SX1262 kernel driver (first checkpoint) (#565)
Adds sub-GHz radio support to Tactility as a first-class kernel device type, plus a
driver for the Semtech SX1262. Continues the radio work discussed in #342, brought up to
the current kernel driver model (rather than the deprecated tt::hal layer the earlier
prototype targeted).
2026-07-30 19:32:23 +02:00
Ken Van Hoeylandt
c729e8340f
Trackball rewrite (#600)
- Implement generic trackball settings
- Refactor T-Deck trackball driver into generic driver at `Drivers/gpio-trackball-module`
- Automatically bind/unbind trackball devices with LVGL
- Automatically load settings for trackball devices on boot
2026-07-30 13:38:19 +02:00
Ken Van Hoeylandt
acb2f1d4c7
Replace Tactility SystemEvents with new kernel implementation (#598)
TactilityKernel now has a system event API to replace the one from the Tactility subproject. It also implements several tests for it.
2026-07-29 17:31:20 +02:00
Ken Van Hoeylandt
e6e1dcd0ca
Software keyboard refactored (#594)
Removed software keyboard in Tactility subproject (GuiService, Lvgl.cpp) and re-implemented it in TactilityKernel.
2026-07-28 00:04:09 +02:00
Ken Van Hoeylandt
d1f06cb774
Device cleanup (#592)
- Replaced device_find_\* usage by device_get_\* variants.
- Removed deprecated device_find_\* functions.
- Improved reliability of Bluetooth scanning, pairing, connection, and HID host lifecycle behavior, including peer auto-connect handling.
- Improved Bluetooth/USB status indicators and clarified “Eject failed” alerts with the affected mount path.
2026-07-27 17:29:12 +02:00
Ken Van Hoeylandt
03a6285328
Add kernel memory functions & other memory-related changes (#590)
New Features

- Added policy-based memory allocation APIs with capability flags and optional alignment: `memory_alloc_with_policy`, `memory_realloc_with_policy`, `memory_calloc_with_policy`, and `memory_free`.
- Switched heap memory reporting to `memory_print_stats`.

Bug Fixes

- Improved allocation robustness with capability fallback behavior.
- Added overflow-safe handling for aligned zero-initialized allocations.
- Tightened const-correctness for generated device-tree device arrays.

Tests

- Added unit tests for default policy, alignment, zero-initialization, realloc preservation, freeing, and memory stats reporting.
2026-07-26 22:59:18 +02:00
Ken Van Hoeylandt
f21c0df6fe
Improvements & fixes (#589) 2026-07-26 21:26:52 +02:00
Ken Van Hoeylandt
cd2d9d6158
Fixes and improvements: LVGL, services and kernel symbols (#587) 2026-07-26 13:21:13 +02:00
Ken Van Hoeylandt
db7468d0c8
Module improvements: lvgl, gps, crypt (#585) 2026-07-25 23:04:39 +02:00
Ken Van Hoeylandt
ca5b071859
Fix module logic, updated tests, add tests (#584) 2026-07-25 18:05:19 +02:00
Ken Van Hoeylandt
2a2558b29a
Remove old HAL components and refactored GPS-related code (#583)
- Added generic GPS/GNSS support with device detection, configuration, and persistent settings.
- Improved device and module lifecycle management.
- Added flexible filesystem locking support for displays and storage.
- Improved display-idle and keyboard backlight handling.
- Updated architecture, driver, module, testing, and licensing documentation.
- Removed old HAL device and related code.
2026-07-25 17:20:17 +02:00
Ken Van Hoeylandt
429125734a
Add drivers to module and make start/stop optional (#580) 2026-07-23 23:28:09 +02:00
Ken Van Hoeylandt
8b92aa8e5a
GPIO descriptor fixes (#578) 2026-07-22 22:43:34 +02:00
Shadowtrance
2d768ef3a1
ESP-NOW bridge for P4 (#573) 2026-07-19 09:23:20 +02:00
Ken Van Hoeylandt
d896657bf9
Device migrations, drivers and fixes (#571)
Device migrations:

- cyd-4848S040c
- guition-jc1060p470ciwy
- guition-jc2432w328c
- guition-jc3248w535c (known issue with display and touch, Shadowtrance will look into it)
- guition-jc8048w550c
- heltec-wifi-lora-32-v3
- lilygo-tdeck-max (excluding graphics)
- lilygo-tdisplay
- lilygo-tdisplay-s3
- lilygo-tdongle-s3
- lilygo-tlora-pager

Driver migrations:

- Implemented haptic driver interface in kernel
- AXS15231b
- BQ25896
- BQ27220
- CST328
- CST6xx
- DRV2605
- JD9165
- Custom LilyGO driver for T-Lora Pager
- SSD1306
- ST7701
- ST7735
- SY6970
- TCA8418

Fixes/improvements:

- Boot app: support for multiple power devices, improved UI
- lvgl_devices and related code: fixes for mapping
- Support for arrays in dts parser
2026-07-18 15:01:42 +02:00
Ken Van Hoeylandt
3b5a401594
Device migrations, new drivers, cleanup (#567)
* **New Features**
  * Added native display support for ST7796, ILI9341, and ST7789 panels across supported boards.
  * Added FT5x06 and FT6x36 touchscreen support.
  * Generic PWM driver
  * ESP32 PWM driver
  * Generic RGB LED driver
  * RGB PWM LED driver
  * RGB GPIO LED driver
  * Implementation of RGB LED for various boards

* **Improvements**
  * Updated board hardware descriptions to use explicit display/touch/backlight device-tree bindings and disabled deprecated HAL usage.
  * Improved display and touch-driver cleanup to prevent stale resources and improve shutdown reliability.
  * Pinned esp-hosted library to a fixed version
 
* **Deletions**
  * Obsolete placeholder display
  * Legacy ILI9488 support.
  * ESP32-specific LEDC PWM implementation
2026-07-16 22:47:26 +02:00
Ken Van Hoeylandt
6fb2bb736c
Drivers, device migrations and other improvements (#566)
- RGB display driver added
- display_driver API:
  - Added software-based display rotation for screens without hardware rotation support.
  - Improved display capability detection across supported display drivers.
- lvgl_display driver:
  - Improved framebuffer handling for smoother, more reliable display updates.
  - Display gap and rotation behavior now adapts more accurately to hardware capabilities.
- Migration Crowpanel 5" basic & advance to kernel drivers
- Improve KernelDisplay app: brightness controls are hidden for displays that only support on/off operation
- device.py now allows for (non-ambiguous) partial device IDs
- TactilityKernel: Implement more tests
2026-07-15 22:56:21 +02:00
Ken Van Hoeylandt
8af6204ba1
New kernel drivers and device migrations (#563) 2026-07-14 20:26:57 +02:00
Shadowtrance
955416dac8
Audio System + Drivers (#562) 2026-07-14 08:34:29 +02:00
Ken Van Hoeylandt
fa4a6e255c
New kernel drivers and device implementation updates (#561)
- Added modular device support and devicetree bindings for ILI9341, ILI9488, CST816S, XPT2046, and GPIO button input, updating several board configurations for display/touch/backlight/keyboard/battery.
- Added a setting to control deprecated HAL usage (device property + Kconfig).
2026-07-12 23:54:55 +02:00