Fix issue #1, missing in_pin_base

This commit is contained in:
Jonathan BAUDIN 2023-10-05 17:52:14 +02:00
parent f0d1c227cf
commit 3e3771a7d7
2 changed files with 4 additions and 2 deletions

View file

@ -1,6 +1,6 @@
[package]
name = "dht-pio"
version = "0.4.0"
version = "0.5.0"
edition = "2021"
license = "MIT"

View file

@ -1,6 +1,6 @@
use cortex_m::delay::Delay;
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::{Rx, UninitStateMachine};
@ -27,7 +27,9 @@ impl<P: PIOExt, STI: StateMachineIndex> DhtPio<P, STI> {
let (int, frac) = (125, 0);
let (mut sm, rx, tx) = rp2040_hal::pio::PIOBuilder::from_program(installed)
.out_pins(pin.id().num, 1)
.set_pins(pin.id().num, 1)
.in_pin_base(pin.id().num)
.clock_divisor_fixed_point(int, frac)
.push_threshold(32)
.build(sm);