aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/cfg.rs1
-rw-r--r--examples/destructure.rs1
-rw-r--r--examples/generics.rs1
-rw-r--r--examples/late.rs1
-rw-r--r--examples/lock.rs1
-rw-r--r--examples/not-send.rs1
-rw-r--r--examples/not-sync.rs1
-rw-r--r--examples/only-shared-access.rs1
-rw-r--r--examples/resource.rs1
-rw-r--r--examples/shared-with-init.rs1
-rw-r--r--examples/t-cfg-resources.rs2
-rw-r--r--examples/t-cfg.rs1
-rw-r--r--examples/t-late-not-send.rs1
-rw-r--r--examples/t-resource.rs1
-rw-r--r--examples/types.rs1
15 files changed, 15 insertions, 1 deletions
diff --git a/examples/cfg.rs b/examples/cfg.rs
index 16e6e077..f4848302 100644
--- a/examples/cfg.rs
+++ b/examples/cfg.rs
@@ -12,6 +12,7 @@ use panic_semihosting as _;
#[rtic::app(device = lm3s6965)]
mod app {
+ #[resources]
struct Resources {
#[cfg(debug_assertions)] // <- `true` when using the `dev` profile
#[init(0)]
diff --git a/examples/destructure.rs b/examples/destructure.rs
index 131c07fb..45d73195 100644
--- a/examples/destructure.rs
+++ b/examples/destructure.rs
@@ -11,6 +11,7 @@ use panic_semihosting as _;
#[rtic::app(device = lm3s6965)]
mod app {
+ #[resources]
struct Resources {
// Some resources to work with
#[init(0)]
diff --git a/examples/generics.rs b/examples/generics.rs
index 20e9ed7f..c65e6518 100644
--- a/examples/generics.rs
+++ b/examples/generics.rs
@@ -12,6 +12,7 @@ use rtic::{Exclusive, Mutex};
#[rtic::app(device = lm3s6965)]
mod app {
+ #[resources]
struct Resources {
#[init(0)]
shared: u32,
diff --git a/examples/late.rs b/examples/late.rs
index 2b99e3dc..761c68f5 100644
--- a/examples/late.rs
+++ b/examples/late.rs
@@ -21,6 +21,7 @@ mod app {
spsc::{Consumer, Producer},
};
// Late resources
+ #[resources]
struct Resources {
p: Producer<'static, u32, U4>,
c: Consumer<'static, u32, U4>,
diff --git a/examples/lock.rs b/examples/lock.rs
index 61aed213..6ce61dc6 100644
--- a/examples/lock.rs
+++ b/examples/lock.rs
@@ -11,6 +11,7 @@ use panic_semihosting as _;
#[rtic::app(device = lm3s6965)]
mod app {
+ #[resources]
struct Resources {
#[init(0)]
shared: u32,
diff --git a/examples/not-send.rs b/examples/not-send.rs
index c0582d76..45f7e4e7 100644
--- a/examples/not-send.rs
+++ b/examples/not-send.rs
@@ -19,6 +19,7 @@ pub struct NotSend {
mod app {
use super::NotSend;
+ #[resources]
struct Resources {
#[init(None)]
shared: Option<NotSend>,
diff --git a/examples/not-sync.rs b/examples/not-sync.rs
index 28c76183..75816424 100644
--- a/examples/not-sync.rs
+++ b/examples/not-sync.rs
@@ -19,6 +19,7 @@ mod app {
use super::NotSync;
use core::marker::PhantomData;
+ #[resources]
struct Resources {
#[init(NotSync { _0: PhantomData })]
shared: NotSync,
diff --git a/examples/only-shared-access.rs b/examples/only-shared-access.rs
index 221cc307..91d0b7ad 100644
--- a/examples/only-shared-access.rs
+++ b/examples/only-shared-access.rs
@@ -11,6 +11,7 @@ use panic_semihosting as _;
#[rtic::app(device = lm3s6965)]
mod app {
+ #[resources]
struct Resources {
key: u32,
}
diff --git a/examples/resource.rs b/examples/resource.rs
index 4887b5ef..4cd0f4ca 100644
--- a/examples/resource.rs
+++ b/examples/resource.rs
@@ -11,6 +11,7 @@ use panic_semihosting as _;
#[rtic::app(device = lm3s6965)]
mod app {
+ #[resources]
struct Resources {
// A resource
#[init(0)]
diff --git a/examples/shared-with-init.rs b/examples/shared-with-init.rs
index 9c4499ee..9f7e26aa 100644
--- a/examples/shared-with-init.rs
+++ b/examples/shared-with-init.rs
@@ -16,6 +16,7 @@ pub struct MustBeSend;
mod app {
use super::MustBeSend;
+ #[resources]
struct Resources {
#[init(None)]
shared: Option<MustBeSend>,
diff --git a/examples/t-cfg-resources.rs b/examples/t-cfg-resources.rs
index 190b32c2..61eb4c7b 100644
--- a/examples/t-cfg-resources.rs
+++ b/examples/t-cfg-resources.rs
@@ -7,6 +7,7 @@ use panic_halt as _;
#[rtic::app(device = lm3s6965)]
mod app {
+ #[resources]
struct Resources {
// A resource
#[init(0)]
@@ -16,7 +17,6 @@ mod app {
x: u32,
dummy: (), // dummy such that we have at least one late resource
}
-
#[init]
fn init(_: init::Context) -> init::LateResources {
init::LateResources {
diff --git a/examples/t-cfg.rs b/examples/t-cfg.rs
index 7caabe2c..3deb107c 100644
--- a/examples/t-cfg.rs
+++ b/examples/t-cfg.rs
@@ -7,6 +7,7 @@ use panic_halt as _;
#[rtic::app(device = lm3s6965, monotonic = rtic::cyccnt::CYCCNT)]
mod app {
+ #[resources]
struct Resources {
#[cfg(never)]
#[init(0)]
diff --git a/examples/t-late-not-send.rs b/examples/t-late-not-send.rs
index 587ee73c..345d9aef 100644
--- a/examples/t-late-not-send.rs
+++ b/examples/t-late-not-send.rs
@@ -15,6 +15,7 @@ pub struct NotSend {
mod app {
use super::NotSend;
+ #[resources]
struct Resources {
x: NotSend,
#[init(None)]
diff --git a/examples/t-resource.rs b/examples/t-resource.rs
index e18a1cd7..94b527fa 100644
--- a/examples/t-resource.rs
+++ b/examples/t-resource.rs
@@ -9,6 +9,7 @@ use panic_halt as _;
#[rtic::app(device = lm3s6965)]
mod app {
+ #[resources]
struct Resources {
#[init(0)]
o1: u32, // init
diff --git a/examples/types.rs b/examples/types.rs
index 8c612b21..cd7e8a2f 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,