mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-09-28 04:40:39 +00:00
fmt
This commit is contained in:
parent
713d6291d5
commit
45b7127d61
@ -49,12 +49,12 @@ impl<'d, T: Instance, const SM: usize> PioEncoder<'d, T, SM> {
|
||||
cfg.set_in_pins(&[&pin_a, &pin_b]);
|
||||
cfg.fifo_join = FifoJoin::RxOnly;
|
||||
cfg.shift_in.direction = ShiftDirection::Left;
|
||||
|
||||
|
||||
// Original: 10_000 at 125 MHz (12.5 KHz PIO clock)
|
||||
// Scale divider to maintain same PIO clock frequency at different system clocks
|
||||
let divider = (clk_sys_freq() as f32 / 12_500.0).to_fixed();
|
||||
cfg.clock_divider = divider;
|
||||
|
||||
|
||||
cfg.use_program(&program.prg, &[]);
|
||||
sm.set_config(&cfg);
|
||||
sm.set_enable(true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user