diff options
author | 2019-10-15 18:44:49 -0500 | |
---|---|---|
committer | 2019-10-15 18:44:49 -0500 | |
commit | eef4e7bf7908d2a99c8d797d6f9d2ac3717e2b63 (patch) | |
tree | 1d2a7d49ce5443fcc06ab7cad39c7c8907789a70 /examples/periodic.rs | |
parent | 6196984d6d75be987d3dec3bf17909e3cd40c15b (diff) | |
download | rtic-eef4e7bf7908d2a99c8d797d6f9d2ac3717e2b63.tar.gz rtic-eef4e7bf7908d2a99c8d797d6f9d2ac3717e2b63.tar.zst rtic-eef4e7bf7908d2a99c8d797d6f9d2ac3717e2b63.zip |
more monotonic timer docs
covers
- initialization and configuration of the timer; this is now a responsibility of
the application author
- correctness of `Monotonic::now()` in `#[init]`
- safety of `Monotonic::reset()`
closes #251
Diffstat (limited to '')
-rw-r--r-- | examples/periodic.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/periodic.rs b/examples/periodic.rs index ec110e11..dca0ad56 100644 --- a/examples/periodic.rs +++ b/examples/periodic.rs @@ -16,6 +16,8 @@ const PERIOD: u32 = 8_000_000; const APP: () = { #[init(schedule = [foo])] fn init(cx: init::Context) { + // omitted: initialization of `CYCCNT` + cx.schedule.foo(Instant::now() + PERIOD.cycles()).unwrap(); } |