diff options
Diffstat (limited to 'examples/t-spawn.rs')
-rw-r--r-- | examples/t-spawn.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/t-spawn.rs b/examples/t-spawn.rs index 35831ccf..efb748bc 100644 --- a/examples/t-spawn.rs +++ b/examples/t-spawn.rs @@ -8,12 +8,14 @@ use panic_halt as _; #[rtic::app(device = lm3s6965)] -const APP: () = { +mod app { #[init(spawn = [foo, bar, baz])] - fn init(c: init::Context) { + fn init(c: init::Context) -> init::LateResources { let _: Result<(), ()> = c.spawn.foo(); let _: Result<(), u32> = c.spawn.bar(0); let _: Result<(), (u32, u32)> = c.spawn.baz(0, 1); + + init::LateResources {} } #[idle(spawn = [foo, bar, baz])] @@ -60,4 +62,4 @@ const APP: () = { extern "C" { fn SSI0(); } -}; +} |