Fix issue #1, missing in_pin_base
This commit is contained in:
parent
f0d1c227cf
commit
3e3771a7d7
2 changed files with 4 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "dht-pio"
|
name = "dht-pio"
|
||||||
version = "0.4.0"
|
version = "0.5.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use cortex_m::delay::Delay;
|
use cortex_m::delay::Delay;
|
||||||
use pio_proc::pio_file;
|
use pio_proc::pio_file;
|
||||||
use rp2040_hal::gpio::AnyPin;
|
use rp2040_hal::gpio::{AnyPin, FunctionPio0, Pin};
|
||||||
use rp2040_hal::pio::{PIOExt, Running, StateMachine, StateMachineIndex, Tx};
|
use rp2040_hal::pio::{PIOExt, Running, StateMachine, StateMachineIndex, Tx};
|
||||||
use rp2040_hal::pio::{Rx, UninitStateMachine};
|
use rp2040_hal::pio::{Rx, UninitStateMachine};
|
||||||
|
|
||||||
|
@ -27,7 +27,9 @@ impl<P: PIOExt, STI: StateMachineIndex> DhtPio<P, STI> {
|
||||||
|
|
||||||
let (int, frac) = (125, 0);
|
let (int, frac) = (125, 0);
|
||||||
let (mut sm, rx, tx) = rp2040_hal::pio::PIOBuilder::from_program(installed)
|
let (mut sm, rx, tx) = rp2040_hal::pio::PIOBuilder::from_program(installed)
|
||||||
|
.out_pins(pin.id().num, 1)
|
||||||
.set_pins(pin.id().num, 1)
|
.set_pins(pin.id().num, 1)
|
||||||
|
.in_pin_base(pin.id().num)
|
||||||
.clock_divisor_fixed_point(int, frac)
|
.clock_divisor_fixed_point(int, frac)
|
||||||
.push_threshold(32)
|
.push_threshold(32)
|
||||||
.build(sm);
|
.build(sm);
|
||||||
|
|
Loading…
Reference in a new issue