Skip to content

Commit

Permalink
Merge pull request #3647 from vinsynth/rp-fix-pio-i2s-clock
Browse files Browse the repository at this point in the history
Rp fix pio i2s clock
  • Loading branch information
Dirbaio authored Dec 15, 2024
2 parents 1e37cc5 + ffbef93 commit 99ad61c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion embassy-rp/src/pio_programs/i2s.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl<'a, P: Instance, const S: usize> PioI2sOut<'a, P, S> {
cfg.use_program(&program.prg, &[&bit_clock_pin, &left_right_clock_pin]);
cfg.set_out_pins(&[&data_pin]);
let clock_frequency = sample_rate * bit_depth * channels;
cfg.clock_divider = (125_000_000. / clock_frequency as f64 / 2.).to_fixed();
cfg.clock_divider = (crate::clocks::clk_sys_freq() as f64 / clock_frequency as f64 / 2.).to_fixed();
cfg.shift_out = ShiftConfig {
threshold: 32,
direction: ShiftDirection::Left,
Expand Down

0 comments on commit 99ad61c

Please sign in to comment.