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.
This commit is contained in:
Ken Van Hoeylandt
2026-02-01 01:05:16 +01:00
committed by GitHub
parent 5993ceb232
commit 3fe1dc0312
74 changed files with 836 additions and 211 deletions
+11
View File
@@ -23,6 +23,7 @@
#include <Tactility/settings/TimePrivate.h>
#include <tactility/kernel_init.h>
#include <tactility/hal_device_module.h>
#include <map>
#include <format>
@@ -38,6 +39,11 @@ static auto LOGGER = Logger("Tactility");
static const Configuration* config_instance = nullptr;
static Dispatcher mainDispatcher;
struct ModuleParent tactility_module_parent {
"tactility",
nullptr
};
// region Default services
namespace service {
// Primary
@@ -330,6 +336,11 @@ void run(const Configuration& config, Module* platformModule, Module* deviceModu
return;
}
// HAL compatibility module: it creates kernel driver wrappers for tt::hal::Device
check(module_parent_construct(&tactility_module_parent) == ERROR_NONE);
check(module_set_parent(&hal_device_module, &tactility_module_parent) == ERROR_NONE);
check(module_start(&hal_device_module) == ERROR_NONE);
const hal::Configuration& hardware = *config.hardware;
// Assign early so starting services can use it