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:
committed by
GitHub
parent
d62314f41f
commit
c9185740d7
@@ -3,6 +3,11 @@
|
||||
#include <tactility/driver.h>
|
||||
#include <devicetree.h>
|
||||
|
||||
// From the relevant platform
|
||||
extern struct Module platform_module;
|
||||
// From the relevant device
|
||||
extern struct Module device_module;
|
||||
|
||||
#ifdef ESP_PLATFORM
|
||||
#include <tt_init.h>
|
||||
#else
|
||||
@@ -14,10 +19,6 @@ extern const tt::hal::Configuration hardwareConfiguration;
|
||||
|
||||
extern "C" {
|
||||
|
||||
extern void register_kernel_drivers();
|
||||
extern void register_platform_drivers();
|
||||
extern void register_device_drivers();
|
||||
|
||||
void app_main() {
|
||||
static const tt::Configuration config = {
|
||||
/**
|
||||
@@ -31,12 +32,7 @@ void app_main() {
|
||||
tt_init_tactility_c(); // ELF bindings for side-loading on ESP32
|
||||
#endif
|
||||
|
||||
register_kernel_drivers();
|
||||
register_platform_drivers();
|
||||
register_device_drivers();
|
||||
|
||||
devices_builtin_init();
|
||||
tt::run(config);
|
||||
tt::run(config, &platform_module, &device_module, devicetree_devices);
|
||||
}
|
||||
|
||||
} // extern
|
||||
Reference in New Issue
Block a user