pub struct PIO<P>where
P: PIOExt,{ /* private fields */ }Expand description
Programmable IO Block
Implementations§
Source§impl<P> PIO<P>where
P: PIOExt,
impl<P> PIO<P>where
P: PIOExt,
Sourcepub fn free(
self,
_sm0: UninitStateMachine<(P, SM0)>,
_sm1: UninitStateMachine<(P, SM1)>,
_sm2: UninitStateMachine<(P, SM2)>,
_sm3: UninitStateMachine<(P, SM3)>,
) -> P
pub fn free( self, _sm0: UninitStateMachine<(P, SM0)>, _sm1: UninitStateMachine<(P, SM1)>, _sm2: UninitStateMachine<(P, SM2)>, _sm3: UninitStateMachine<(P, SM3)>, ) -> P
Free this instance.
All output pins are left in their current state.
Sourcepub fn get_irq_raw(&self) -> u8
pub fn get_irq_raw(&self) -> u8
Get raw irq flags.
The PIO has 8 IRQ flags, of which 4 are visible to the host processor. Each bit of flags corresponds to one of
the IRQ flags.
Sourcepub fn clear_irq(&self, flags: u8)
pub fn clear_irq(&self, flags: u8)
Clear PIO’s IRQ flags indicated by the bits.
The PIO has 8 IRQ flags, of which 4 are visible to the host processor. Each bit of flags corresponds to one of
the IRQ flags.
Sourcepub fn force_irq(&self, flags: u8)
pub fn force_irq(&self, flags: u8)
Force PIO’s IRQ flags indicated by the bits.
The PIO has 8 IRQ flags, of which 4 are visible to the host processor. Each bit of flags corresponds to one of
the IRQ flags.
Sourcepub fn install(
&mut self,
p: &Program<rp235x_hal::::pio::{impl#6}::install::{constant#0}>,
) -> Result<InstalledProgram<P>, InstallError>
pub fn install( &mut self, p: &Program<rp235x_hal::::pio::{impl#6}::install::{constant#0}>, ) -> Result<InstalledProgram<P>, InstallError>
Allocates space in instruction memory and installs the program.
The function returns a handle to the installed program that can be used
to configure a StateMachine via PIOBuilder. The program can be
uninstalled to free instruction memory via uninstall() once the state
machine using the program has been uninitialized.
Note: We use the RP2040 program size constant, but the RP2350 has the same size instruction memory.
§Safety
PIOExt is marked send and should be the only object allowed to access
pio.instr_mem
Sourcepub fn uninstall(&mut self, p: InstalledProgram<P>)
pub fn uninstall(&mut self, p: InstalledProgram<P>)
Removes the specified program from instruction memory, freeing the allocated space.
Trait Implementations§
Auto Trait Implementations§
impl<P> Freeze for PIO<P>where
P: Freeze,
impl<P> RefUnwindSafe for PIO<P>where
P: RefUnwindSafe,
impl<P> Sync for PIO<P>where
P: Sync,
impl<P> Unpin for PIO<P>where
P: Unpin,
impl<P> UnwindSafe for PIO<P>where
P: UnwindSafe,
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