From aa2249454975a203e459597005944f5370c1d200 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Thu, 27 Jul 2017 11:40:15 -0500 Subject: update tests and examples with task! gone 3 types of errors / gotchas have been eliminated :tada: --- examples/nested.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'examples/nested.rs') diff --git a/examples/nested.rs b/examples/nested.rs index fda2a7d..2cb23f9 100644 --- a/examples/nested.rs +++ b/examples/nested.rs @@ -8,7 +8,6 @@ #![feature(proc_macro)] #![no_std] -#[macro_use(task)] extern crate cortex_m_rtfm as rtfm; extern crate stm32f103xx; @@ -26,18 +25,21 @@ app! { tasks: { EXTI0: { enabled: true, + path: exti0, priority: 1, resources: [LOW, HIGH], }, EXTI1: { enabled: true, + path: exti1, priority: 2, resources: [LOW], }, EXTI2: { enabled: true, + path: exti2, priority: 3, resources: [HIGH], }, @@ -58,8 +60,6 @@ fn idle() -> ! { } } -task!(EXTI0, exti0); - fn exti0(t: &mut Threshold, r: EXTI0::Resources) { // because this task has a priority of 1 the preemption threshold is also 1 @@ -113,15 +113,11 @@ fn exti0(t: &mut Threshold, r: EXTI0::Resources) { // ~> exti1 } -task!(EXTI1, exti1); - fn exti1(_t: &mut Threshold, _r: EXTI1::Resources) { // B, H rtfm::bkpt(); } -task!(EXTI2, exti2); - fn exti2(_t: &mut Threshold, _r: EXTI2::Resources) { // D, G rtfm::bkpt(); -- cgit v1.2.3