33use fixed:: traits:: ToFixed ;
44
55use crate :: gpio:: Pull ;
6- use crate :: pio:: { self , Common , Config , FifoJoin , Instance , LoadedProgram , PioPin , ShiftDirection , StateMachine } ;
6+ use crate :: pio:: {
7+ Common , Config , Direction as PioDirection , FifoJoin , Instance , LoadedProgram , PioPin , ShiftDirection , StateMachine ,
8+ } ;
79
810/// This struct represents an Encoder program loaded into pio instruction memory.
911pub struct PioEncoderProgram < ' a , PIO : Instance > {
@@ -13,7 +15,7 @@ pub struct PioEncoderProgram<'a, PIO: Instance> {
1315impl < ' a , PIO : Instance > PioEncoderProgram < ' a , PIO > {
1416 /// Load the program into the given pio
1517 pub fn new ( common : & mut Common < ' a , PIO > ) -> Self {
16- let prg = pio_proc :: pio_asm!( "wait 1 pin 1" , "wait 0 pin 1" , "in pins, 2" , "push" , ) ;
18+ let prg = pio :: pio_asm!( "wait 1 pin 1" , "wait 0 pin 1" , "in pins, 2" , "push" , ) ;
1719
1820 let prg = common. load_program ( & prg. program ) ;
1921
@@ -39,7 +41,7 @@ impl<'d, T: Instance, const SM: usize> PioEncoder<'d, T, SM> {
3941 let mut pin_b = pio. make_pio_pin ( pin_b) ;
4042 pin_a. set_pull ( Pull :: Up ) ;
4143 pin_b. set_pull ( Pull :: Up ) ;
42- sm. set_pin_dirs ( pio :: Direction :: In , & [ & pin_a, & pin_b] ) ;
44+ sm. set_pin_dirs ( PioDirection :: In , & [ & pin_a, & pin_b] ) ;
4345
4446 let mut cfg = Config :: default ( ) ;
4547 cfg. set_in_pins ( & [ & pin_a, & pin_b] ) ;
0 commit comments