diff options
author | 2019-04-21 20:10:40 +0200 | |
---|---|---|
committer | 2019-05-01 20:49:25 +0200 | |
commit | 1b4b006bab7ee05e403a4fc48ae751d037f95b1a (patch) | |
tree | 62d7e7ebf3f8fc6fff10cf92cb1623a025163006 /examples/not-sync.rs | |
parent | a452700628e352e6ac01da9e16223a47752ca860 (diff) | |
download | rtic-1b4b006bab7ee05e403a4fc48ae751d037f95b1a.tar.gz rtic-1b4b006bab7ee05e403a4fc48ae751d037f95b1a.tar.zst rtic-1b4b006bab7ee05e403a4fc48ae751d037f95b1a.zip |
update examples
Diffstat (limited to 'examples/not-sync.rs')
-rw-r--r-- | examples/not-sync.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/examples/not-sync.rs b/examples/not-sync.rs index d94e0a04..bc714065 100644 --- a/examples/not-sync.rs +++ b/examples/not-sync.rs @@ -10,29 +10,28 @@ extern crate panic_halt; use core::marker::PhantomData; use cortex_m_semihosting::debug; -use rtfm::app; pub struct NotSync { _0: PhantomData<*const ()>, } -#[app(device = lm3s6965)] +#[rtfm::app(device = lm3s6965)] const APP: () = { static SHARED: NotSync = NotSync { _0: PhantomData }; #[init] - fn init() { + fn init(_: init::Context) { debug::exit(debug::EXIT_SUCCESS); } #[task(resources = [SHARED])] - fn foo() { - let _: &NotSync = resources.SHARED; + fn foo(c: foo::Context) { + let _: &NotSync = c.resources.SHARED; } #[task(resources = [SHARED])] - fn bar() { - let _: &NotSync = resources.SHARED; + fn bar(c: bar::Context) { + let _: &NotSync = c.resources.SHARED; } extern "C" { |