aboutsummaryrefslogtreecommitdiff
path: root/examples/task-local-minimal.rs
diff options
context:
space:
mode:
authorGravatar Per Lindgren <per.lindgren@ltu.se> 2021-03-11 23:27:54 +0100
committerGravatar Per Lindgren <per.lindgren@ltu.se> 2021-03-11 23:27:54 +0100
commit4b370c3d602a1e43d0bc4f1c8deff629e838c784 (patch)
treecf42cbe5ff7a8b799cfbb4a97e83a1ec0c6d3612 /examples/task-local-minimal.rs
parentfc1c9bda3fcb5070a2b22f3fc5c1d81a0ff051f6 (diff)
downloadrtic-4b370c3d602a1e43d0bc4f1c8deff629e838c784.tar.gz
rtic-4b370c3d602a1e43d0bc4f1c8deff629e838c784.tar.zst
rtic-4b370c3d602a1e43d0bc4f1c8deff629e838c784.zip
added .no to not yet supported examples
Diffstat (limited to '')
-rw-r--r--examples/task-local-minimal.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/task-local-minimal.rs b/examples/task-local-minimal.rs
index f83493c2..29132f00 100644
--- a/examples/task-local-minimal.rs
+++ b/examples/task-local-minimal.rs
@@ -1,6 +1,6 @@
//! examples/task-local_minimal.rs
#![deny(unsafe_code)]
-#![deny(warnings)]
+//#![deny(warnings)]
#![no_main]
#![no_std]
@@ -14,18 +14,18 @@ mod app {
struct Resources {
// A local (move), late resource
#[task_local]
- l: u32,
+ task_local: u32,
}
#[init]
fn init(_: init::Context) -> (init::LateResources, init::Monotonics) {
- (init::LateResources { l: 42 }, init::Monotonics())
+ (init::LateResources { task_local: 42 }, init::Monotonics())
}
- // l is task_local
- #[idle(resources =[l])]
+ // task_local is task_local
+ #[idle(resources =[task_local])]
fn idle(cx: idle::Context) -> ! {
- hprintln!("IDLE:l = {}", cx.resources.l).unwrap();
+ hprintln!("IDLE:l = {}", cx.resources.task_local).unwrap();
debug::exit(debug::EXIT_SUCCESS);
loop {
cortex_m::asm::nop();