Trait embassy_hal_internal::interrupt::InterruptExt
source · pub unsafe trait InterruptExt: InterruptNumber + Copy {
// Provided methods
unsafe fn enable(self) { ... }
fn disable(self) { ... }
fn is_active(self) -> bool { ... }
fn is_enabled(self) -> bool { ... }
fn is_pending(self) -> bool { ... }
fn pend(self) { ... }
fn unpend(self) { ... }
fn get_priority(self) -> Priority { ... }
fn set_priority(self, prio: Priority) { ... }
fn set_priority_with_cs(self, _cs: CriticalSection<'_>, prio: Priority) { ... }
}
Expand description
Represents an interrupt type that can be configured by embassy to handle interrupts.
Provided Methods§
sourcefn is_enabled(self) -> bool
fn is_enabled(self) -> bool
Check if interrupt is enabled.
sourcefn is_pending(self) -> bool
fn is_pending(self) -> bool
Check if interrupt is pending.
sourcefn get_priority(self) -> Priority
fn get_priority(self) -> Priority
Get the priority of the interrupt.
sourcefn set_priority(self, prio: Priority)
fn set_priority(self, prio: Priority)
Set the interrupt priority.
sourcefn set_priority_with_cs(self, _cs: CriticalSection<'_>, prio: Priority)
fn set_priority_with_cs(self, _cs: CriticalSection<'_>, prio: Priority)
Set the interrupt priority with an already-acquired critical section
Equivalent to set_priority
, except you pass a CriticalSection
to prove
you’ve already acquired a critical section. This prevents acquiring another
one, which saves code size.
Object Safety§
This trait is not object safe.