pub struct Clic { /* private fields */ }
Implementations§
Source§impl Clic
impl Clic
pub const fn new(in_use_interrupts: u64) -> Clic
Sourcepub fn clear_all_pending(&self)
pub fn clear_all_pending(&self)
Clear all pending interrupts.
Sourcepub fn enable_all(&self)
pub fn enable_all(&self)
Enable ONLY the interrupts we actually want to use.
The CLIC allows disabled interrupts to still set the pending bit. Therefore we have to be very careful about which interrupts we check.
pub fn disable_pending(&self)
Sourcepub fn disable_all(&self)
pub fn disable_all(&self)
Disable all interrupts.
Sourcepub fn next_pending(&self) -> Option<u32>
pub fn next_pending(&self) -> Option<u32>
Get the index (0-256) of the lowest number pending interrupt, or None
if
none is pending.
Sourcepub fn complete(&self, index: u32)
pub fn complete(&self, index: u32)
Signal that an interrupt is finished being handled. In Tock, this should be called from the normal main loop (not the interrupt handler). This marks the interrupt as no longer pending and re-enables it.
Sourcepub fn has_pending(&self) -> bool
pub fn has_pending(&self) -> bool
Return true
if there are any pending interrupts in the CLIC, false
otherwise.
Auto Trait Implementations§
impl Freeze for Clic
impl !RefUnwindSafe for Clic
impl !Send for Clic
impl !Sync for Clic
impl Unpin for Clic
impl !UnwindSafe for Clic
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