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

44 lines
843 B
C++

#include "Main.h"
#include <Tactility/Thread.h>
#include "FreeRTOS.h"
#include "task.h"
#include <tactility/log.h>
constexpr auto* TAG = "FreeRTOS";
namespace simulator {
MainFunction mainFunction = nullptr;
void setMain(MainFunction newMainFunction) {
mainFunction = newMainFunction;
}
static void freertosMainTask(void* parameter) {
LOG_I(TAG, "starting app_main()");
assert(simulator::mainFunction);
mainFunction();
LOG_I(TAG, "returned from app_main()");
vTaskDelete(nullptr);
}
void freertosMain() {
BaseType_t task_result = xTaskCreate(
freertosMainTask,
"main",
8192,
nullptr,
static_cast<UBaseType_t>(tt::Thread::Priority::Normal),
nullptr
);
assert(task_result == pdTRUE);
// Blocks forever
vTaskStartScheduler();
}
} // namespace