Ken Van Hoeylandt c9185740d7
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.
2026-01-31 09:18:02 +01:00

23 lines
776 B
C

#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#include <tactility/device.h>
#include <tactility/error.h>
#include <tactility/module.h>
/**
* Initialize the kernel with platform and device modules, and a device tree.
* @param platform_module The platform module to start. This module should not be constructed yet.
* @param device_module The device module to start. This module should not be constructed yet.
* @param devicetree_devices The list of generated devices from the devicetree. The array must be terminated by an entry { NULL, NULL }
* @return ERROR_NONE on success, otherwise an error code
*/
error_t kernel_init(struct Module* platform_module, struct Module* device_module, struct CompatibleDevice devicetree_devices[]);
#ifdef __cplusplus
}
#endif