diff options
Diffstat (limited to 'examples/generics.rs')
-rw-r--r-- | examples/generics.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/examples/generics.rs b/examples/generics.rs index 335d159b..7c261d54 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); |