pub trait InterruptExt {
// Required methods
fn unpend(&self);
fn set_priority(&self, priority: Priority);
unsafe fn enable(&self);
unsafe fn disable(&self);
fn is_pending(&self) -> bool;
}Expand description
Trait for configuring and controlling interrupts.
This trait provides a consistent interface for interrupt management across different interrupt sources, similar to embassy-imxrt’s InterruptExt.
Required Methods§
Sourcefn set_priority(&self, priority: Priority)
fn set_priority(&self, priority: Priority)
Set NVIC priority for this interrupt.
Sourceunsafe fn enable(&self)
unsafe fn enable(&self)
Enable this interrupt in NVIC.
§Safety
This function is unsafe because it can enable interrupts that may not be properly configured, potentially leading to undefined behavior.
Sourceunsafe fn disable(&self)
unsafe fn disable(&self)
Disable this interrupt in NVIC.
§Safety
This function is unsafe because disabling interrupts may leave the system in an inconsistent state if the interrupt was expected to fire.
Sourcefn is_pending(&self) -> bool
fn is_pending(&self) -> bool
Check if the interrupt is pending in NVIC.