aboutsummaryrefslogtreecommitdiff
path: root/examples/ramfunc.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ramfunc.rs')
-rw-r--r--examples/ramfunc.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/examples/ramfunc.rs b/examples/ramfunc.rs
index 37ea82a7..4b0d69c7 100644
--- a/examples/ramfunc.rs
+++ b/examples/ramfunc.rs
@@ -8,18 +8,17 @@
extern crate panic_semihosting;
use cortex_m_semihosting::{debug, hprintln};
-use rtfm::app;
-#[app(device = lm3s6965)]
+#[rtfm::app(device = lm3s6965)]
const APP: () = {
#[init(spawn = [bar])]
- fn init() {
- spawn.bar().unwrap();
+ fn init(c: init::Context) {
+ c.spawn.bar().unwrap();
}
#[inline(never)]
#[task]
- fn foo() {
+ fn foo(_: foo::Context) {
hprintln!("foo").unwrap();
debug::exit(debug::EXIT_SUCCESS);
@@ -29,8 +28,8 @@ const APP: () = {
#[inline(never)]
#[link_section = ".data.bar"]
#[task(priority = 2, spawn = [foo])]
- fn bar() {
- spawn.foo().unwrap();
+ fn bar(c: bar::Context) {
+ c.spawn.foo().unwrap();
}
extern "C" {