aboutsummaryrefslogtreecommitdiff
path: root/examples/lock.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/lock.rs')
-rw-r--r--examples/lock.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/examples/lock.rs b/examples/lock.rs
index 5e3bce25..669b1aed 100644
--- a/examples/lock.rs
+++ b/examples/lock.rs
@@ -10,15 +10,18 @@ use lm3s6965::Interrupt;
use panic_semihosting as _;
#[rtic::app(device = lm3s6965)]
-const APP: () = {
+mod app {
+ #[resources]
struct Resources {
#[init(0)]
shared: u32,
}
#[init]
- fn init(_: init::Context) {
+ fn init(_: init::Context) -> init::LateResources {
rtic::pend(Interrupt::GPIOA);
+
+ init::LateResources {}
}
// when omitted priority is assumed to be `1`
@@ -59,4 +62,4 @@ const APP: () = {
fn gpioc(_: gpioc::Context) {
hprintln!("C").unwrap();
}
-};
+}