Skip to content

Commit

Permalink
Merge pull request #814 from Lotterleben/rtic2-blinky-mono-doc
Browse files Browse the repository at this point in the history
rtic2-tick: clarify SysTick mono instructions
  • Loading branch information
burrbull authored Oct 13, 2024
2 parents 704aa09 + a595a01 commit 6e7240d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions examples/rtic2-tick.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
#![no_std]
#![feature(type_alias_impl_trait)]

//Add this to Cargo.toml if you want to use SysTick as monotonic timer
//[dependencies.rtic-monotonics]
//version = "2.0"
//features = ["cortex-m-systick"]

use defmt_rtt as _;
use panic_probe as _;
use rtic_time::Monotonic;
Expand All @@ -12,7 +17,8 @@ use stm32f4xx_hal::{
};
type Mono = stm32f4xx_hal::timer::MonoTimerUs<pac::TIM3>;

// Uncomment if use SysTick as monotonic timer
// To use SysTick as monotonic timer, uncomment the lines below
// *and* remove the Mono type alias above
//use rtic_monotonics::systick::prelude::*;
//systick_monotonic!(Mono, 1000);

Expand Down Expand Up @@ -59,8 +65,3 @@ mod app {
}
}
}

//Add this to Cargo.toml if use SysTick as monotonic timer
//[dependencies.rtic-monotonics]
//version = "2.0"
//features = ["cortex-m-systick"]

0 comments on commit 6e7240d

Please sign in to comment.