aboutsummaryrefslogtreecommitdiff
path: root/heterogeneous/examples/x-init.rs
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge@japaric.io> 2019-07-10 22:42:44 +0200
committerGravatar Jorge Aparicio <jorge@japaric.io> 2019-07-10 22:42:44 +0200
commit9195038c87703fc94b6e99f6de593886d51c2b19 (patch)
tree56855952357fe5bb689504ed8a6348dc3c1f3718 /heterogeneous/examples/x-init.rs
parent14d63f496118f4243f28ddf3218523aa36a80322 (diff)
downloadrtic-9195038c87703fc94b6e99f6de593886d51c2b19.tar.gz
rtic-9195038c87703fc94b6e99f6de593886d51c2b19.tar.zst
rtic-9195038c87703fc94b6e99f6de593886d51c2b19.zip
implement RFC #212
Diffstat (limited to 'heterogeneous/examples/x-init.rs')
-rw-r--r--heterogeneous/examples/x-init.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/heterogeneous/examples/x-init.rs b/heterogeneous/examples/x-init.rs
index 53e73805..41837134 100644
--- a/heterogeneous/examples/x-init.rs
+++ b/heterogeneous/examples/x-init.rs
@@ -9,18 +9,18 @@ use panic_halt as _;
#[rtfm::app(cores = 2, device = heterogeneous)]
const APP: () = {
- extern "C" {
- static mut X: u32;
- static mut Y: u32;
+ struct Resources {
+ x: u32,
+ y: u32,
}
- #[init(core = 0, late = [X])]
+ #[init(core = 0, late = [x])]
fn a(_: a::Context) -> a::LateResources {
- a::LateResources { X: 0 }
+ a::LateResources { x: 0 }
}
#[init(core = 1)]
fn b(_: b::Context) -> b::LateResources {
- b::LateResources { Y: 0 }
+ b::LateResources { y: 0 }
}
};