From 8df2ec11b0ee3209678dcc1b1a5baa479fa1dfe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Wed, 22 Apr 2020 10:58:14 +0000 Subject: Examples using mod instead of const --- examples/types.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/types.rs') diff --git a/examples/types.rs b/examples/types.rs index 5233f86..eafc9b1 100644 --- a/examples/types.rs +++ b/examples/types.rs @@ -10,7 +10,7 @@ use panic_semihosting as _; use rtic::cyccnt; #[rtic::app(device = lm3s6965, peripherals = true, monotonic = rtic::cyccnt::CYCCNT)] -const APP: () = { +mod APP { struct Resources { #[init(0)] shared: u32, @@ -60,4 +60,4 @@ const APP: () = { extern "C" { fn SSI0(); } -}; +} -- cgit v1.2.3 From 5cfd9b92384a6e2d352e35de9da1b7a2b53cc2ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Tue, 19 May 2020 18:00:13 +0000 Subject: Modules using lower-case in examples --- examples/types.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/types.rs') diff --git a/examples/types.rs b/examples/types.rs index eafc9b1..8c612b2 100644 --- a/examples/types.rs +++ b/examples/types.rs @@ -10,7 +10,7 @@ use panic_semihosting as _; use rtic::cyccnt; #[rtic::app(device = lm3s6965, peripherals = true, monotonic = rtic::cyccnt::CYCCNT)] -mod APP { +mod app { struct Resources { #[init(0)] shared: u32, -- cgit v1.2.3 From 96df0a33b1096e807bdd15713b10c2f3fa39395c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Thu, 4 Jun 2020 15:24:21 +0000 Subject: All examples use #[resources] attribute --- examples/types.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'examples/types.rs') diff --git a/examples/types.rs b/examples/types.rs index 8c612b2..cd7e8a2 100644 --- a/examples/types.rs +++ b/examples/types.rs @@ -11,6 +11,7 @@ use rtic::cyccnt; #[rtic::app(device = lm3s6965, peripherals = true, monotonic = rtic::cyccnt::CYCCNT)] mod app { + #[resources] struct Resources { #[init(0)] shared: u32, -- cgit v1.2.3 From e7f0d9c3e3fad77dace2ce63af02559fda46cb73 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Thu, 1 Oct 2020 19:38:49 +0200 Subject: Now late resources are always used --- examples/types.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'examples/types.rs') diff --git a/examples/types.rs b/examples/types.rs index 5233f86..46d08b8 100644 --- a/examples/types.rs +++ b/examples/types.rs @@ -17,7 +17,7 @@ const APP: () = { } #[init(schedule = [foo], spawn = [foo])] - fn init(cx: init::Context) { + fn init(cx: init::Context) -> init::LateResources { let _: cyccnt::Instant = cx.start; let _: rtic::Peripherals = cx.core; let _: lm3s6965::Peripherals = cx.device; @@ -25,6 +25,8 @@ const APP: () = { let _: init::Spawn = cx.spawn; debug::exit(debug::EXIT_SUCCESS); + + init::LateResources {} } #[idle(schedule = [foo], spawn = [foo])] -- cgit v1.2.3