From 81275bfa4f41e2066770087f3a33cad4227eab41 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Thu, 13 Jun 2019 23:56:59 +0200 Subject: rtfm-syntax refactor + heterogeneous multi-core support --- examples/baseline.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'examples/baseline.rs') diff --git a/examples/baseline.rs b/examples/baseline.rs index d743107..cc9b412 100644 --- a/examples/baseline.rs +++ b/examples/baseline.rs @@ -5,13 +5,12 @@ #![no_main] #![no_std] -extern crate panic_semihosting; - use cortex_m_semihosting::{debug, hprintln}; use lm3s6965::Interrupt; +use panic_semihosting as _; // NOTE: does NOT properly work on QEMU -#[rtfm::app(device = lm3s6965)] +#[rtfm::app(device = lm3s6965, monotonic = rtfm::cyccnt::CYCCNT)] const APP: () = { #[init(spawn = [foo])] fn init(c: init::Context) { -- cgit v1.2.3 From 4e51bb68b976c6bb6a9a989dc560d2a8123a84ca Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Thu, 20 Jun 2019 06:19:59 +0200 Subject: RFC #207 --- examples/baseline.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/baseline.rs') diff --git a/examples/baseline.rs b/examples/baseline.rs index cc9b412..3a8ab0e 100644 --- a/examples/baseline.rs +++ b/examples/baseline.rs @@ -35,8 +35,8 @@ const APP: () = { } } - #[interrupt(spawn = [foo])] - fn UART0(c: UART0::Context) { + #[task(binds = UART0, spawn = [foo])] + fn uart0(c: uart0::Context) { hprintln!("UART0(baseline = {:?})", c.start).unwrap(); // `foo` inherits the baseline of `UART0`: its `start` time -- cgit v1.2.3 From 07b2b4d83078d0fd260d5f0812e8d5a34d02b793 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Wed, 21 Aug 2019 10:17:27 +0200 Subject: doc up --- examples/baseline.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'examples/baseline.rs') diff --git a/examples/baseline.rs b/examples/baseline.rs index 3a8ab0e..b7144dd 100644 --- a/examples/baseline.rs +++ b/examples/baseline.rs @@ -13,18 +13,18 @@ use panic_semihosting as _; #[rtfm::app(device = lm3s6965, monotonic = rtfm::cyccnt::CYCCNT)] const APP: () = { #[init(spawn = [foo])] - fn init(c: init::Context) { - hprintln!("init(baseline = {:?})", c.start).unwrap(); + fn init(cx: init::Context) { + hprintln!("init(baseline = {:?})", cx.start).unwrap(); // `foo` inherits the baseline of `init`: `Instant(0)` - c.spawn.foo().unwrap(); + cx.spawn.foo().unwrap(); } #[task(schedule = [foo])] - fn foo(c: foo::Context) { + fn foo(cx: foo::Context) { static mut ONCE: bool = true; - hprintln!("foo(baseline = {:?})", c.scheduled).unwrap(); + hprintln!("foo(baseline = {:?})", cx.scheduled).unwrap(); if *ONCE { *ONCE = false; @@ -36,11 +36,11 @@ const APP: () = { } #[task(binds = UART0, spawn = [foo])] - fn uart0(c: uart0::Context) { - hprintln!("UART0(baseline = {:?})", c.start).unwrap(); + fn uart0(cx: uart0::Context) { + hprintln!("UART0(baseline = {:?})", cx.start).unwrap(); // `foo` inherits the baseline of `UART0`: its `start` time - c.spawn.foo().unwrap(); + cx.spawn.foo().unwrap(); } extern "C" { -- cgit v1.2.3