mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-18 13:55:23 +01:00
check task priority at compile time
before we were checking the priority at runtime. The compile time error message when the priority is too high is kind of awful though.
This commit is contained in:
parent
8da925647e
commit
aa7eec0299
5 changed files with 55 additions and 6 deletions
|
|
@ -69,6 +69,13 @@ the critical section created by the lowest priority handler.
|
|||
$ cargo run --example lock
|
||||
{{#include ../../../../ci/expected/lock.run}}```
|
||||
|
||||
One more note about priorities: choosing a priority higher than what the device
|
||||
supports (that is `1 << NVIC_PRIO_BITS`) will result in a compile error. Due to
|
||||
limitations in the language the error is currently far from helpful: it will say
|
||||
something along the lines of "evaluation of constant value failed" and the span
|
||||
of the error will *not* point out to the problematic interrupt value -- we are
|
||||
sorry about this!
|
||||
|
||||
## Late resources
|
||||
|
||||
Unlike normal `static` variables, which need to be assigned an initial value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue