Struct Eic

Source
pub struct Eic<I = NoneT> { /* private fields */ }
Expand description

External Interrupt Controller.

Use split to split the struct into individual channels, which can then be used to create ExtInts, by calling Channel::with_pin.

Implementations§

Source§

impl Eic

Source

pub fn new(mclk: &mut Mclk, _clock: &EicClock, eic: Eic) -> Self

Create and initialize a new Eic, and wire it up to the ultra-low-power 32kHz clock source.

Source

pub fn switch_to_osc32k(&mut self, _rtc: &RtcOsc<OscUlp32kId>)

Switch the EIC to use the OSC32K clock as a source. This enables it to run in deep-sleep

In this mode, the maximum event frequency is limited to 16Khz

Source

pub fn switch_to_gclk<S: GclkId>(&mut self, _gclk: &Pclk<Eic, S>)

Switch the EIC to use a GCLK source as its clock source.

In this mode, the peripheral cannot run in deep-sleep, but its maximum event frequency is F_GCLK/2

Source

pub fn into_future(self)

This method is not present with the selected feature set, defined for documentation only

Source

pub fn free(self, _channels: Channels) -> Eic

Release the EIC and return the register block.

Note: The Channels struct is consumed by this method. This means that any Channel obtained by split must be moved back into the Channels struct before being able to pass it into free.

Source§

impl Eic<EicFuture>

Source

pub fn free(self, _channels: FutureChannels) -> Eic

Release the EIC and return the register block.

Note: The Channels struct is consumed by this method. This means that any Channel obtained by split must be moved back into the Channels struct before being able to pass it into free.

Source§

impl Eic

Source

pub fn split(self) -> Channels

Split the EIC into individual channels.

Source§

impl Eic<EicFuture>

Source

pub fn split(self) -> FutureChannels

Split the EIC into individual channels

Auto Trait Implementations§

§

impl<I> Freeze for Eic<I>

§

impl<I> RefUnwindSafe for Eic<I>
where I: RefUnwindSafe,

§

impl<I> Send for Eic<I>
where I: Send,

§

impl<I = NoneT> !Sync for Eic<I>

§

impl<I> Unpin for Eic<I>
where I: Unpin,

§

impl<I> UnwindSafe for Eic<I>
where I: UnwindSafe,

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> Same for T

Source§

type Output = T

Should always be Self
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.