diff --git a/examples/rtic2-tick.rs b/examples/rtic2-tick.rs index 930c8f50..f7b9b5ba 100644 --- a/examples/rtic2-tick.rs +++ b/examples/rtic2-tick.rs @@ -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; @@ -12,7 +17,8 @@ use stm32f4xx_hal::{ }; type Mono = stm32f4xx_hal::timer::MonoTimerUs; -// 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); @@ -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"]