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
+4 -4
View File
@@ -49,7 +49,7 @@ error_t device_construct(Device* device) {
if (device->internal.device_private == nullptr) {
return ERROR_OUT_OF_MEMORY;
}
LOG_I(TAG, "construct %s", device->name);
LOG_D(TAG, "construct %s", device->name);
mutex_construct(&device->internal.mutex);
return ERROR_NONE;
}
@@ -61,7 +61,7 @@ error_t device_destruct(Device* device) {
if (!get_device_private(device)->children.empty()) {
return ERROR_INVALID_STATE;
}
LOG_I(TAG, "destruct %s", device->name);
LOG_D(TAG, "destruct %s", device->name);
mutex_destruct(&device->internal.mutex);
delete get_device_private(device);
device->internal.device_private = nullptr;
@@ -88,7 +88,7 @@ static void device_remove_child(struct Device* device, struct Device* child) {
}
error_t device_add(Device* device) {
LOG_I(TAG, "add %s", device->name);
LOG_D(TAG, "add %s", device->name);
// Already added
if (device->internal.state.started || device->internal.state.added) {
@@ -111,7 +111,7 @@ error_t device_add(Device* device) {
}
error_t device_remove(Device* device) {
LOG_I(TAG, "remove %s", device->name);
LOG_D(TAG, "remove %s", device->name);
if (device->internal.state.started || !device->internal.state.added) {
return ERROR_INVALID_STATE;