embassy-mspm0

Crates

git

Versions

mspm0l1304rge

Flavors

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 ADC0

Source§

const IRQ: Interrupt = super::Interrupt::ADC0

Source§

impl Interrupt for DMA

Source§

const IRQ: Interrupt = super::Interrupt::DMA

Source§

impl Interrupt for GROUP0

Source§

const IRQ: Interrupt = super::Interrupt::GROUP0

Source§

impl Interrupt for GROUP1

Source§

const IRQ: Interrupt = super::Interrupt::GROUP1

Source§

impl Interrupt for I2C0

Source§

const IRQ: Interrupt = super::Interrupt::I2C0

Source§

impl Interrupt for I2C1

Source§

const IRQ: Interrupt = super::Interrupt::I2C1

Source§

impl Interrupt for SPI0

Source§

const IRQ: Interrupt = super::Interrupt::SPI0

Source§

impl Interrupt for TIMG0

Source§

const IRQ: Interrupt = super::Interrupt::TIMG0

Source§

impl Interrupt for TIMG1

Source§

const IRQ: Interrupt = super::Interrupt::TIMG1

Source§

impl Interrupt for TIMG2

Source§

const IRQ: Interrupt = super::Interrupt::TIMG2

Source§

impl Interrupt for TIMG4

Source§

const IRQ: Interrupt = super::Interrupt::TIMG4

Source§

impl Interrupt for UART0

Source§

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

Source§

impl Interrupt for UART1

Source§

const IRQ: Interrupt = super::Interrupt::UART1