Kernel improvements (#485)
* **New Features** * Added public accessors for querying module/device start and ready state. * **Refactor** * Internal state moved to opaque internal objects; module/device/driver initializers now explicitly initialize internal pointers. * Lifecycle handling updated to construct/destruct internal state and use accessors. * **Tests** * Tests updated to use public accessors and explicit construct/destruct lifecycle calls. * **Chores** * Test build/include paths and small metadata updated.
This commit is contained in:
committed by
GitHub
parent
1757af859c
commit
79e43b093a
@@ -32,6 +32,8 @@ error_t gpio_controller_get_pin_count(struct Device* device, uint32_t* count) {
|
||||
return GPIO_DRIVER_API(driver)->get_pin_count(device, count);
|
||||
}
|
||||
|
||||
extern const struct DeviceType GPIO_CONTROLLER_TYPE { 0 };
|
||||
extern const struct DeviceType GPIO_CONTROLLER_TYPE {
|
||||
.name = "gpio-controller"
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -49,6 +49,8 @@ error_t i2c_controller_has_device_at_address(Device* device, uint8_t address, Ti
|
||||
return I2C_DRIVER_API(driver)->write(device, address, message, 2, timeout);
|
||||
}
|
||||
|
||||
extern const struct DeviceType I2C_CONTROLLER_TYPE { 0 };
|
||||
extern const struct DeviceType I2C_CONTROLLER_TYPE {
|
||||
.name = "i2c-controller"
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -32,6 +32,8 @@ error_t i2s_controller_reset(struct Device* device) {
|
||||
return I2S_DRIVER_API(driver)->reset(device);
|
||||
}
|
||||
|
||||
extern const struct DeviceType I2S_CONTROLLER_TYPE { 0 };
|
||||
extern const struct DeviceType I2S_CONTROLLER_TYPE {
|
||||
.name = "i2s-controller"
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user