43 Commits

Author SHA1 Message Date
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
3a24d058c9
Rename icons, fix T-Lora Pager config and more (#502)
* **New Features**
  * Added NFC chip-select to SD card hardware configuration.

* **Refactor**
  * Consolidated and renamed icon resources; apps and status-bar now reference unified icon headers and new icon constants.
  * Renamed LVGL lock API (timed → lvgl_try_lock) and updated callers.

* **Documentation**
  * Updated module README and license files; added Apache-2.0 license document.
2026-02-15 13:32:52 +01:00
Shadowtrance
72b55b221e
Update device.properties to fix Waveshare GEEK PSRAM issue (#504) 2026-02-15 12:39:15 +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
Shadowtrance
4ab29ae466
Guition 535 and 550 i2s config (#500) 2026-02-13 20:11:51 +01:00
Ken Van Hoeylandt
8ff990d635
Boot apps refactored (#498)
- Specify launcher via menuconfig
- Specify auto-start app via menuconfig
- Implement more rigid boot.properties fallbacks
- Devices with tiny screen now auto-start ApWebServer
- ApWebServer UI fixes
2026-02-12 00:10:04 +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
93efadd5e3
Devicetree DTS and YAML format improvements (#492)
* **DevicetreeCompiler**
  * Binding properties now support default values.
  * Compiler returns meaningful exit codes and reports errors more clearly.
  * Stronger validation of device configurations with unified error handling.
  * Added integration tests and a dedicated Devicetree test workflow.

* **Changes**
  * Platform binding schemas updated: some fields made required, others gained explicit defaults.
  * Many device-tree files simplified by removing unused/placeholder pin and transfer-size entries.

* **Documentation**
  * Removed several outdated TODO items.
2026-02-09 17:38:06 +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
Ken Van Hoeylandt
74127a5f6c
Add kernel drivers for SPI and UART and make locking APIs more consistent (#489)
- Add kernel support for SPI driver
- Add kernel support for UART driver
- Implemented ESP32 UART kernel driver
- Update existing UART-related code in Tactility to use new kernel driver
- Remove UART from tt::hal::Configuration
- Remove tt_hal_uart functionality but keep functions for now
- Update devicetrees for UART changes
- Kernel mutex and recursive mutex: improved locking API design
- Other kernel improvements
- Added device_exists_of_type() and device_find_by_name()
2026-02-07 21:28:11 +01:00
Ken Van Hoeylandt
79e43b093a
Kernel improvements (#485)
* **New Features**
  * Added public accessors for querying module/device start and ready state.

* **Refactor**
  * Internal state moved to opaque internal objects; module/device/driver initializers now explicitly initialize internal pointers.
  * Lifecycle handling updated to construct/destruct internal state and use accessors.

* **Tests**
  * Tests updated to use public accessors and explicit construct/destruct lifecycle calls.

* **Chores**
  * Test build/include paths and small metadata updated.
2026-02-06 16:32:30 +01:00
Ken Van Hoeylandt
1757af859c
Update LVGL, esp_lvgl_port and esp_lcd_touch (#484)
- LVGL: 9.3.0 -> 9.4.0
- esp_lvgl_port:  2.5.0 -> 2.7.0
- eps_lcd_touch: 1.1.2 -> 1.2.1
2026-02-06 00:35:41 +01:00
Ken Van Hoeylandt
626d0d9776
Devicetree DTS alias support (#483)
* **New Features**
  * Phandle support for device-to-device property references.
  * Recognition of #define-style declarations in device trees.
  * Device nodes may include optional aliases alongside node names.

* **Improvements**
  * Flatter, consistent device hierarchy processing for generation.
  * Error and log messages now reference node names for clearer diagnostics.

* **Other**
  * Added a static ESP32-based device tree and minor DTS comment updates.
2026-02-05 23:10:11 +01:00
Ken Van Hoeylandt
4fe4faf422
Devicetree updates (#481)
* **New Features**
  * Added I2S audio support (i2s0) for LilyGO TLora Pager, M5Stack Cardputer (standard & Adv), M5Stack Core2, M5Stack CoreS3, and Guition JC1060P; moved i2s0 entry in LilyGO TDeck.

* **Chores**
  * Device-tree grammar now separately recognizes and ignores line (//) and block (/* */) comments.
  * Added reference docs to severa DTS files

* **Documentation**
  * Reworked ideas/roadmap
2026-02-05 19:31:47 +01:00
Ken Van Hoeylandt
a1c835e073
I2S driver implementation (#480)
* **New Features**
  * ESP32 I2S controller support: runtime-configurable digital audio I/O with read/write/set/get operations and multiple formats.

* **Board Support**
  * LilyGO T-Deck device tree entry added to enable I2S peripheral pin configuration.

* **Documentation**
  * New/updated bindings and descriptors for I2S, I2C, GPIO, and root nodes.

* **Other**
  * Added GPIO "no pin" sentinel and exposed I2S controller API symbols.
2026-02-04 23:40:16 +01:00
Ken Van Hoeylandt
9cc96fd32b
M5Stack PaperS3 implementation (#478)
Selectively imported code from @juicecultus [fork](https://github.com/juicecultus/Tactility) with some changes/additions from me.
2026-02-03 21:22:40 +01:00
Ken Van Hoeylandt
1f9e7f82fd
Implement support for module symbols (#475)
* **New Features**
  - Adds module symbol support and per-module symbol tables, including LVGL symbol exports moved into a dedicated table.
* **API**
  - Adds symbol-resolution APIs and an accessor to enable dynamic lookup between modules.
* **Bug Fixes / Chores**
  - Explicitly initializes module symbol pointers across device and platform modules to avoid uninitialized state.
* **Tests**
  - Updates tests to account for symbol pointer initialization.
2026-02-02 07:50:43 +01:00
Ken Van Hoeylandt
9f721e6655
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.
2026-02-01 22:57:45 +01:00
Ken Van Hoeylandt
3fe1dc0312
Create hal-device module, fix GPIO, fix tests, fix TactilityC (#471)
* **New Features**
  * Added a HAL device module providing device enumeration, type queries and a HAL↔kernel bridge.

* **Improvements**
  * Integrated HAL module into startup; standardized module names, includes and lifecycle logging; safer file append behavior; broader build support.

* **API Changes**
  * Driver lifecycle now uses explicit add/remove semantics; C and HAL device type/lookup APIs clarified.

* **Chores**
  * Added module README and Apache‑2.0 license; updated build configuration to include the new module.

* **Fixes**
  * Updated tests and object file handling to behave correctly.
2026-02-01 01:05:16 +01:00
Ken Van Hoeylandt
5993ceb232
Rename device modules (#470)
Standardised device module identifiers across all supported devices to use consistent naming conventions with lowercase alphanumeric and hyphen-separated formats.
2026-01-31 13:11:36 +01:00
Ken Van Hoeylandt
c9185740d7
Kernel improvements (#468)
* **New Features**
  * Plugin-style modules for platforms and devices with start/stop lifecycle and a runtime-consumable device tree array.

* **Refactor**
  * Consolidated initialization into a kernel/module startup flow.
  * Generated devicetree artifacts moved to the build Generated directory.

* **Changes**
  * Removed legacy no-op registration hooks and I2C lock/unlock wrappers.
  * Driver ownership and private state moved to explicit module/owner model.
  * Added ERROR_NOT_ALLOWED error code.
2026-01-31 09:18:02 +01:00
Shadowtrance
d62314f41f
Guition JC3248W535C (#467)
* Guition JC3248W535C

Files app fix
alert dialog and selection dialog fixes
symbol export

* Update Axs15231bDisplay.cpp

* Update Axs15231bDisplay.cpp
2026-01-31 00:01:12 +01:00
Ken Van Hoeylandt
87ca888bb4
Create DTS files for all devices and implement I2C changes (#466)
Devictree changes:
- Create DTS files for all remaining devices
- Update corresponding `devicetree.yaml`
- Remove `i2c` configuration from corresponding `tt::hal::Configuration`

Apps & HAL:
- Removed I2C Settings (we'll make a new one later after I rework that part of the HAL)
- Delete TactilityC GPIO and I2C functionality
- Delete Related SystemEvent types
- Refactor `tt::hal::i2c` to only use `struct Device*` wrapping

Scripting:
- Fix DevicetreeCompiler boolean parsing
- Create `build-all.py`
2026-01-29 22:01:19 +01:00
Ken Van Hoeylandt
71f8369377
TactilityKernel improvements (#464)
* **New Features**
  * Thread API with lifecycle, priority, affinity and state monitoring
  * Timer subsystem: one-shot/periodic timers, reset, pending callbacks, expiry queries
  * Expanded I²C: register-level ops, bulk writes, presence checks, ESP32 integration and new config properties
  * GPIO controller: pin level and options APIs
  * Error utilities: new error code, error-to-string, timeout helper and common macros
  * Device construction helpers (construct+start)

* **Tests**
  * New unit tests for thread and timer behavior

* **Documentation**
  * Expanded coding style guide (files/folders, C conventions)
2026-01-28 23:58:11 +01:00
Ken Van Hoeylandt
d551e467b8
Moved and renamed files for consistent C code style (#463)
* **Documentation**
  * Added new C coding style guide detailing naming conventions for files, directories, macros, constants, variables, functions, and type definitions with illustrative examples.
  * Updated C++ coding style documentation with clarifications on C naming conventions and header directory organization patterns.

* **Refactor**
  * Updated header include paths throughout the codebase to use lowercase naming conventions consistently.
2026-01-27 20:17:33 +01:00
Shadowtrance
c05d46a28c
Screensavers (#462)
Adds screensavers in addition to the backlight idle off. 
More info in screensavers.md

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

* **New Features**
  * Added a screensaver system with multiple styles (Bouncing Balls, Mystify, Matrix Rain) and a common screensaver interface; auto-starts after inactivity, dismisses on interaction, and supports auto-off/backlight behavior.
  * New Display setting and UI dropdown to choose and persist the screensaver.

* **Documentation**
  * Added comprehensive screensaver docs covering usage, extension, and configuration.

* **Chores**
  * Registered the display-idle service.

* **Bug Fixes**
  * Updated LVGL API calls to match renamed functions.

<sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-01-27 17:21:16 +01:00
Ken Van Hoeylandt
e6abd496f9
Various improvements (#461)
* **New Features**
  * Time and delay utilities added (ticks, ms, µs); SD card now uses an expansion-header CS pin; HTTP downloads warn when run on the GUI task and yield to avoid blocking.

* **Bug Fixes / Reliability**
  * Many hard-crash paths converted to guarded checks to reduce abrupt termination and improve stability.

* **Tests**
  * Unit tests added to validate time and delay accuracy.

* **Chores**
  * License header and build/macro updates.
2026-01-27 08:04:21 +01:00
Ken Van Hoeylandt
619b5aa53b
M5Stack Tab5 support (#449)
* **New Features**
  * Added support for M5Stack Tab5: integrated display (ILI9881C MIPI-DSI), touch, and SD card.

* **User Interface**
  * Changed toolbar label from "External Apps" to "Installed Apps."

* **Improvements**
  * Clarified boot log messages ("Init boot"/"Init boot failed") for better diagnostics.
  * Firmware build matrix and configuration updated to include the M5Stack Tab5 target.
2026-01-27 00:18:53 +01:00
Ken Van Hoeylandt
dfe2c865d1
TactilityKernel improvements and more (#459) 2026-01-25 23:54:33 +01:00
Ken Van Hoeylandt
4b6ed871a9
Implemented TactilityKernel and DevicetreeCompiler, updated licenses & copyrights (#452)
**New features**

- Created a devicetree DTS and YAML parser in Python
- Created new modules:
  - TactilityKernel (LGPL v3.0 license)
  - Platforms/PlatformEsp32 (LGPL v3.0 license) 
  - Platforms/PlatformPosix (LGPL v3.0 license)
  - Tests/TactilityKernelTests

Most boards have a placeholder DTS file, while T-Lora Pager has a few devices attached.

**Licenses**

Clarified licenses and copyrights better.

- Add explanation about the intent behind them.
- Added explanation about licenses for past and future subprojects
- Added more details explanations with regards to the logo usage
- Copied licenses to subprojects to make it more explicit
2026-01-24 15:47:11 +01:00
Shadowtrance
b8214fd378
Trackball Pointer Mode & driver rewrite (#453) 2026-01-23 17:30:13 +01:00
Ken Van Hoeylandt
c98cb2bf10
Add Guition JC1060P470CIWY and update other Guition device IDs (#447)
This commit contains @josemalm32 's  implementation for the Guition JC1060P470CIWY  (see https://github.com/ByteWelder/Tactility/issues/427)

I've added these changes:
- Updated the branch for the new logging method
- Updated the branch for the PR that I mentioned in the above linked issue
- Replaced the manually pasted in esp_lcd_jd9165 driver with the one from the component registry
- Updated Spanish to English
- Updated all drivers' mutexes/locks
- Fixed the display color format
- Fixed bug in power deinit
- Renamed I2C bus in config
- Added device to continuous integration
- Renamed several Guition devices from CYD to Guition
- Fix for `EspLcdDisplayV2` init for when features are not supported
- Pin esp_wifi_remote to version 1.2.3
- Fix in `WifiManage` logging
- Fix for `WifiEsp.cpp`'s check for wifi presence
- Fix for `WifiEsp`'s scan list logging
- Fix for `gcc_soft_float_symbols` in TactiltyC
2026-01-07 22:41:45 +01:00
Ken Van Hoeylandt
f620255c41
New logging and more (#446)
- `TT_LOG_*` macros are replaced by `Logger` via `#include<Tactility/Logger.h>`
- Changed default timezone to Europe/Amsterdam
- Fix for logic bug in unPhone hardware
- Fix for init/deinit in DRV2605 driver
- Other fixes
- Removed optimization that broke unPhone (disabled the moving of heap-related functions to flash)
2026-01-06 22:35:39 +01:00
Ken Van Hoeylandt
719f7bcece
Fixes and improvements (#445)
- Remove unnecessary CS work-around for Cardputers
- Don't compile WifiMock when not necessary
- Fix for running apps on devices without SPIRAM
- Disable backlight dimming by default
2026-01-04 14:27:10 +01:00
Ken Van Hoeylandt
7283920def
Create TactilityFreertos subproject (#440) 2026-01-03 00:19:40 +01:00
Shadowtrance
a4dc633063
Feature additions (#434)
Lots of things "ported" over from the "enhanced" fork. With some adjustments here and there.

KeyboardBacklight driver (for T-Deck only currently)
Trackball driver (for T-Deck only currently)
Keyboard backlight sleep/wake (for T-Deck only currently...also requires keyboard firmware update)
Display sleep/wake
Files - create file/folder
Keyboard settings (for T-Deck only currently)
Time & Date settings tweaks
Locale settings tweaks
Systeminfo additions
Espnow wifi coexist

initI2cDevices - moved to T-deck init.cpp / initBoot
KeyboardInitService - removed,  moved to T-deck init.cpp / initBoot
Adjusted TIMER_UPDATE_INTERVAL to 2 seconds.
Added lock to ActionCreateFolder

Maybe missed some things in the list.

Display wake could do with some kind of block on wake first touch to prevent UI elements being hit when waking device with touch. Same with encoder/trackball/keyboard press i guess.

The original code was written by @cscott0108 at https://github.com/cscott0108/tactility-enhanced-t-deck
2026-01-02 12:14:55 +01:00
Shadowtrance
feaeb11e49
Added TactilityC symbols and DPI updates(#438)
+ btt-panda-touch size correction and dpi update
+ wt32-sc01-plus dpi update
2025-12-29 18:16:08 +01:00
Ken Van Hoeylandt
3fc2ff8bc6
Split off RecursiveMutex from Mutex (#437)
* Split off RecursiveMutex from Mutex

* Fix

* Code quality
2025-12-28 12:30:54 +01:00
Ken Van Hoeylandt
76686e5c90
Fix for sdkconfig generation with device.py (#426) 2025-12-06 15:22:53 +01:00
Shadowtrance
62124541e9
WT32 SC01 Plus (#416) 2025-11-28 17:40:24 +01:00
Ken Van Hoeylandt
b565d56029
Implement support for ESP32 C6 and P4 SOCs (#421)
- Implement generic ESP32 devices
- Updated GitHub Actions to first build the SDKs. These are now based on the generic device implementations and the build act as a filter before compiling the dozens of other devices. It should save on resources when boards fail to compile.
- Adapted code to C6 and P4 differences, heavily borrowed from from https://github.com/ByteWelder/Tactility/pull/394 written by @marciogranzotto, with some changes of my own
- Updated `device.py` to make the `[display]` section optional
2025-11-24 19:28:07 +01:00
Ken Van Hoeylandt
c1ff024657
Rename Boards/ to Devices/ (#414) 2025-11-13 23:50:43 +01:00