diff options
author | 2020-10-07 09:22:38 +1100 | |
---|---|---|
committer | 2020-10-07 09:22:38 +1100 | |
commit | f386cb63cb6d3cd6642debfb4dc1bde97b325550 (patch) | |
tree | 30b21968997f809dbbba59117db93254607fa22d /examples/t-cfg-resources.rs | |
parent | 3d6a0ea64fb2661ee1150a84425f50c18c2de9ad (diff) | |
parent | b1e1abae29591e50ebf345a2bd249a73e564cea9 (diff) | |
download | rtic-f386cb63cb6d3cd6642debfb4dc1bde97b325550.tar.gz rtic-f386cb63cb6d3cd6642debfb4dc1bde97b325550.tar.zst rtic-f386cb63cb6d3cd6642debfb4dc1bde97b325550.zip |
Merge branch 'master'
of https://github.com/rtic-rs/cortex-m-rtic
Diffstat (limited to 'examples/t-cfg-resources.rs')
-rw-r--r-- | examples/t-cfg-resources.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/examples/t-cfg-resources.rs b/examples/t-cfg-resources.rs index 4f7fd635..61eb4c7b 100644 --- a/examples/t-cfg-resources.rs +++ b/examples/t-cfg-resources.rs @@ -6,19 +6,17 @@ use panic_halt as _; #[rtic::app(device = lm3s6965)] -const APP: () = { +mod app { + #[resources] struct Resources { // A resource #[init(0)] shared: u32, - // A conditionally compiled resource behind feature_x #[cfg(feature = "feature_x")] x: u32, - - dummy: (), + dummy: (), // dummy such that we have at least one late resource } - #[init] fn init(_: init::Context) -> init::LateResources { init::LateResources { @@ -35,4 +33,4 @@ const APP: () = { cortex_m::asm::nop(); } } -}; +} |