diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-03-26 16:01:37 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2025-03-27 15:18:06 +0100 |
| commit | d41eeeae79388f219bf6a84e2f7bde9f6b532516 (patch) | |
| tree | 678b6fc732216e529dc38e6f65b72a309917ac32 /embassy-rp/src/pio_programs/rotary_encoder.rs | |
| parent | 9edf5b7f049f95742b60b041e4443967d8a6b708 (diff) | |
Remove Peripheral trait, rename PeripheralRef->Peri.
Diffstat (limited to 'embassy-rp/src/pio_programs/rotary_encoder.rs')
| -rw-r--r-- | embassy-rp/src/pio_programs/rotary_encoder.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/embassy-rp/src/pio_programs/rotary_encoder.rs b/embassy-rp/src/pio_programs/rotary_encoder.rs index f2fb02aca..e520da8a3 100644 --- a/embassy-rp/src/pio_programs/rotary_encoder.rs +++ b/embassy-rp/src/pio_programs/rotary_encoder.rs | |||
| @@ -6,6 +6,7 @@ use crate::gpio::Pull; | |||
| 6 | use crate::pio::{ | 6 | use crate::pio::{ |
| 7 | Common, Config, Direction as PioDirection, FifoJoin, Instance, LoadedProgram, PioPin, ShiftDirection, StateMachine, | 7 | Common, Config, Direction as PioDirection, FifoJoin, Instance, LoadedProgram, PioPin, ShiftDirection, StateMachine, |
| 8 | }; | 8 | }; |
| 9 | use crate::Peri; | ||
| 9 | 10 | ||
| 10 | /// This struct represents an Encoder program loaded into pio instruction memory. | 11 | /// This struct represents an Encoder program loaded into pio instruction memory. |
| 11 | pub struct PioEncoderProgram<'a, PIO: Instance> { | 12 | pub struct PioEncoderProgram<'a, PIO: Instance> { |
| @@ -33,8 +34,8 @@ impl<'d, T: Instance, const SM: usize> PioEncoder<'d, T, SM> { | |||
| 33 | pub fn new( | 34 | pub fn new( |
| 34 | pio: &mut Common<'d, T>, | 35 | pio: &mut Common<'d, T>, |
| 35 | mut sm: StateMachine<'d, T, SM>, | 36 | mut sm: StateMachine<'d, T, SM>, |
| 36 | pin_a: impl PioPin, | 37 | pin_a: Peri<'d, impl PioPin>, |
| 37 | pin_b: impl PioPin, | 38 | pin_b: Peri<'d, impl PioPin>, |
| 38 | program: &PioEncoderProgram<'d, T>, | 39 | program: &PioEncoderProgram<'d, T>, |
| 39 | ) -> Self { | 40 | ) -> Self { |
| 40 | let mut pin_a = pio.make_pio_pin(pin_a); | 41 | let mut pin_a = pio.make_pio_pin(pin_a); |
