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.
This commit is contained in:
committed by
GitHub
parent
29e80cfd65
commit
2a2558b29a
+14
-24
@@ -64,11 +64,7 @@ Tests use Doctest and run on simulator (POSIX) target only:
|
||||
```bash
|
||||
cmake -B buildsim -G Ninja
|
||||
ninja -C buildsim build-tests
|
||||
cd buildsim && ctest # run all tests
|
||||
./buildsim/Tests/TactilityKernel/TactilityKernelTests
|
||||
./buildsim/Tests/Tactility/TactilityTests
|
||||
./buildsim/Tests/TactilityFreeRtos/TactilityFreeRtosTests
|
||||
./buildsim/Tests/crypt-module/CryptModuleTests
|
||||
cd buildsim && ctest --test-dir Tests
|
||||
```
|
||||
|
||||
## Architecture
|
||||
@@ -77,7 +73,7 @@ cd buildsim && ctest # run all tests
|
||||
|
||||
- **TactilityKernel** — C API kernel: device/driver/module lifecycle, concurrency primitives (thread, mutex, timer, dispatcher), filesystem, logging. Header convention: `<tactility/*.h>` (lowercase snake_case).
|
||||
- **TactilityFreeRtos** — Thin C++ wrappers around FreeRTOS primitives.
|
||||
- **Tactility** — Main OS layer: app framework, service framework, HAL (deprecated, replaced by TactilityKernel), LVGL integration, networking and services (Wi-Fi, BLE, NTP, ESP-NOW), settings, i18n.
|
||||
- **Tactility** — Main OS layer: app framework, service framework, LVGL integration, networking and services (Wi-Fi, BLE, NTP, ESP-NOW), settings, i18n.
|
||||
- **TactilityC** — C bindings (`tt_*.h`) for Tactility, used by side-loaded ELF apps on ESP32. Deprecated, replaced by TactilityKernel.
|
||||
- **Firmware** — Entry point (`app_main`).
|
||||
|
||||
@@ -100,34 +96,28 @@ Apps implement `tt::app::App` (or just provide callbacks). Each app has an `AppM
|
||||
|
||||
Services implement `tt::service::Service` with a `ServiceManifest`. Services are long-running background processes (GUI, Wi-Fi, loader, statusbar, GPS, etc.).
|
||||
|
||||
### HAL Layer
|
||||
|
||||
#### Deprecated HAL
|
||||
|
||||
Located in Tactility folder.
|
||||
|
||||
`tt::hal::Configuration` is declared per-device board (in `Devices/<id>/Source/Configuration.cpp`). It provides `initBoot` for early hardware setup and `createDevices` to instantiate HAL device wrappers (display, touch, power, keyboard, etc.).
|
||||
|
||||
#### Current HAL
|
||||
|
||||
Located in TactilityKernel. Based on Linux driver subsystems.
|
||||
### Hardware Abstraction Layer
|
||||
|
||||
#### Driver
|
||||
|
||||
A driver generally consists of:
|
||||
- Registration of driver in parent module (optional)
|
||||
- Registration of driver in parent module (optional, but desirable)
|
||||
- YAML bindings in the `bindings/` folder
|
||||
- An `#include` that is used in the `.dts` file. The include is in `[projectname]/bindings/[drivername].h`
|
||||
- The driver implementation: a `.cpp` and `.h` file. The implementation is C++, but the header exposes pure C functions.
|
||||
- The driver implementation: a `.cpp` and `.h` file. The implementation is C++, but the header exposes pure C functions. C implementations are allowed, but C++ is preferred.
|
||||
|
||||
Drivers can be stored in:
|
||||
Drivers are part of a kernel module.
|
||||
|
||||
Modules with drivers can be stored in:
|
||||
- TactilityKernel
|
||||
- A subproject in Platforms/ folder
|
||||
- A subproject in Devices/ folder
|
||||
- A subproject in Drivers/ folder. This is a kernel module. Naming is lower case and postfixed with `-module`
|
||||
- A subproject in `Platforms` folder
|
||||
- A subproject in `Devices` folder
|
||||
- A subproject in `Drivers` folder
|
||||
|
||||
#### Kernel Modules
|
||||
|
||||
Kernel module names are lower case and postfixed with `-module`.
|
||||
|
||||
Projects that are kernel modules:
|
||||
|
||||
1. Declare a `struct Module`
|
||||
@@ -169,6 +159,6 @@ Pointers are expected to be non-null unless documented otherwise.
|
||||
|
||||
- `#ifdef ESP_PLATFORM` guards ESP32-specific code; the simulator uses POSIX equivalents.
|
||||
- The `Drivers/` directory contains hardware drivers (display controllers, touch controllers, PMICs, etc.) — each is its own CMake component.
|
||||
- `Modules/` contains cross-cutting modules: `hal-device-module` (device lifecycle) and `lvgl-module` (LVGL task management).
|
||||
- `Modules/` contains cross-cutting modules. e.g.`lvgl-module` (LVGL task management).
|
||||
- `Data/system/` and `Data/data/` are flashed as FAT filesystem images on ESP32.
|
||||
- Translations are in `Translations/` as CSV files, generated via `generate.py`.
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
## Higher Priority
|
||||
|
||||
- Remove and migrate `Include/Tactility/kernel/Kernel.h` into `tactility/delay.h`
|
||||
- Drivers/audio-codec-module is not a module. Move it somewhere else. Or make it an actual module.
|
||||
- LilyGO T-Dongle S3: 1 button control, stop auto-launching web server
|
||||
- Core2: support power off via software
|
||||
|
||||
Reference in New Issue
Block a user