embassy-nrf

Crates

git

Versions

nrf51

Flavors

embassy_nrf::interrupt::typelevel

Trait Interrupt

Source
pub trait Interrupt: SealedInterrupt {
    const IRQ: Interrupt;

    // Provided methods
    unsafe fn enable() { ... }
    fn disable() { ... }
    fn is_enabled() -> bool { ... }
    fn is_pending() -> bool { ... }
    fn pend() { ... }
    fn unpend() { ... }
    fn get_priority() -> Priority { ... }
    fn set_priority(prio: Priority) { ... }
    fn set_priority_with_cs(cs: CriticalSection<'_>, prio: Priority) { ... }
}
Expand description

Type-level interrupt.

This trait is implemented for all typelevel interrupt types in this module.

Required Associated Constants§

Source

const IRQ: Interrupt

Interrupt enum variant.

This allows going from typelevel interrupts (one type per interrupt) to non-typelevel interrupts (a single Interrupt enum type, with one variant per interrupt).

Provided Methods§

Source

unsafe fn enable()

Enable the interrupt.

Source

fn disable()

Disable the interrupt.

Source

fn is_enabled() -> bool

Check if interrupt is enabled.

Source

fn is_pending() -> bool

Check if interrupt is pending.

Source

fn pend()

Set interrupt pending.

Source

fn unpend()

Unset interrupt pending.

Source

fn get_priority() -> Priority

Get the priority of the interrupt.

Source

fn set_priority(prio: Priority)

Set the interrupt priority.

Source

fn set_priority_with_cs(cs: CriticalSection<'_>, prio: Priority)

Set the interrupt priority with an already-acquired critical section

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Interrupt for AAR_CCM

Source§

const IRQ: Interrupt = super::Interrupt::AAR_CCM

Source§

impl Interrupt for ADC

Source§

const IRQ: Interrupt = super::Interrupt::ADC

Source§

impl Interrupt for CLOCK_POWER

Source§

const IRQ: Interrupt = super::Interrupt::CLOCK_POWER

Source§

impl Interrupt for ECB

Source§

const IRQ: Interrupt = super::Interrupt::ECB

Source§

impl Interrupt for GPIOTE

Source§

const IRQ: Interrupt = super::Interrupt::GPIOTE

Source§

impl Interrupt for LPCOMP

Source§

const IRQ: Interrupt = super::Interrupt::LPCOMP

Source§

impl Interrupt for QDEC

Source§

const IRQ: Interrupt = super::Interrupt::QDEC

Source§

impl Interrupt for RADIO

Source§

const IRQ: Interrupt = super::Interrupt::RADIO

Source§

impl Interrupt for RNG

Source§

const IRQ: Interrupt = super::Interrupt::RNG

Source§

impl Interrupt for RTC0

Source§

const IRQ: Interrupt = super::Interrupt::RTC0

Source§

impl Interrupt for RTC1

Source§

const IRQ: Interrupt = super::Interrupt::RTC1

Source§

impl Interrupt for SWI0

Source§

const IRQ: Interrupt = super::Interrupt::SWI0

Source§

impl Interrupt for SWI1

Source§

const IRQ: Interrupt = super::Interrupt::SWI1

Source§

impl Interrupt for SWI2

Source§

const IRQ: Interrupt = super::Interrupt::SWI2

Source§

impl Interrupt for SWI3

Source§

const IRQ: Interrupt = super::Interrupt::SWI3

Source§

impl Interrupt for SWI4

Source§

const IRQ: Interrupt = super::Interrupt::SWI4

Source§

impl Interrupt for SWI5

Source§

const IRQ: Interrupt = super::Interrupt::SWI5

Source§

impl Interrupt for TEMP

Source§

const IRQ: Interrupt = super::Interrupt::TEMP

Source§

impl Interrupt for TIMER0

Source§

const IRQ: Interrupt = super::Interrupt::TIMER0

Source§

impl Interrupt for TIMER1

Source§

const IRQ: Interrupt = super::Interrupt::TIMER1

Source§

impl Interrupt for TIMER2

Source§

const IRQ: Interrupt = super::Interrupt::TIMER2

Source§

impl Interrupt for TWISPI0

Source§

const IRQ: Interrupt = super::Interrupt::TWISPI0

Source§

impl Interrupt for TWISPI1

Source§

const IRQ: Interrupt = super::Interrupt::TWISPI1

Source§

impl Interrupt for UART0

Source§

const IRQ: Interrupt = super::Interrupt::UART0

Source§

impl Interrupt for WDT

Source§

const IRQ: Interrupt = super::Interrupt::WDT