diff options
author | 2023-01-25 20:34:49 +0000 | |
---|---|---|
committer | 2023-01-25 20:34:49 +0000 | |
commit | d43c2b64cc726ff093d418d45d89226dd76e4e55 (patch) | |
tree | b525e1eb26b158b2761c17d2ea7af3fe0cf4a79d /examples | |
parent | a601c6e449e7222dcfe73bc2f2c41c95b99b46d7 (diff) | |
parent | 800904a1054639a090ef92e9b1e7c884ea9863e0 (diff) | |
download | rtic-d43c2b64cc726ff093d418d45d89226dd76e4e55.tar.gz rtic-d43c2b64cc726ff093d418d45d89226dd76e4e55.tar.zst rtic-d43c2b64cc726ff093d418d45d89226dd76e4e55.zip |
Merge #692
692: CFG: Support HW tasks, cleanup for SW tasks r=korken89 a=AfoHT
Fixes #665
Co-authored-by: Henrik Tjäder <henrik@tjaders.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/cfg-whole-task.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/cfg-whole-task.rs b/examples/cfg-whole-task.rs index b5b97831..17f31f4e 100644 --- a/examples/cfg-whole-task.rs +++ b/examples/cfg-whole-task.rs @@ -82,6 +82,19 @@ mod app { // .. } + // The whole task should disappear, + // currently still present in the Tasks enum + #[cfg(never)] + #[task(binds = UART1, shared = [count])] + fn foo3(mut _cx: foo3::Context) { + #[cfg(debug_assertions)] + { + _cx.shared.count.lock(|count| *count += 10); + + log::spawn(_cx.shared.count.lock(|count| *count)).unwrap(); + } + } + #[cfg(debug_assertions)] #[task(capacity = 2)] fn log(_: log::Context, n: u32) { |