Skip to content

Commit

Permalink
Bump dependency versions
Browse files Browse the repository at this point in the history
  • Loading branch information
schteve committed Jan 28, 2024
1 parent ffca212 commit 0f901af
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ categories = ["embedded", "hardware-support", "no-std"]

[dependencies]
cortex-m = { version = "0.7.7", features = ["critical-section-single-core"] }
embedded-hal = "0.2.7"
embedded-hal = "1.0.0"
stm32f4xx-hal = { version = "0.20.0", features = ["stm32f446"]}
switch-hal = "0.4.0"
stm32f4xx-hal = { version = "0.13.2", features = ["stm32f446"]}
unwrap-infallible = "0.1.5"

[dev-dependencies]
cortex-m-rt = "0.7.1"
panic-probe = { version = "0.3.0", features = ["print-rtt"] }
cortex-m-rt = "0.7.3"
panic-probe = { version = "0.3.1", features = ["print-rtt"] }

[profile.release]
codegen-units = 1 # better optimizations
Expand Down
2 changes: 1 addition & 1 deletion examples/blinky.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#![no_main]

use cortex_m_rt::entry;
use embedded_hal::blocking::delay::DelayMs;
use embedded_hal::delay::DelayNs;
use nucleo_f446re::{led::LedDigital, Nucleo};
use panic_probe as _;

Expand Down
2 changes: 1 addition & 1 deletion examples/blinky_fade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#![no_main]

use cortex_m_rt::entry;
use embedded_hal::blocking::delay::DelayMs;
use embedded_hal::delay::DelayNs;
use nucleo_f446re::{led::LedAnalog, Nucleo};
use panic_probe as _;

Expand Down
2 changes: 1 addition & 1 deletion examples/blinky_fade_direct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#![no_main]

use cortex_m_rt::entry;
use embedded_hal::blocking::delay::DelayMs;
use embedded_hal::delay::DelayNs;
use nucleo_f446re::led::LedAnalog;
use panic_probe as _;
use stm32f4xx_hal::prelude::*;
Expand Down
5 changes: 3 additions & 2 deletions src/led.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use stm32f4xx_hal::{
pac::TIM2,
prelude::*,
rcc::Clocks,
timer::PwmChannel,
timer::{Channel1, PwmChannel},
};
use switch_hal::{ActiveHigh, IntoSwitch, OutputSwitch, Switch, ToggleableOutputSwitch};
use unwrap_infallible::UnwrapInfallible;
Expand Down Expand Up @@ -66,7 +66,8 @@ impl LedAnalog {
/// Since each pin can only be moved once, effectively this is a singleton.
#[must_use]
pub fn new(pin: PA5<Input>, tim: TIM2, clocks: &Clocks) -> Self {
let mut pwm_ch1 = tim.pwm_hz(pin.into_alternate(), 20.kHz(), clocks).split();
let channel = Channel1::new(pin.into_alternate());
let mut pwm_ch1 = tim.pwm_hz(channel, 20.kHz(), clocks).split();
pwm_ch1.set_duty(0);
pwm_ch1.enable();
Self(pwm_ch1)
Expand Down

0 comments on commit 0f901af

Please sign in to comment.