Interrupt

Struct Interrupt 

Source
pub struct Interrupt<'a, P, const IRQ: usize>
where P: PIOExt,
{ /* private fields */ }
Expand description

PIO Interrupt controller.

Implementations§

Source§

impl<P, const IRQ: usize> Interrupt<'_, P, IRQ>
where P: PIOExt,

Source

pub fn enable_sm_interrupt(&self, id: u8)

Enable interrupts raised by state machines.

The PIO peripheral has 4 outside visible interrupts that can be raised by the state machines. Note that this does not correspond with the state machine index; any state machine can raise any one of the four interrupts.

Source

pub fn disable_sm_interrupt(&self, id: u8)

Disable interrupts raised by state machines.

See Self::enable_sm_interrupt for info about the index.

Source

pub fn force_sm_interrupt(&self, id: u8, set: bool)

Force state machine interrupt.

Note that this doesn’t affect the state seen by the state machine. For that, see PIO::force_irq.

See Self::enable_sm_interrupt for info about the index.

Source

pub fn enable_tx_not_full_interrupt(&self, id: u8)

👎Deprecated since 0.7.0: Use the dedicated method on the state machine

Enable TX FIFO not full interrupt.

Each of the 4 state machines have their own TX FIFO. This interrupt is raised when the TX FIFO is not full, i.e. one could push more data to it.

Source

pub fn disable_tx_not_full_interrupt(&self, id: u8)

👎Deprecated since 0.7.0: Use the dedicated method on the state machine

Disable TX FIFO not full interrupt.

See Self::enable_tx_not_full_interrupt for info about the index.

Source

pub fn force_tx_not_full_interrupt(&self, id: u8)

👎Deprecated since 0.7.0: Use the dedicated method on the state machine

Force TX FIFO not full interrupt.

See Self::enable_tx_not_full_interrupt for info about the index.

Source

pub fn enable_rx_not_empty_interrupt(&self, id: u8)

👎Deprecated since 0.7.0: Use the dedicated method on the state machine

Enable RX FIFO not empty interrupt.

Each of the 4 state machines have their own RX FIFO. This interrupt is raised when the RX FIFO is not empty, i.e. one could read more data from it.

Source

pub fn disable_rx_not_empty_interrupt(&self, id: u8)

👎Deprecated since 0.7.0: Use the dedicated method on the state machine

Disable RX FIFO not empty interrupt.

See Self::enable_rx_not_empty_interrupt for info about the index.

Source

pub fn force_rx_not_empty_interrupt(&self, id: u8)

👎Deprecated since 0.7.0: Use the dedicated method on the state machine

Force RX FIFO not empty interrupt.

See Self::enable_rx_not_empty_interrupt for info about the index.

Source

pub fn raw(&self) -> InterruptState

Get the raw interrupt state.

This is the state of the interrupts without interrupt masking and forcing.

Source

pub fn state(&self) -> InterruptState

Get the interrupt state.

This is the state of the interrupts after interrupt masking and forcing.

Trait Implementations§

Source§

impl<'a, P, const IRQ: usize> Debug for Interrupt<'a, P, IRQ>
where P: Debug + PIOExt,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<P, const IRQ: usize> Send for Interrupt<'_, P, IRQ>
where P: PIOExt,

Auto Trait Implementations§

§

impl<'a, P, const IRQ: usize> Freeze for Interrupt<'a, P, IRQ>

§

impl<'a, P, const IRQ: usize> !RefUnwindSafe for Interrupt<'a, P, IRQ>

§

impl<'a, P, const IRQ: usize> !Sync for Interrupt<'a, P, IRQ>

§

impl<'a, P, const IRQ: usize> Unpin for Interrupt<'a, P, IRQ>

§

impl<'a, P, const IRQ: usize> !UnwindSafe for Interrupt<'a, P, IRQ>

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<Choices> CoproductSubsetter<CNil, HNil> for Choices

Source§

type Remainder = Choices

Source§

fn subset( self, ) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>

Extract a subset of the possible types in a coproduct (or get the remaining possibilities) 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U, I> LiftInto<U, I> for T
where U: LiftFrom<T, I>,

Source§

fn lift_into(self) -> U

Performs the indexed conversion.
Source§

impl<Source> Sculptor<HNil, HNil> for Source

Source§

type Remainder = Source

Source§

fn sculpt(self) -> (HNil, <Source as Sculptor<HNil, HNil>>::Remainder)

Consumes the current HList and returns an HList with the requested shape. Read more
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.