pub struct PioEncoder<'d, T: Instance, const SM: usize> { /* private fields */ }Expand description
Pio Backed quadrature encoder reader
Implementations§
Source§impl<'d, T: Instance, const SM: usize> PioEncoder<'d, T, SM>
impl<'d, T: Instance, const SM: usize> PioEncoder<'d, T, SM>
Sourcepub fn new(
pio: &mut Common<'d, T>,
sm: StateMachine<'d, T, SM>,
pin_a: Peri<'d, impl PioPin>,
pin_b: Peri<'d, impl PioPin>,
program: &PioEncoderProgram<'d, T>,
) -> Self
pub fn new( pio: &mut Common<'d, T>, sm: StateMachine<'d, T, SM>, pin_a: Peri<'d, impl PioPin>, pin_b: Peri<'d, impl PioPin>, program: &PioEncoderProgram<'d, T>, ) -> Self
Configure a state machine with the loaded PioEncoderProgram
Sourcepub fn set_target_frequency(&mut self, target_frequency: u32)
pub fn set_target_frequency(&mut self, target_frequency: u32)
Change rotary encoder target frequency at runtime
Auto Trait Implementations§
impl<'d, T, const SM: usize> !UnwindSafe for PioEncoder<'d, T, SM>
impl<'d, T, const SM: usize> Freeze for PioEncoder<'d, T, SM>where
StateMachine<'d, T, SM>: Freeze,
impl<'d, T, const SM: usize> RefUnwindSafe for PioEncoder<'d, T, SM>where
StateMachine<'d, T, SM>: RefUnwindSafe,
impl<'d, T, const SM: usize> Send for PioEncoder<'d, T, SM>where
StateMachine<'d, T, SM>: Send,
impl<'d, T, const SM: usize> Sync for PioEncoder<'d, T, SM>where
StateMachine<'d, T, SM>: Sync,
impl<'d, T, const SM: usize> Unpin for PioEncoder<'d, T, SM>where
StateMachine<'d, T, SM>: Unpin,
impl<'d, T, const SM: usize> UnsafeUnpin for PioEncoder<'d, T, SM>where
StateMachine<'d, T, SM>: UnsafeUnpin,
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
Mutably borrows from an owned value. Read more