From 9e445b3583c15c7701f3167eaa8dfe4afd541691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Sat, 4 Feb 2023 16:47:17 +0100 Subject: Move rtic macros to repo root, tune xtask --- rtic-macros/ui/local-shared-attribute.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 rtic-macros/ui/local-shared-attribute.rs (limited to 'rtic-macros/ui/local-shared-attribute.rs') diff --git a/rtic-macros/ui/local-shared-attribute.rs b/rtic-macros/ui/local-shared-attribute.rs new file mode 100644 index 0000000..c594b5f --- /dev/null +++ b/rtic-macros/ui/local-shared-attribute.rs @@ -0,0 +1,21 @@ +#![no_main] + +#[rtic_macros::mock_app(device = mock)] +mod app { + #[shared] + struct Shared {} + + #[local] + struct Local {} + + #[init] + fn init(_: init::Context) -> (Shared, Local) {} + + #[task(local = [ + #[test] + a: u32 = 0, // Ok + #[test] + b, // Error + ])] + fn foo(_: foo::Context) {} +} -- cgit v1.2.3