docs.rs failed to build xpanse-api-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Shared API for xpanse apps, module drivers, and platform firmware.
Module drivers implement [driver::Driver] to turn an owned
[gpio_bank::GpioBank] into capabilities stored in a [registry::Registry].
Apps implement [app::App] and lease those capabilities for the duration of
their run. The platform constructs buses through [bus::allocator::BusAllocator]
while drivers are being initialized.
Runtime requirements
This crate is no_std, but uses alloc for registry storage, trait objects,
and boxed futures. Firmware using the API must install a global allocator
before creating drivers, resources, or apps.
Typical lifecycle
- Detect a module and select a driver using [
metadata::ModuleID]. - Call [
driver::Driver::create] with the module's GPIO bank. - Check [
app::App::can_run] and construct an app with [app::App::new]. - Run the app, then call [
app::App::release] to return its resource leases.
Exact versions of HAL traits used by this API are available through
[reexports], avoiding version mismatches in app and driver crates.