Expand description
Host-testable logic for the mini-HSM firmware.
This crate exists so the parts of the firmware that are pure logic
(state machine, debouncer, LED/button abstractions) can be unit-tested
on the host. The firmware binary depends on this crate and supplies
the hardware-facing trait impls in hsm-firmware/src/hal_rp2040.rs.
Re-exports§
pub use io::Button;pub use io::Debouncer;pub use io::Led;pub use io::DEBOUNCE_STABLE_SAMPLES;
Modules§
- io
- GPIO abstractions: LEDs and the touch button.
- state_
machine 🔒 - Token operating state machine.
Enums§
- Event
- Events that drive transitions.
- LedPattern
- Visual LED pattern associated with each state.
- Token
State - All the operating states the token can be in.
Constants§
- ERROR_
DISPLAY_ MS - How long the token displays the error pattern before returning to idle.
- TOUCH_
TIMEOUT_ MS - How long the user has to touch the button before the signing request is cancelled.