From 9a4f97ca5ebf19e6612115db5c763d0d61dd28a1 Mon Sep 17 00:00:00 2001 From: Per Lindgren Date: Sat, 7 Jan 2023 17:59:39 +0100 Subject: more examples --- examples/t-cfg-resources.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'examples/t-cfg-resources.rs') diff --git a/examples/t-cfg-resources.rs b/examples/t-cfg-resources.rs index 99c97ba..0174f33 100644 --- a/examples/t-cfg-resources.rs +++ b/examples/t-cfg-resources.rs @@ -20,7 +20,7 @@ mod app { struct Local {} #[init] - fn init(_: init::Context) -> (Shared, Local, init::Monotonics) { + fn init(_: init::Context) -> (Shared, Local) { debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator ( @@ -29,7 +29,6 @@ mod app { x: 0, }, Local {}, - init::Monotonics(), ) } -- cgit v1.2.3 From b8b881f446a226d6f3c4a7db7c9174590b47dbf6 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Thu, 19 Jan 2023 13:56:59 +0100 Subject: Fix so deny(missing_docs) work --- examples/t-cfg-resources.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'examples/t-cfg-resources.rs') diff --git a/examples/t-cfg-resources.rs b/examples/t-cfg-resources.rs index 0174f33..0328700 100644 --- a/examples/t-cfg-resources.rs +++ b/examples/t-cfg-resources.rs @@ -1,7 +1,8 @@ //! [compile-pass] check that `#[cfg]` attributes applied on resources work -//! + #![no_main] #![no_std] +#![deny(missing_docs)] use panic_semihosting as _; -- cgit v1.2.3 From 306aa47170fd59369b7a184924e287dc3706d64d Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Mon, 23 Jan 2023 20:05:47 +0100 Subject: Add rtic-timer (timerqueue + monotonic) and rtic-monotonics (systick-monotonic) --- examples/t-cfg-resources.rs | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 examples/t-cfg-resources.rs (limited to 'examples/t-cfg-resources.rs') diff --git a/examples/t-cfg-resources.rs b/examples/t-cfg-resources.rs deleted file mode 100644 index 0328700..0000000 --- a/examples/t-cfg-resources.rs +++ /dev/null @@ -1,42 +0,0 @@ -//! [compile-pass] check that `#[cfg]` attributes applied on resources work - -#![no_main] -#![no_std] -#![deny(missing_docs)] - -use panic_semihosting as _; - -#[rtic::app(device = lm3s6965)] -mod app { - use cortex_m_semihosting::debug; - - #[shared] - struct Shared { - // A conditionally compiled resource behind feature_x - #[cfg(feature = "feature_x")] - x: u32, - } - - #[local] - struct Local {} - - #[init] - fn init(_: init::Context) -> (Shared, Local) { - debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator - - ( - Shared { - #[cfg(feature = "feature_x")] - x: 0, - }, - Local {}, - ) - } - - #[idle] - fn idle(_cx: idle::Context) -> ! { - loop { - cortex_m::asm::nop(); - } - } -} -- cgit v1.2.3