aboutsummaryrefslogtreecommitdiff
path: root/macros/ui/task-init.rs
diff options
context:
space:
mode:
Diffstat (limited to 'macros/ui/task-init.rs')
-rw-r--r--macros/ui/task-init.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/macros/ui/task-init.rs b/macros/ui/task-init.rs
new file mode 100644
index 00000000..bab38050
--- /dev/null
+++ b/macros/ui/task-init.rs
@@ -0,0 +1,17 @@
+#![no_main]
+
+#[rtic_macros::mock_app(device = mock)]
+mod app {
+ #[shared]
+ struct Shared {}
+
+ #[local]
+ struct Local {}
+
+ #[init]
+ fn foo(_: foo::Context) -> (Shared, Local, foo::Monotonics) {}
+
+ // name collides with `#[idle]` function
+ #[task]
+ fn foo(_: foo::Context) {}
+}