[][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 and Sync 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.



The InterruptHandle is used to access and configure an active interrupt.


The InterruptTable guarantees safe and 'free of data races' use of interrupts.



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 convenient crossbeam-like API.


Interrupt number



Call this function from your #[exception] default handler in order to thread the interrupts through to this crate's handler code.


Creates a new scope, to guarantee that the InterruptTable constructor is called.