diff options
| author | Henrik Tjäder <henrik@tjaders.com> | 2023-01-22 13:11:29 +0100 |
|---|---|---|
| committer | Henrik Tjäder <henrik@tjaders.com> | 2023-01-22 13:38:43 +0100 |
| commit | 800904a1054639a090ef92e9b1e7c884ea9863e0 (patch) | |
| tree | 78116f26ecca6292174b97c8781f9278f14e306f /examples | |
| parent | 259be7bbf9cfa0ac24c276190515e988d98770b7 (diff) | |
Handle more cfgs, support cfg on HW/SW tasks
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 b5b9783..17f31f4 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) { |
