From 7614b96fe45240dafe91ae549e712b560e2d4c10 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Sat, 31 Dec 2022 14:45:13 +0100 Subject: RTIC v2: Initial commit rtic-syntax is now part of RTIC repository --- macros/ui/local-collision.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 macros/ui/local-collision.rs (limited to 'macros/ui/local-collision.rs') diff --git a/macros/ui/local-collision.rs b/macros/ui/local-collision.rs new file mode 100644 index 0000000..7dbe976 --- /dev/null +++ b/macros/ui/local-collision.rs @@ -0,0 +1,21 @@ +#![no_main] + +#[rtic_macros::mock_app(device = mock)] +mod app { + #[shared] + struct Shared {} + + #[local] + struct Local { + a: u32, + } + + #[task(local = [a])] + fn foo(_: foo::Context) {} + + #[task(local = [a: u8 = 3])] + fn bar(_: bar::Context) {} + + #[init] + fn init(_: init::Context) -> (Shared, Local, init::Monotonics) {} +} -- cgit v1.2.3