Rework I3C driver to runtime-bus model with register facade

One driver type now manages all four bus instances: the Instance
type-parameter and its per-bus impl macro are removed, and the bus is
selected at runtime in I3cRegisters::new(bus), mirroring the SmcRegisters
shape. All I3C MMIO unsafe (pointer derefs) is confined to the new
registers.rs; hardware.rs accesses the blocks through safe delegates.

IRQ ownership moves to the integration layer: enable_irq/disable_irq are
dropped from the hardware traits and the driver only exposes
dispatch_i3c_irq plus an i3c_bus_interrupt(bus) mapping for the NVIC line
the kernel owns. The per-bus handler registry becomes single-shot
(typed Busy on a second claim) and panic-free (UnsafeCell + critical
section, same rationale as the IBI rings, whose closure-based access is
also replaced by leaf push/pop helpers).

The controller is rebuilt around an ISR-shared I3cCore pinned at a
'static address, so the trampoline pointer's validity is type-guaranteed
rather than a convention, with a light two-state lifecycle
(Uninitialized -> start() -> Ready) matching the SMC precedent. Tests
construct the core via cortex_m::singleton!, which also moves the large
config off the 2 KiB bootstrap stack, and unmask the NVIC line
themselves after start().
12 files changed
tree: 826ac312506d77d0152db2cb2e8cd08bce453915
  1. .github/
  2. docs/
  3. drivers/
  4. hal/
  5. openprot/
  6. platform/
  7. presubmit/
  8. services/
  9. target/
  10. third_party/
  11. tools/
  12. util/
  13. .bazelignore
  14. .bazelrc
  15. .bazelversion
  16. .clang-format
  17. .gitignore
  18. .semgrepignore
  19. BUILD.bazel
  20. CONTRIBUTING.md
  21. LICENSE
  22. MODULE.bazel
  23. MODULE.bazel.lock
  24. pw
  25. README.md
  26. rust-toolchain.toml
  27. workflows.json
README.md

OpenPRoT

Technical Charter

The OpenPRoT Technical Charter can be found at https://github.com/OpenPRoT/.github/blob/main/GOVERNANCE.md

Getting Started

NOTE: We are converting our build system to bazel. We recommend installing bazelisk to automatically manage bazel versions.

Available Tasks

You can run tasks using the Pigweed workflow launcher pw or bazel.

  • ./pw presubmit - Run presubmit checks: formatting, license checks, C/C++ header checks and clippy.
  • ./pw format - Run the code formatters.
  • bazel test //... - Run all tests.
  • bazel build //docs - Build documentation.

Development

The project is structured as a bazel module.

Requirements

  • Bazel. We recommend installing bazelisk to automatically manage bazel versions.

No additional tools are required - all dependencies are managed by bazel.