mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-18 13:55:23 +01:00
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
This commit is contained in:
parent
6196984d6d
commit
eef4e7bf79
6 changed files with 33 additions and 5 deletions
|
|
@ -34,6 +34,10 @@ first appear in the `schedule` argument of the context attribute. When
|
|||
scheduling a task the (user-defined) `Instant` at which the task should be
|
||||
executed must be passed as the first argument of the `schedule` invocation.
|
||||
|
||||
Additionally, the chosen `monotonic` timer must be configured and initialized
|
||||
during the `#[init]** phase. Note that this is *also* the case if you choose to
|
||||
use the `CYCCNT` provided by the `cortex-m-rtfm` crate.
|
||||
|
||||
The example below schedules two tasks from `init`: `foo` and `bar`. `foo` is
|
||||
scheduled to run 8 million clock cycles in the future. Next, `bar` is scheduled
|
||||
to run 4 million clock cycles in the future. Thus `bar` runs before `foo` since
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue