Safe and "free of data races" interrupt system.
The interrupt system features are:
Ownership based interrupt management. The
InterruptTableowns the nvic register and thus it is the only one that can access and change the interrupt controller.
Easy to use closure-based ISR registration. Closures can be registered as interrupt service routine.
Free of data races. Thanks to Rust
Syncconcept, the interrupt system is free of data races. Shared mutable access on a variable must be synchronized with a PrimaskMutex, otherwise the compilation fails.
Scoped IRSs with access to the enviroment. It is guaranteed that the closure is unregistered at the end of the scope. Thus it is safe to access the parent stack in the interrupt service routine.
The error type that can occur when handling with interrupts.
A low level API for interrupts. Implement this API
for your hardware in order to get access to the more
Call this function from your
Creates a new scope, to guarantee that the