[−][src]Crate interrupture
Safe and "free of data races" interrupt system.
The interrupt system features are:
-
Ownership based interrupt management. The
InterruptTable
owns 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
Send
andSync
concept, 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.
Structs
InterruptHandle | The |
InterruptTable | The |
Enums
Error | The error type that can occur when handling with interrupts. |
Traits
InterruptController | A low level API for interrupts. Implement this API
for your hardware in order to get access to the more
convenient |
Nr | Interrupt number |
Functions
handle_isr | Call this function from your |
scope | Creates a new scope, to guarantee that the |