Kernel improvements (#468)

* **New Features**
  * Plugin-style modules for platforms and devices with start/stop lifecycle and a runtime-consumable device tree array.

* **Refactor**
  * Consolidated initialization into a kernel/module startup flow.
  * Generated devicetree artifacts moved to the build Generated directory.

* **Changes**
  * Removed legacy no-op registration hooks and I2C lock/unlock wrappers.
  * Driver ownership and private state moved to explicit module/owner model.
  * Added ERROR_NOT_ALLOWED error code.
This commit is contained in:
Ken Van Hoeylandt
2026-01-31 09:18:02 +01:00
committed by GitHub
parent d62314f41f
commit c9185740d7
119 changed files with 1639 additions and 440 deletions
+10 -1
View File
@@ -22,6 +22,8 @@
#include <Tactility/service/loader/Loader.h>
#include <Tactility/settings/TimePrivate.h>
#include <tactility/kernel_init.h>
#include <map>
#include <format>
@@ -317,10 +319,17 @@ void registerApps() {
registerInstalledAppsFromSdCards();
}
void run(const Configuration& config) {
void run(const Configuration& config, Module* platformModule, Module* deviceModule, CompatibleDevice devicetreeDevices[]) {
LOGGER.info("Tactility v{} on {} ({})", TT_VERSION, CONFIG_TT_DEVICE_NAME, CONFIG_TT_DEVICE_ID);
assert(config.hardware);
LOGGER.info(R"(Calling kernel_init with modules: "{}" and "{}")", platformModule->name, deviceModule->name);
if (kernel_init(platformModule, deviceModule, devicetreeDevices) != ERROR_NONE) {
LOGGER.error("Failed to initialize kernel");
return;
}
const hal::Configuration& hardware = *config.hardware;
// Assign early so starting services can use it