Update new example to use mod {}

This commit is contained in:
Henrik Tjäder 2020-09-25 13:24:53 +00:00
parent 5b17f8b599
commit 224e1991e0
2 changed files with 4 additions and 3 deletions

View file

@ -9,7 +9,8 @@ use panic_semihosting as _;
use rtic::cyccnt::U32Ext; use rtic::cyccnt::U32Ext;
#[rtic::app(device = lm3s6965, monotonic = rtic::cyccnt::CYCCNT)] #[rtic::app(device = lm3s6965, monotonic = rtic::cyccnt::CYCCNT)]
const APP: () = { mod app {
struct Resources { struct Resources {
nothing: (), nothing: (),
} }
@ -34,4 +35,4 @@ const APP: () = {
extern "C" { extern "C" {
fn SSI0(); fn SSI0();
} }
}; }

View file

@ -23,7 +23,7 @@ mod app {
// The feature needs to be applied everywhere x is defined or used // The feature needs to be applied everywhere x is defined or used
#[cfg(feature = "feature_x")] #[cfg(feature = "feature_x")]
x: 0, x: 0,
dummy: () // dummy such that we have at least one late resource dummy: (), // dummy such that we have at least one late resource
} }
} }