Struct avr_device::interrupt::IrqFlag
source · pub struct IrqFlag { /* private fields */ }
Expand description
Opaque structure for storing the global interrupt flag status.
This structure does not implement Copy
and Clone
,
because the user shall not duplicate and pass it twice to crate::interrupt::restore.
Implementations§
source§impl IrqFlag
impl IrqFlag
sourcepub fn enabled(&self) -> bool
pub fn enabled(&self) -> bool
Check the status of the saved global interrupt flag.
Returns true, if the saved global interrupt flag is set (IRQs enabled). Otherwise returns false.
This method can be used to check whether interrupts were enabled before the crate::interrupt::disable_save call. You probably shouldn’t make your program behavior dependent on this state. Consider using a different design.