diff options
| author | Emil Fresk <emil.fresk@gmail.com> | 2021-10-31 10:09:40 +0100 |
|---|---|---|
| committer | Emil Fresk <emil.fresk@gmail.com> | 2021-11-09 10:20:43 +0100 |
| commit | 0dcb0c4e497b23bf68b7ac0d3d918ab3d3c209be (patch) | |
| tree | fa4dd3f228dd643d0a989aaae512bf33bc90c291 /examples/periodic.rs | |
| parent | ae034aec14bf44e83e2720c81b98031d38992133 (diff) | |
New monotonic trait working
Diffstat (limited to 'examples/periodic.rs')
| -rw-r--r-- | examples/periodic.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/periodic.rs b/examples/periodic.rs index 3066def..495054e 100644 --- a/examples/periodic.rs +++ b/examples/periodic.rs @@ -10,8 +10,7 @@ use panic_semihosting as _; #[rtic::app(device = lm3s6965, dispatchers = [SSI0])] mod app { use cortex_m_semihosting::{debug, hprintln}; - use rtic::time::duration::*; - use systick_monotonic::Systick; + use systick_monotonic::*; #[monotonic(binds = SysTick, default = true)] type MyMono = Systick<100>; // 100 Hz / 10 ms granularity @@ -28,7 +27,7 @@ mod app { let mono = Systick::new(systick, 12_000_000); - foo::spawn_after(1.seconds()).unwrap(); + foo::spawn_after(1.secs()).unwrap(); (Shared {}, Local {}, init::Monotonics(mono)) } @@ -43,6 +42,6 @@ mod app { } // Periodic ever 1 seconds - foo::spawn_after(1.seconds()).unwrap(); + foo::spawn_after(1.secs()).unwrap(); } } |
