diff options
| author | Jorge Aparicio <jorge@japaric.io> | 2017-07-27 11:40:15 -0500 |
|---|---|---|
| committer | Jorge Aparicio <jorge@japaric.io> | 2017-07-27 11:40:15 -0500 |
| commit | aa2249454975a203e459597005944f5370c1d200 (patch) | |
| tree | b6cf75b34302cf7681712c82bffa2841631ef998 /examples/nested.rs | |
| parent | 0b5afce771cb9e5cc42c4fd4c5e18f020bf1ecad (diff) | |
update tests and examples
with task! gone 3 types of errors / gotchas have been eliminated :tada:
Diffstat (limited to 'examples/nested.rs')
| -rw-r--r-- | examples/nested.rs | 10 |
1 files changed, 3 insertions, 7 deletions
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(); |
