Struct Clic

Source
pub struct Clic { /* private fields */ }

Implementations§

Source§

impl Clic

Source

pub const fn new(in_use_interrupts: u64) -> Clic

Source

pub fn clear_all_pending(&self)

Clear all pending interrupts.

Source

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.

Source

pub fn disable_pending(&self)

Source

pub fn disable_all(&self)

Disable all interrupts.

Source

pub fn next_pending(&self) -> Option<u32>

Get the index (0-256) of the lowest number pending interrupt, or None if none is pending.

Source

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.

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.