aboutsummaryrefslogtreecommitdiff
path: root/examples/late.rs
diff options
context:
space:
mode:
authorJorge Aparicio <jorge@japaric.io>2019-02-12 15:08:46 +0100
committerJorge Aparicio <jorge@japaric.io>2019-02-12 15:08:46 +0100
commit89c922079eaefc748febdb62aeccfff598a07c69 (patch)
treeeebd97bd85976b5aa962353e2a48590e57557447 /examples/late.rs
parent88599780e0eba38d9e543b7809f586479f6956bd (diff)
update examples and tests
Diffstat (limited to 'examples/late.rs')
-rw-r--r--examples/late.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/late.rs b/examples/late.rs
index be65640..622008a 100644
--- a/examples/late.rs
+++ b/examples/late.rs
@@ -22,7 +22,7 @@ const APP: () = {
static mut C: Consumer<'static, u32, U4> = ();
#[init]
- fn init() {
+ fn init() -> init::LateResources {
// NOTE: we use `Option` here to work around the lack of
// a stable `const` constructor
static mut Q: Option<Queue<u32, U4>> = None;
@@ -31,8 +31,7 @@ const APP: () = {
let (p, c) = Q.as_mut().unwrap().split();
// Initialization of late resources
- P = p;
- C = c;
+ init::LateResources { P: p, C: c }
}
#[idle(resources = [C])]