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/ramfunc.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'examples/ramfunc.rs') diff --git a/examples/ramfunc.rs b/examples/ramfunc.rs index b3b8012..dd1f76e 100644 --- a/examples/ramfunc.rs +++ b/examples/ramfunc.rs @@ -3,7 +3,7 @@ #![deny(warnings)] #![no_main] #![no_std] - +#![feature(type_alias_impl_trait)] use panic_semihosting as _; #[rtic::app( @@ -24,15 +24,15 @@ mod app { struct Local {} #[init] - fn init(_: init::Context) -> (Shared, Local, init::Monotonics) { + fn init(_: init::Context) -> (Shared, Local) { foo::spawn().unwrap(); - (Shared {}, Local {}, init::Monotonics()) + (Shared {}, Local {}) } #[inline(never)] #[task] - fn foo(_: foo::Context) { + async fn foo(_: foo::Context) { hprintln!("foo").unwrap(); debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator @@ -42,7 +42,7 @@ mod app { #[inline(never)] #[link_section = ".data.bar"] #[task(priority = 2)] - fn bar(_: bar::Context) { + async fn bar(_: bar::Context) { foo::spawn().unwrap(); } } -- cgit v1.2.3