mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-12-01 16:04:33 +01:00
Merge #407
407: Fixed spawn and timer queue docs r=AfoHT a=korken89 Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
This commit is contained in:
commit
c6a8477b9b
2 changed files with 3 additions and 7 deletions
|
@ -6,15 +6,13 @@ application from any execution context.
|
|||
|
||||
Software tasks can also be assigned priorities and, under the hood, are
|
||||
dispatched from interrupt handlers. RTIC requires that free interrupts are
|
||||
declared in an `extern` block when using software tasks; some of these free
|
||||
declared in the `dispatchers` app argument when using software tasks; some of these free
|
||||
interrupts will be used to dispatch the software tasks. An advantage of software
|
||||
tasks over hardware tasks is that many tasks can be mapped to a single interrupt
|
||||
handler.
|
||||
|
||||
Software tasks are also declared using the `task` attribute but the `binds`
|
||||
argument must be omitted. To be able to spawn a software task from a context
|
||||
the name of the task must appear in the `spawn` argument of the context
|
||||
attribute (`init`, `idle`, `task`, etc.).
|
||||
argument must be omitted.
|
||||
|
||||
The example below showcases three software tasks that run at 2 different
|
||||
priorities. The three software tasks are mapped to 2 interrupts handlers.
|
||||
|
|
|
@ -29,9 +29,7 @@ on the built-in CYCle CouNTer (CYCCNT). Note that this is a 32-bit timer clocked
|
|||
at the frequency of the CPU and as such it is not suitable for tracking time
|
||||
spans in the order of seconds.
|
||||
|
||||
To be able to schedule a software task from a context the name of the task must
|
||||
first appear in the `schedule` argument of the context attribute. When
|
||||
scheduling a task the (user-defined) `Instant` at which the task should be
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue