From ec744558b200aebbb05e4d0db89197fea86a25f4 Mon Sep 17 00:00:00 2001 From: kalkyl Date: Thu, 2 Nov 2023 22:37:03 +0100 Subject: [PATCH] Cleanup --- examples/rp/src/bin/pio_rotary_encoder.rs | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/examples/rp/src/bin/pio_rotary_encoder.rs b/examples/rp/src/bin/pio_rotary_encoder.rs index 589f38a7..6d9d59df 100644 --- a/examples/rp/src/bin/pio_rotary_encoder.rs +++ b/examples/rp/src/bin/pio_rotary_encoder.rs @@ -34,24 +34,14 @@ impl<'d, T: Instance, const SM: usize> PioEncoder<'d, T, SM> { pin_b.set_pull(Pull::Up); sm.set_pin_dirs(pio::Direction::In, &[&pin_a, &pin_b]); - let prg = pio_proc::pio_asm!( - r#" - wait 1 pin 1 - .wrap_target - wait 0 pin 1 - in pins, 2 - push - wait 1 pin 1 - .wrap - "# - ); + let prg = pio_proc::pio_asm!("wait 1 pin 1", "wait 0 pin 1", "in pins, 2", "push",); let mut cfg = Config::default(); cfg.set_in_pins(&[&pin_a, &pin_b]); cfg.fifo_join = FifoJoin::RxOnly; - cfg.use_program(&pio.load_program(&prg.program), &[]); cfg.shift_in.direction = ShiftDirection::Left; cfg.clock_divider = 10_000.to_fixed(); + cfg.use_program(&pio.load_program(&prg.program), &[]); sm.set_config(&cfg); sm.set_enable(true); Self { sm }