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.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for IrqFlag
impl Send for IrqFlag
impl Sync for IrqFlag
impl Unpin for IrqFlag
impl UnwindSafe for IrqFlag
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
Mutably borrows from an owned value. Read more