aboutsummaryrefslogtreecommitdiff
path: root/examples/common.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-12-26 11:43:54 +0000
committerGitHub <noreply@github.com>2021-12-26 11:43:54 +0000
commitf9902681474a8d203a5ba4209d788c30b27f5db5 (patch)
tree2277aed0fbe783870dd94d25f5cdb28bb6323e13 /examples/common.rs
parent5a4bcae1fb5c4cac7201e1f1a2bc131ca68d3952 (diff)
parent7bec2347663d0a8c361f48adae7a2fa7e84abede (diff)
Merge #573
573: Improved docs on where the 12 MHz comes from in SysTick r=perlindgren a=korken89 Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
Diffstat (limited to 'examples/common.rs')
-rw-r--r--examples/common.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/common.rs b/examples/common.rs
index 26a5c8f..1fe671e 100644
--- a/examples/common.rs
+++ b/examples/common.rs
@@ -33,6 +33,8 @@ mod app {
#[init]
fn init(cx: init::Context) -> (Shared, Local, init::Monotonics) {
let systick = cx.core.SYST;
+
+ // Initialize the monotonic (SysTick rate in QEMU is 12 MHz)
let mono = Systick::new(systick, 12_000_000);
// Spawn the task `foo` directly after `init` finishes