rtic/export/
cortex_common.rs

1pub use cortex_m::{interrupt::InterruptNumber, peripheral::NVIC, register::msp};
2
3#[inline]
4#[must_use]
5pub const fn cortex_logical2hw(logical: u8, nvic_prio_bits: u8) -> u8 {
6    ((1 << nvic_prio_bits) - logical) << (8 - nvic_prio_bits)
7}
8
9/// Sets the given `interrupt` as pending
10///
11/// This is a convenience function around
12/// [`NVIC::pend`](../cortex_m/peripheral/struct.NVIC.html#method.pend)
13pub fn pend<I>(interrupt: I)
14where
15    I: InterruptNumber,
16{
17    NVIC::pend(interrupt);
18}