Skip to main content

Int

Struct Int 

Source
pub struct Int { /* private fields */ }
Expand description

Access to interrupt controller.

Implementations§

Source§

impl Int

Source

pub fn new(int: INT) -> Int

Create a new instance. Configures the interrupt controller to work in the Multi-vectored mode. The Cause register of the MIPS core must be already configured for use with External Interrupt Controller (EIC); done by startup code.

Source

pub fn ei(&self, s: InterruptSource)

Enable interrupts for a specific source

Source

pub fn di(&self, s: InterruptSource)

Disable interrupts for a specific source

Source

pub fn is_ie(&self, s: InterruptSource) -> bool

Check if interrupts for a specific source are enabled

Source

pub fn get_if(&self, s: InterruptSource) -> bool

Read the interrupt flag of a specific interrupt source

Source

pub fn clear_if(&self, s: InterruptSource)

Clear the interrupt flag of a specific interrupt source To be called before terminating an ISR.

Source

pub fn set_if(&self, s: InterruptSource)

Set the interrupt flag of a specific interrupt source

Source

pub fn set_ipl(&self, iv: Interrupt, ipl: Ipl)

Set the interrupt priority level of a specific interrupt vector

Source

pub fn ipl(&self, iv: Interrupt) -> Ipl

Get the interrupt priority level of a specific interrupt vector

Source

pub fn set_isl(&self, iv: Interrupt, isl: Isl)

Set the interrupt sub priority level of a specific interrupt vector

Source

pub fn isl(&self, iv: Interrupt) -> Isl

Get the interrupt sub priority level of a specific interrupt vector

Auto Trait Implementations§

§

impl !Sync for Int

§

impl Freeze for Int

§

impl RefUnwindSafe for Int

§

impl Send for Int

§

impl Unpin for Int

§

impl UnsafeUnpin for Int

§

impl UnwindSafe for Int

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.