66 Commits

Author SHA1 Message Date
Ken Van Hoeylandt
1ae6e77083 Fixes and improvements 2026-08-08 16:44:58 +02:00
Ken Van Hoeylandt
c628668e75 Update 2026-08-08 14:13:00 +02:00
Ken Van Hoeylandt
8e7f997597 Rename system_event api functions and add subscribe mechanism 2026-08-04 18:48:23 +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
Shadowtrance
85fe1a319a
Tab5 ST7121 variant + fixes (#605)
Added the newest variant to the tab5, St7121.
Fixed variant detection reliability
Fixed tab5 camera WHO_AM_I failing sometimes
Fixed tab5 keyboard live rotation on boot and after stopping/starting lvgl
2026-08-01 20:50:55 +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
bd108cc3c4
Improvements and fixes (#595)
- Fix BluetoothSettings app not updating when toggling on Bluetooth on
- Fix BluetoothSettings app crash when closing while scanning
- Fix BluetoothSettings app crash when turning BT off while scanning
- WebServer doesn't save config anymore as a side-effect of reading the config
- Add missing license headers
- Use TactilityKernel's time and delay functions instead of TactilityFreeRtos ones
2026-07-28 18:38:23 +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
f9453d8956
Migrate devices, create drivers, other improvements & fixes (#574)
Migrated devices to kernel drivers:

- guition-jc3248w535c
- m5stack-core2
- m5stack-cores3
- m5stack-papers3

New drivers:

- axp192-module
- axp2101-module

Fixes:

- Fix SD card LDO for P4 devices
- Updated PowerOff app to work with kernel displays
- Fix for `lvgl_try_lock()` timing
- Fix for touch events with slow updating displays

Improvements:

- `GuiService` now keeps trying to lock to prevent silent failures caused by drivers.
- `GuiService` now uses lvgl-module calls for locking/unlocking
- display driver now has capability `DISPLAY_CAPABILITY_SLOW_REFRESH`
2026-07-19 00:39:26 +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
Ken Van Hoeylandt
50c0a14a93
New kernel drivers and more (#560)
- Added kernel base drivers for: display, pointer (touch, mouse, etc.), keyboard, adc, power supply and backlight
- Implement new kernel driver modules: `st7789-module` and `gt911-module`
- Implement ESP32 ADC "oneshot" kernel driver
- Implement ESP32  backlight kernel driver with ledc API
- Implemented `battery-sense` driver that allows for voltage measurement and creates a power supply child device
- Updated github actions
- Updated flash scripts
- Fix for esp32 legacy driver conflict with ADC
- Created separate `lilygo-tdeck` and `lilygo-tdeck-plus` devices
- Created `lilygo-module` with LilyGO kernel drivers
- Fix for intermittent errors in build related to code generation of `devicetree.c`
- `lvgl-module` can now map kernel drivers onto LVGL devices
- Created `KernelDisplayApp` as a mirror of `HalDisplayApp` (formerly `DisplayApp`)
- Removed `struct` and `enum` prefix in a lot of kernel driver cpp source files
- `lilygo-tdeck` and `lilygo-tdeck-plus` are now fully relying on kernel drivers and don't use any of the old HAL
2026-07-12 00:29:12 +02:00
Ken Van Hoeylandt
c4406b24ba
Fixes and improvements (#559)
- **Fixes**
  - Added missing Wi-Fi hardware configuration support for P4 devices.
  - Fixed build warning
  - Fixed build wrt Tab5

- **Changes**
  - M5Stack StickS3: Switched default storage location from SD to Internal
  - M5Stack StickS3: Removed DIY SD card support over SPI
  - M5Stack StickC Plus2: Removed the automatic startup of the web server
2026-07-10 18:19:11 +02:00
Shadowtrance
7a7f09be35
Tab5 camera + other stuff (#558)
* Tab5 camera + other stuff

Tab5 camera driver - SC2356
Custom SliderBox widget - slider with plus and minus buttons + value label and snapping
Rtc Time service + rtc api
Sdk release - only include drivers built for that specific target, eg: sc2356 driver is mipi / p4 only.
No more hardcoded manual sdk cmakelists
New function to find device by compatible string match. no more static cast bool wildness when trying to match a single device (like M5Stack PaperS3 for example)

* feedback + fixes

Fixed external app user data path.
fix(gui): block app teardown until onHide() completes, preventing ELF unload racing a still-running app
added camera device type and api

* drain the snake sssem

---------

Co-authored-by: Ken Van Hoeylandt <git@kenvanhoeylandt.net>
2026-07-10 08:45:03 +02:00
Ken Van Hoeylandt
1c2806bddf
Added WiFi kernel drivers and refactored Wifi service (#557)
+ other improvements
2026-07-09 21:03:38 +02:00
Ken Van Hoeylandt
dbb96a891c
Generate device matrix and add missing symbol (#556) 2026-07-08 08:58:45 +02:00
Ken Van Hoeylandt
f4f91f81d6
Service logic moved to kernel (#554)
+ fix BT service file paths
2026-07-07 22:52:19 +02:00
Ken Van Hoeylandt
ecad2248d9
Various improvements (#547)
- Fixed crash when returning to Setup app (from any of the steps)
- Fixed crash when returning to TimeDateSettings app (after locale selection)
- Fixed GuiService inconsistent behaviour: now always perform operations async (e.g. to show/hide apps). This fixes crashes in some onHide() calls where onHide() might be called before onShow() was called.
- Fix for incorrect WebServService path
- Remove CYD-4848S040C SD card functionality, but added a GPIO fix for releasing 3-wire SPI pin sharing.
- Fix for saving/loading settings for various apps
2026-07-04 21:26:43 +02:00
Ken Van Hoeylandt
d3439f6f45
Fixes & memory optimizations (#540)
- Disable BlueTooth driver by default, to ensure it doesn't allocate memory
- Update BlueTooth settings app behaviour to make sure it starts/stops the devices
- Disable SPI RAM usage for ST7789 as it broke App Hub
- Reduce T-Display and T-Deck display buffers from 1/3rd to 1/10th of resolution
- Enabled dynamic buffers for MbedTLS to optimize memory
- TLS 1.3 did not work with dynamic buffers: downgrade to 1.2 for now
- WiFi is now enabled from the Boot app callback to the WiFi service, instead of the WiFi service start() function. This avoids a lockup when WiFi is started by the service while the Boot app is updating the WiFi settings.
2026-07-01 21:11:46 +02:00
Ken Van Hoeylandt
599fa46766
Driver improvements (#535)
- New drivers:
  - SD SPI
  - spi_peripheral
  - touch_placeholder
  - display_placeholder
- Devicetree compiler:
  - Implement phandle-arrays
  - Implement device addresses
- Add placeholder drivers to all devices with a SPI display
- SPI driver: add `cs-pins` and set them to high on driver start
- FileSystem: add `file_system_set_owner()` and `file_system_get_owner()`
- File locking is now checking if the related `FileSystem` is part of a shared SPI bus
- Add `device_get_child_count()`
- SDMMC driver: Remove default of `slot` value
- Fix for Crowpanel Basic 3.5" display (add delay to booting)
- Fix for LilyGO T-HMI SD card mounting (delayed mounting by disabling it initially in the dts)
2026-06-27 17:32:05 +02:00
Shadowtrance
594b8bd27e
Smart tab5keyboard (#533) 2026-06-19 22:14:07 +02:00
Ken Van Hoeylandt
a35c88c8fd
Grove driver, I2C migrations, bugfixes and docs (#532) 2026-06-19 00:52:31 +02:00
Ken Van Hoeylandt
8dabda2b5b
Implement new I2C driver (#531) 2026-06-12 18:46:22 +02:00
Shadowtrance
3dcc95f6f3
USB host support (#527) 2026-06-03 23:10:37 +02:00
Shadowtrance
a59fbf4ed5
Tab5 features, StackChan, fixes, drivers.... (#526) 2026-05-28 23:31:25 +02:00
Shadowtrance
5c78d55b04
Bluetooth (#518)
* Bluetooth LE addition

* fixes

* use the psram!

helps a little on S3 (t-deck)

* custom device name

* Update symbols.c

* Feedback + fixes

Fixes external app start/stop server (child devices)
Fixes BtManage causing a full system hang upon disabling bt when a device is connected to the host.

* updoot

* more updoot

* move back!

* Revert "move back!"

This reverts commit d3694365c634acc5db62ac59771c496cb971a727.

* fix some of the things

* Addressing feedback? hmm

* Fixes

Bug 1 — Reconnect loop / Reconnect not working fixed
Bug 2 — Name-only advertising overwrites HID advertising
Bug 3 — BleHidDeviceCtx leak on re-enable
Enhancement — HID device auto-start on radio re-enable

* stuff...

* update for consistency with others

* fix crashes

and some bonus symbols

* a few symbols, i2c speed, cdn message

100kHz i2c speed seems to be more compatible with m5stack modules...and probably in general.
cdn message no longer applies

* Hide BT Settings when bt not enabled

* Addressing things and device fixes

* Missed one!

* stuff
2026-05-22 22:49:37 +02:00
Shadowtrance
e64f4ff16b
M5Stack StickS3 - New Tab5 - driver modules (#516)
Font size set to 18 for 800x480 displays
Fix web server dashboard not rendering when sdcard isn't present

Added new driver modules
-  BM8563 RTC
- RX8130CE RTC
- MPU6886 IMU
- QMI8658 IMU
- M5PM1 Power Management Chip

Applied the above modules to applicable devicetrees.

Added new device: M5Stack StickS3

Added new M5Stack Tab5 St7123 variant.

ButtonControl changed to use interupts and xQueue, added AppClose action.

And some bonus symbols of course, the apps are hungry for symbols.
2026-03-20 10:07:57 +01:00
Ken Van Hoeylandt
aa7530e515
New kernel drivers, filesystem API, and more (#513)
* **New Features**
  * BMI270 6-axis IMU driver added; new unified filesystem abstraction for mounted filesystems.
  * Public Wi‑Fi API surface (no implementation yet)
  * SDMMC driver added (kernel drive$)
  * expanded GPIO interrupt/callback support
* **Improvements**
  * M5Stack Tab5: revamped GPIO/power initialization and IMU integration.
  * LVGL updates including device fontSize configuration.
  * Updated all code related to SD card device/fs handling
  * Rename LilyGO T-HMI S3 to LilyGO T-HMI
* **Bug Fixes**
  * Simplified and consolidated SD card handling and mount discovery.
2026-03-07 16:13:39 +01:00
Ken Van Hoeylandt
d2048e01b6
Tab5 power expander driver and devicetree parsing improvements (#507)
* **New Features**
  * PI4IOE5V6408 I2C I/O expander driver with public GPIO APIs
  * CLI tool to list devicetree dependencies

* **Device Tree Updates**
  * M5Stack Tab5 configured with two I2C IO expanders; PI4IOE5V6408 binding added

* **Build / Tooling**
  * Devicetree code generation integrated into build; generated artifacts and dynamic dependency resolution exposed

* **Refactor**
  * Kernel/run APIs updated to accept a null‑terminated devicetree modules array; many module symbols renamed

* **Documentation**
  * Added README and Apache‑2.0 license for new driver module
2026-02-17 22:59:30 +01:00
Ken Van Hoeylandt
d860ba1f34
Tab5 audio, I2C improvements, UiDensity moved to lvgl-module and cleanup (#506)
- UiDensity moved to lvgl-module
- Deleted tt_hal and tt_hal_gpio (breaks apps, but will fix those right after merging)
- Added I2C 8 bit register operations
- Added device.properties to simulator
- Improved Tab5 hardware init, implement audio
- Add README.md to kernel
2026-02-15 19:45:12 +01:00
Ken Van Hoeylandt
9a11e6f47b
Implement UI scaling and more (#501)
**New Features**
 * Runtime font accessors and new symbol fonts for text, launcher, statusbar, and shared icons.
 * Added font height base setting to device.properties
 * Text fonts now have 3 sizes: small, default, large

**Improvements**
 * Renamed `UiScale` to `UiDensity`
 * Statusbar, toolbar and many UI components now compute heights and spacing from fonts/density.
 * SSD1306 initialization sequence refined for more stable startup.
 * Multiple image assets replaced by symbol-font rendering.
 * Many layout improvements related to density, font scaling and icon scaling
 * Updated folder name capitalization for newer style
2026-02-15 01:41:47 +01:00
Ken Van Hoeylandt
26c17986c6
GPIO refactored (#495)
* **Refactor**
  * GPIO subsystem moved to a descriptor-based model for per-pin ownership and runtime pin management; many platform drivers now acquire/release descriptors.
  * Device trees and drivers now use GPIO phandle-style pin specifications across all boards and all drivers.

* **Behavior**
  * Device list now encodes per-device status (ok/disabled); boot will skip disabled devices accordingly.

* **Deprecation**
  * Legacy GPIO HAL marked deprecated and replaced with descriptor-based interfaces.

* **Chores**
  * Bindings and platform configs updated to the new GPIO pin-spec format.
2026-02-11 20:34:54 +01:00
Ken Van Hoeylandt
25c3f19e5d
Merge develop into main (#494)
* Updated runtime gating to enable LilyGO T-Deck specific apps and services
  * New device compatibility and model-detection APIs
  * Added a buffer-overflow error code and message
  * Updated GitHub Actions checkout to v4
  * Adjusted an LVGL-related library version
  * Device config now emits a T-Deck workaround flag when applicable
  * Removed internal developer comments and minor cleanups
2026-02-09 22:12:03 +01:00
Ken Van Hoeylandt
d27404964a
SPI device migration (#490)
- Implement SPI devices in dts files for all devices
- Removed `tt::hal::spi` HAL and its configurations
- Fix for devicetree generator "boolean" support
- Remove unused custom locks in all `DisplayDevice` implementations
- Fixed some bugs with devices
- Updated XPT2046 driver
- Fix for `WifiEsp` deadlock
- Export a lot of new `math.h` symbols with `tt_init.cpp`
- Created `SpiDeviceLock` in `TactilityCore` as a wrapper for kernel SPI locking
- Improved `TactilityKernel` SPI driver.
2026-02-08 22:14:18 +01:00