diff options
author | 2020-10-05 18:25:15 +0200 | |
---|---|---|
committer | 2020-10-05 18:25:15 +0200 | |
commit | eec0908024d9b4127ed496b4781adc08000cc2c2 (patch) | |
tree | f128b3d91ea4ac0f171ab334d4517552a6803d01 /examples/t-cfg-resources.rs | |
parent | 9d2598dc071882a94b813ab1d9ddf49092546257 (diff) | |
parent | f493f21359ccb3ab4643d9470f3581532f47593a (diff) | |
download | rtic-eec0908024d9b4127ed496b4781adc08000cc2c2.tar.gz rtic-eec0908024d9b4127ed496b4781adc08000cc2c2.tar.zst rtic-eec0908024d9b4127ed496b4781adc08000cc2c2.zip |
Merge branch 'master' into always_late_resources
Diffstat (limited to 'examples/t-cfg-resources.rs')
-rw-r--r-- | examples/t-cfg-resources.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/examples/t-cfg-resources.rs b/examples/t-cfg-resources.rs index 4f7fd635..61eb4c7b 100644 --- a/examples/t-cfg-resources.rs +++ b/examples/t-cfg-resources.rs @@ -6,19 +6,17 @@ use panic_halt as _; #[rtic::app(device = lm3s6965)] -const APP: () = { +mod app { + #[resources] struct Resources { // A resource #[init(0)] shared: u32, - // A conditionally compiled resource behind feature_x #[cfg(feature = "feature_x")] x: u32, - - dummy: (), + dummy: (), // dummy such that we have at least one late resource } - #[init] fn init(_: init::Context) -> init::LateResources { init::LateResources { @@ -35,4 +33,4 @@ const APP: () = { cortex_m::asm::nop(); } } -}; +} |