aboutsummaryrefslogtreecommitdiff
path: root/ui/single/resources-cfg.rs
diff options
context:
space:
mode:
authorDaniel Carosone <Daniel.Carosone@gmail.com>2020-10-07 09:22:38 +1100
committerDaniel Carosone <Daniel.Carosone@gmail.com>2020-10-07 09:22:38 +1100
commitf386cb63cb6d3cd6642debfb4dc1bde97b325550 (patch)
tree30b21968997f809dbbba59117db93254607fa22d /ui/single/resources-cfg.rs
parent3d6a0ea64fb2661ee1150a84425f50c18c2de9ad (diff)
parentb1e1abae29591e50ebf345a2bd249a73e564cea9 (diff)
Merge branch 'master'
of https://github.com/rtic-rs/cortex-m-rtic
Diffstat (limited to 'ui/single/resources-cfg.rs')
-rw-r--r--ui/single/resources-cfg.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/ui/single/resources-cfg.rs b/ui/single/resources-cfg.rs
index df7ac80..2ba65a0 100644
--- a/ui/single/resources-cfg.rs
+++ b/ui/single/resources-cfg.rs
@@ -1,7 +1,9 @@
#![no_main]
+use panic_halt as _;
#[rtic::app(device = lm3s6965)]
-const APP: () = {
+mod app {
+ #[resources]
struct Resources {
#[cfg(never)]
#[init(0)]
@@ -41,12 +43,14 @@ const APP: () = {
}
#[init(resources = [o1, o4, o5, o6, s3])]
- fn init(c: init::Context) {
+ fn init(c: init::Context) -> init::LateResources {
c.resources.o1;
c.resources.o4;
c.resources.o5;
c.resources.o6;
c.resources.s3;
+
+ init::LateResources {}
}
#[idle(resources = [o2, &o4, s1, &s3])]
@@ -72,4 +76,4 @@ const APP: () = {
c.resources.s2;
c.resources.o5;
}
-};
+}