Skip to content

Commit 6e7240d

Browse files
authored
Merge pull request #814 from Lotterleben/rtic2-blinky-mono-doc
rtic2-tick: clarify SysTick mono instructions
2 parents 704aa09 + a595a01 commit 6e7240d

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

examples/rtic2-tick.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
#![no_std]
33
#![feature(type_alias_impl_trait)]
44

5+
//Add this to Cargo.toml if you want to use SysTick as monotonic timer
6+
//[dependencies.rtic-monotonics]
7+
//version = "2.0"
8+
//features = ["cortex-m-systick"]
9+
510
use defmt_rtt as _;
611
use panic_probe as _;
712
use rtic_time::Monotonic;
@@ -12,7 +17,8 @@ use stm32f4xx_hal::{
1217
};
1318
type Mono = stm32f4xx_hal::timer::MonoTimerUs<pac::TIM3>;
1419

15-
// Uncomment if use SysTick as monotonic timer
20+
// To use SysTick as monotonic timer, uncomment the lines below
21+
// *and* remove the Mono type alias above
1622
//use rtic_monotonics::systick::prelude::*;
1723
//systick_monotonic!(Mono, 1000);
1824

@@ -59,8 +65,3 @@ mod app {
5965
}
6066
}
6167
}
62-
63-
//Add this to Cargo.toml if use SysTick as monotonic timer
64-
//[dependencies.rtic-monotonics]
65-
//version = "2.0"
66-
//features = ["cortex-m-systick"]

0 commit comments

Comments
 (0)