Skip to main content

Module hardware_backend

Module hardware_backend 

Source
Expand description

Hardware access abstraction for the executor.

The real driver implements MmioBackend over a locally mapped MMIO region; tests and driver realm fakes use FakeMmio. Keeping the trait in the core crate lets the entire read path run on the build host.

Structs§

FakeClock
Deterministic test clock advancing by a fixed step per reading.
FakeMmio
In-memory fake MMIO region that records every access, for unit tests and driver realm fakes. Reads of unset offsets return zero.

Enums§

BackendError
Errors surfaced by a hardware backend.

Traits§

Clock
A source of target monotonic time, injected so core logic is deterministic under test. The driver supplies zx monotonic time.
MmioBackend
Volatile 32-bit MMIO access to one resource.
Timer
An asynchronous timer for delays and polling.