diff options
author | 2019-10-16 19:07:28 +0000 | |
---|---|---|
committer | 2019-10-16 19:07:28 +0000 | |
commit | 47e4d999072ade9447616a91fbce61561810c75b (patch) | |
tree | 8f5a1dbf40bcedd583a9fd51404b2ace1b823fb7 /examples/baseline.rs | |
parent | 8a1f009c34b8cad3f7478aa67432fc60d47be4c0 (diff) | |
parent | 1ccacf2102fb306867c0afb35d6d5dab43f75baf (diff) | |
download | rtic-47e4d999072ade9447616a91fbce61561810c75b.tar.gz rtic-47e4d999072ade9447616a91fbce61561810c75b.tar.zst rtic-47e4d999072ade9447616a91fbce61561810c75b.zip |
Merge #255
255: more monotonic timer docs r=nils-grepit a=japaric
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
cc @jonas-schievink
(EDIT: yay, pull request number 0xFF)
Co-authored-by: Jorge Aparicio <jorge@japaric.io>
Diffstat (limited to 'examples/baseline.rs')
-rw-r--r-- | examples/baseline.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/baseline.rs b/examples/baseline.rs index b7144dd1..df0ff9a4 100644 --- a/examples/baseline.rs +++ b/examples/baseline.rs @@ -14,6 +14,8 @@ use panic_semihosting as _; const APP: () = { #[init(spawn = [foo])] fn init(cx: init::Context) { + // omitted: initialization of `CYCCNT` + hprintln!("init(baseline = {:?})", cx.start).unwrap(); // `foo` inherits the baseline of `init`: `Instant(0)` |