diff options
author | 2019-07-10 22:42:44 +0200 | |
---|---|---|
committer | 2019-07-10 22:42:44 +0200 | |
commit | 9195038c87703fc94b6e99f6de593886d51c2b19 (patch) | |
tree | 56855952357fe5bb689504ed8a6348dc3c1f3718 /homogeneous/examples/x-init.rs | |
parent | 14d63f496118f4243f28ddf3218523aa36a80322 (diff) | |
download | rtic-9195038c87703fc94b6e99f6de593886d51c2b19.tar.gz rtic-9195038c87703fc94b6e99f6de593886d51c2b19.tar.zst rtic-9195038c87703fc94b6e99f6de593886d51c2b19.zip |
implement RFC #212
Diffstat (limited to 'homogeneous/examples/x-init.rs')
-rw-r--r-- | homogeneous/examples/x-init.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/homogeneous/examples/x-init.rs b/homogeneous/examples/x-init.rs index 5089e385..c359901c 100644 --- a/homogeneous/examples/x-init.rs +++ b/homogeneous/examples/x-init.rs @@ -9,18 +9,18 @@ use panic_halt as _; #[rtfm::app(cores = 2, device = homogeneous)] 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 } } }; |