stm32f3xx_hal/interrupts.rs
1//! Common Interrupt interface defintions shared between peipherals.
2
3/// A common interrupt number interface, which returns the associated interrupt
4/// of the peripheral.
5///
6/// Used to unmask / enable the interrupt with [`cortex_m::peripheral::NVIC::unmask()`].
7/// This is useful for all `cortex_m::peripheral::INTERRUPT` functions.
8pub trait InterruptNumber {
9 /// The type used to represent the Interrupt Number.
10 ///
11 /// This type of interrupt should be compatible with [`cortex_m::peripheral::NVIC`].
12 type Interrupt;
13
14 /// The assocaited constant of the interrupt
15 const INTERRUPT: Self::Interrupt;
16}