Fix numbers
This commit is contained in:
parent
102f60cbf6
commit
5ef4c23e03
2 changed files with 2 additions and 4 deletions
|
@ -22,5 +22,4 @@ pio-proc = "0.2.2"
|
||||||
pio = "0.2.1"
|
pio = "0.2.1"
|
||||||
|
|
||||||
fixed = "1.23.1"
|
fixed = "1.23.1"
|
||||||
fixed-macro = "1.2"
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
use embassy_rp::pio::{Common, Config, Instance, PioPin, StateMachine};
|
use embassy_rp::pio::{Common, Config, Instance, PioPin, StateMachine};
|
||||||
use embassy_time::Timer;
|
use embassy_time::Timer;
|
||||||
use fixed::traits::ToFixed;
|
use fixed::traits::ToFixed;
|
||||||
use fixed_macro::types::U56F8;
|
|
||||||
use pio_proc::pio_file;
|
use pio_proc::pio_file;
|
||||||
|
|
||||||
use crate::DhtError;
|
use crate::DhtError;
|
||||||
|
@ -26,10 +25,10 @@ impl<'d, PIO: Instance, const SM: usize> DhtPio<'d, PIO, SM> {
|
||||||
config.set_set_pins(&[&pin]);
|
config.set_set_pins(&[&pin]);
|
||||||
config.set_in_pins(&[&pin]);
|
config.set_in_pins(&[&pin]);
|
||||||
config.shift_out.threshold = 32;
|
config.shift_out.threshold = 32;
|
||||||
config.clock_divider = (U56F8!(125_000_000) / 125).to_fixed();
|
config.clock_divider = 125.to_fixed();
|
||||||
|
sm.set_config(&config);
|
||||||
|
|
||||||
sm.set_pin_dirs(embassy_rp::pio::Direction::Out, &[&pin]);
|
sm.set_pin_dirs(embassy_rp::pio::Direction::Out, &[&pin]);
|
||||||
sm.set_config(&config);
|
|
||||||
sm.set_enable(true);
|
sm.set_enable(true);
|
||||||
|
|
||||||
Self { sm }
|
Self { sm }
|
||||||
|
|
Loading…
Reference in a new issue