aboutsummaryrefslogtreecommitdiff
path: root/examples/type-usage.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/type-usage.rs')
-rw-r--r--examples/type-usage.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/type-usage.rs b/examples/type-usage.rs
index 9bb7eb8d..e5a088f0 100644
--- a/examples/type-usage.rs
+++ b/examples/type-usage.rs
@@ -10,6 +10,17 @@ use rtic::app;
mod app {
type Test = u32;
+ #[shared]
+ struct Shared {}
+
+ #[local]
+ struct Local {}
+
+ #[init]
+ fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {
+ (Shared {}, Local {}, init::Monotonics {})
+ }
+
#[task]
fn t1(_: t1::Context, _val: Test) {}
}