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/generics.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'examples/generics.rs') diff --git a/examples/generics.rs b/examples/generics.rs index 335d159..7c261d5 100644 --- a/examples/generics.rs +++ b/examples/generics.rs @@ -4,7 +4,6 @@ #![feature(proc_macro)] #![no_std] -#[macro_use(task)] extern crate cortex_m_rtfm as rtfm; extern crate stm32f103xx; @@ -17,12 +16,14 @@ app! { tasks: { EXTI0: { enabled: true, + path: exti0, priority: 1, resources: [GPIOA, SPI1], }, EXTI1: { enabled: true, + path: exti1, priority: 2, resources: [GPIOA, SPI1], }, @@ -54,15 +55,11 @@ where }); } -task!(EXTI0, exti0); - // this task needs critical sections to access the resources fn exti0(t: &mut Threshold, r: EXTI0::Resources) { work(t, &r.GPIOA, &r.SPI1); } -task!(EXTI1, exti1); - // this task has direct access to the resources fn exti1(t: &mut Threshold, r: EXTI1::Resources) { work(t, r.GPIOA, r.SPI1); -- cgit v1.2.3