atsamd_hal::async_hal::interrupts

Trait InterruptSource

Source
pub trait InterruptSource: Sealed {
    // Required methods
    unsafe fn enable();
    fn disable();
    fn unpend();
    fn set_priority(prio: Priority);
}
Expand description

An interrupt source that may have one or many interrupt bindings.

This trait may implemented directly when multiple interrupt sources are needed to operate a single peripheral (eg, SERCOM and DMAC for thumbv7 devices). If using one interrupt source per peripheral, implement Interrupt instead. When implemented on a type that handles multiple interrupt sources, the methods will act on all interrupt sources at once.

May not be implemented outside of this HAL.

Required Methods§

Source

unsafe fn enable()

Enable the interrupt.

§Safety

Do not enable any interrupt inside a critical section.

Source

fn disable()

Disable the interrupt.

Source

fn unpend()

Unset interrupt pending.

Source

fn set_priority(prio: Priority)

Set the interrupt priority.

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§