aboutsummaryrefslogtreecommitdiff
path: root/examples/not-send.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/not-send.rs')
-rw-r--r--examples/not-send.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/examples/not-send.rs b/examples/not-send.rs
index 16a874dc..18071fc5 100644
--- a/examples/not-send.rs
+++ b/examples/not-send.rs
@@ -16,16 +16,21 @@ pub struct NotSend {
}
#[app(device = lm3s6965)]
-const APP: () = {
+mod app {
+ use super::NotSend;
+
+ #[resources]
struct Resources {
#[init(None)]
shared: Option<NotSend>,
}
#[init(spawn = [baz, quux])]
- fn init(c: init::Context) {
+ fn init(c: init::Context) -> init::LateResources {
c.spawn.baz().unwrap();
c.spawn.quux().unwrap();
+
+ init::LateResources {}
}
#[task(spawn = [bar])]
@@ -60,4 +65,4 @@ const APP: () = {
fn SSI0();
fn QEI0();
}
-};
+}