pub struct Flags(/* private fields */);Expand description
Flags to be used when registering IRQ handlers.
Flags can be used to request specific behaviors when registering an IRQ
handler, and can be combined using the |, &, and ! operators to
further control the system’s behavior.
A common use case is to register a shared interrupt, as sharing the line
between devices is increasingly common in modern systems and is even
required for some buses. This requires setting Flags::SHARED when
requesting the interrupt. Other use cases include setting the trigger type
through Flags::TRIGGER_*, which determines when the interrupt fires, or
controlling whether the interrupt is masked after the handler runs by using
Flags::ONESHOT.
If an invalid combination of flags is provided, the system will refuse to
register the handler, and lower layers will enforce certain flags when
necessary. This means, for example, that all the
crate::irq::Registration for a shared interrupt have to agree on
Flags::SHARED and on the same trigger type, if set.
Implementations§
source§impl Flags
impl Flags
sourcepub const TRIGGER_NONE: Flags = _
pub const TRIGGER_NONE: Flags = _
Use the interrupt line as already configured.
sourcepub const TRIGGER_RISING: Flags = _
pub const TRIGGER_RISING: Flags = _
The interrupt is triggered when the signal goes from low to high.
sourcepub const TRIGGER_FALLING: Flags = _
pub const TRIGGER_FALLING: Flags = _
The interrupt is triggered when the signal goes from high to low.
sourcepub const TRIGGER_HIGH: Flags = _
pub const TRIGGER_HIGH: Flags = _
The interrupt is triggered while the signal is held high.
sourcepub const TRIGGER_LOW: Flags = _
pub const TRIGGER_LOW: Flags = _
The interrupt is triggered while the signal is held low.
sourcepub const PROBE_SHARED: Flags = _
pub const PROBE_SHARED: Flags = _
Set by callers when they expect sharing mismatches to occur.
sourcepub const NOBALANCING: Flags = _
pub const NOBALANCING: Flags = _
Flag to exclude this interrupt from irq balancing.
sourcepub const IRQPOLL: Flags = _
pub const IRQPOLL: Flags = _
Interrupt is used for polling (only the interrupt that is registered first in a shared interrupt is considered for performance reasons).
sourcepub const ONESHOT: Flags = _
pub const ONESHOT: Flags = _
Interrupt is not re-enabled after the hardirq handler finished. Used by threaded interrupts which need to keep the irq line disabled until the threaded handler has been run.
sourcepub const NO_SUSPEND: Flags = _
pub const NO_SUSPEND: Flags = _
Do not disable this IRQ during suspend. Does not guarantee that this interrupt will wake the system from a suspended state.
sourcepub const FORCE_RESUME: Flags = _
pub const FORCE_RESUME: Flags = _
Force enable it on resume even if Flags::NO_SUSPEND is set.
sourcepub const EARLY_RESUME: Flags = _
pub const EARLY_RESUME: Flags = _
Resume IRQ early during syscore instead of at device resume time.
sourcepub const COND_SUSPEND: Flags = _
pub const COND_SUSPEND: Flags = _
If the IRQ is shared with a Flags::NO_SUSPEND user, execute this
interrupt handler after suspending interrupts. For system wakeup devices
users need to implement wakeup detection in their interrupt handlers.
Trait Implementations§
source§impl PartialEq for Flags
impl PartialEq for Flags
impl Copy for Flags
impl Eq for Flags
impl StructuralPartialEq for Flags
Auto Trait Implementations§
impl Freeze for Flags
impl RefUnwindSafe for Flags
impl Send for Flags
impl Sync for Flags
impl Unpin for Flags
impl UnwindSafe for Flags
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> PinInit<T> for T
impl<T> PinInit<T> for T
source§unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
slot. Read more