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,
impl<P, const IRQ: usize> Interrupt<'_, P, IRQ>where
P: PIOExt,
Sourcepub fn enable_sm_interrupt(&self, id: u8)
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.
Sourcepub fn disable_sm_interrupt(&self, id: u8)
pub fn disable_sm_interrupt(&self, id: u8)
Disable interrupts raised by state machines.
See Self::enable_sm_interrupt for info about the index.
Sourcepub fn force_sm_interrupt(&self, id: u8, set: bool)
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.
Sourcepub fn enable_tx_not_full_interrupt(&self, id: u8)
👎Deprecated since 0.7.0: Use the dedicated method on the state machine
pub fn enable_tx_not_full_interrupt(&self, id: u8)
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.
Sourcepub fn disable_tx_not_full_interrupt(&self, id: u8)
👎Deprecated since 0.7.0: Use the dedicated method on the state machine
pub fn disable_tx_not_full_interrupt(&self, id: u8)
Disable TX FIFO not full interrupt.
See Self::enable_tx_not_full_interrupt for info about the index.
Sourcepub fn force_tx_not_full_interrupt(&self, id: u8)
👎Deprecated since 0.7.0: Use the dedicated method on the state machine
pub fn force_tx_not_full_interrupt(&self, id: u8)
Force TX FIFO not full interrupt.
See Self::enable_tx_not_full_interrupt for info about the index.
Sourcepub fn enable_rx_not_empty_interrupt(&self, id: u8)
👎Deprecated since 0.7.0: Use the dedicated method on the state machine
pub fn enable_rx_not_empty_interrupt(&self, id: u8)
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.
Sourcepub fn disable_rx_not_empty_interrupt(&self, id: u8)
👎Deprecated since 0.7.0: Use the dedicated method on the state machine
pub fn disable_rx_not_empty_interrupt(&self, id: u8)
Disable RX FIFO not empty interrupt.
See Self::enable_rx_not_empty_interrupt for info about the index.
Sourcepub fn force_rx_not_empty_interrupt(&self, id: u8)
👎Deprecated since 0.7.0: Use the dedicated method on the state machine
pub fn force_rx_not_empty_interrupt(&self, id: u8)
Force RX FIFO not empty interrupt.
See Self::enable_rx_not_empty_interrupt for info about the index.
Sourcepub fn raw(&self) -> InterruptState
pub fn raw(&self) -> InterruptState
Get the raw interrupt state.
This is the state of the interrupts without interrupt masking and forcing.
Sourcepub fn state(&self) -> InterruptState
pub fn state(&self) -> InterruptState
Get the interrupt state.
This is the state of the interrupts after interrupt masking and forcing.
Trait Implementations§
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> 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
Source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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