Skip to content

Commit

Permalink
Merge pull request #401 from quartiq/dependabot/cargo/rtic-monotonics…
Browse files Browse the repository at this point in the history
…-2.0.1

Bump rtic-monotonics from 1.5.0 to 2.0.1
  • Loading branch information
ryan-summers authored Jun 20, 2024
2 parents 82e608f + 907f055 commit 2b0556d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
12 changes: 7 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fugit = "0.3"
rtic-sync = "1"
sequential-storage = "0.6"
rtic = {version = "2.1", features = ["thumbv7-backend"] }
rtic-monotonics = { version = "1.5", features = ["cortex-m-systick"] }
rtic-monotonics = { version = "2.0", features = ["cortex-m-systick"] }
rand_core = "0.6"
mono-clock = "0.1"
cortex-m-log = { version = "0.8.0", features = ["log-integration"] }
Expand Down
2 changes: 1 addition & 1 deletion src/hardware/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub mod usb;
pub mod user_interface;

pub const MONOTONIC_FREQUENCY: u32 = 1_000;
pub type Systick = rtic_monotonics::systick::Systick;
rtic_monotonics::systick_monotonic!(Systick, MONOTONIC_FREQUENCY);
pub type SystemTimer = mono_clock::MonoClock<u32, MONOTONIC_FREQUENCY>;

pub const CPU_FREQ: u32 = 168_000_000;
Expand Down
3 changes: 1 addition & 2 deletions src/hardware/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@ pub fn setup(
.require_pll48clk()
.freeze();

let mono_token = rtic_monotonics::create_systick_token!();
Systick::start(core.SYST, clocks.sysclk().to_Hz(), mono_token);
Systick::start(core.SYST, clocks.sysclk().to_Hz());

// Start the watchdog during the initialization process.
let mut watchdog = hal::watchdog::IndependentWatchdog::new(device.IWDG);
Expand Down

0 comments on commit 2b0556d

Please sign in to comment.