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:
Ken Van Hoeylandt
2026-07-25 17:20:17 +02:00
committed by GitHub
parent 29e80cfd65
commit 2a2558b29a
173 changed files with 3855 additions and 5445 deletions
+5 -5
View File
@@ -13,19 +13,19 @@ extern void lvgl_devices_detach();
static bool initialized = false;
bool lvgl_lock(void) {
if (!initialized) return true; // We allow (fake) locking because it's safe to do so as LVGL is not running yet
return lvgl_port_lock(portMAX_DELAY);
void lvgl_lock(void) {
if (!initialized) { return; }
lvgl_port_lock(portMAX_DELAY);
}
bool lvgl_try_lock(uint32_t timeoutTicks) {
if (!initialized) return true; // We allow (fake) locking because it's safe to do so as LVGL is not running yet
if (!initialized) { return false; }
// lvgl_port_lock expects milliseconds
return lvgl_port_lock(timeoutTicks * portTICK_PERIOD_MS);
}
void lvgl_unlock(void) {
if (!initialized) return;
if (!initialized) { return; }
lvgl_port_unlock();
}
+9 -3
View File
@@ -13,6 +13,8 @@
#include <tactility/lvgl_module.h>
extern struct LvglModuleConfig lvgl_module_config;
extern void lvgl_devices_attach();
extern void lvgl_devices_detach();
// Mutex for LVGL drawing
static struct RecursiveMutex lvgl_mutex;
@@ -37,10 +39,9 @@ static void task_unlock(void) {
recursive_mutex_unlock(&task_mutex);
}
bool lvgl_lock(void) {
if (!lvgl_mutex_initialised) return false;
void lvgl_lock(void) {
if (!lvgl_mutex_initialised) return;
recursive_mutex_lock(&lvgl_mutex);
return true;
}
bool lvgl_try_lock(uint32_t timeout) {
@@ -71,6 +72,9 @@ static void lvgl_task(void* arg) {
check(!lvgl_task_is_interrupt_requested());
// Must run from this task (like on_start below), otherwise the display doesn't work.
lvgl_devices_attach();
// on_start must be called from the task, otherwise the display doesn't work
if (lvgl_module_config.on_start) lvgl_module_config.on_start();
@@ -89,6 +93,8 @@ static void lvgl_task(void* arg) {
if (lvgl_module_config.on_stop) lvgl_module_config.on_stop();
lvgl_devices_detach();
task_lock();
lvgl_task_handle = NULL;
task_unlock();