diff options
Diffstat (limited to 'examples/t-cfg.rs')
-rw-r--r-- | examples/t-cfg.rs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/examples/t-cfg.rs b/examples/t-cfg.rs index 52e6d1c9..3da20d4e 100644 --- a/examples/t-cfg.rs +++ b/examples/t-cfg.rs @@ -6,7 +6,8 @@ use panic_halt as _; #[rtic::app(device = lm3s6965, monotonic = rtic::cyccnt::CYCCNT)] -const APP: () = { +mod app { + #[resources] struct Resources { #[cfg(never)] #[init(0)] @@ -14,9 +15,11 @@ const APP: () = { } #[init] - fn init(_: init::Context) { + fn init(_: init::Context) -> init::LateResources { #[cfg(never)] static mut BAR: u32 = 0; + + init::LateResources {} } #[idle] @@ -24,7 +27,9 @@ const APP: () = { #[cfg(never)] static mut BAR: u32 = 0; - loop {} + loop { + cortex_m::asm::nop(); + } } #[task(resources = [foo], schedule = [quux], spawn = [quux])] @@ -50,4 +55,4 @@ const APP: () = { fn SSI0(); fn QEI0(); } -}; +} |