diff options
| author | Jorge Aparicio <jorge@japaric.io> | 2017-07-27 17:08:42 -0500 |
|---|---|---|
| committer | Jorge Aparicio <jorge@japaric.io> | 2017-07-27 17:08:42 -0500 |
| commit | d396da59502ef67f624bb4d8927ff8697232f66c (patch) | |
| tree | 264e29e59cf4fe119fb82481b9c6949c579e8399 /examples | |
| parent | ad2a523cf9d39191d54f4dda3c99f22b5bade7de (diff) | |
make task.$T.enabled optional
and move the logic that differentiates interrupts from exceptions from the crate
to the procedural macro logic
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/full-syntax.rs | 4 | ||||
| -rw-r--r-- | examples/generics.rs | 2 | ||||
| -rw-r--r-- | examples/modules.rs | 3 | ||||
| -rw-r--r-- | examples/nested.rs | 3 | ||||
| -rw-r--r-- | examples/preemption.rs | 1 | ||||
| -rw-r--r-- | examples/two-tasks.rs | 1 |
6 files changed, 3 insertions, 11 deletions
diff --git a/examples/full-syntax.rs b/examples/full-syntax.rs index 918a2e6..184349b 100644 --- a/examples/full-syntax.rs +++ b/examples/full-syntax.rs @@ -37,7 +37,9 @@ app! { }, TIM2: { - enabled: true, + // tasks are enabled, between `init` and `idle`, by default but they + // can start disabled if `false` is specified here + enabled: false, path: tim2, priority: 1, resources: [CO_OWNED], diff --git a/examples/generics.rs b/examples/generics.rs index 7c261d5..6c6e1d6 100644 --- a/examples/generics.rs +++ b/examples/generics.rs @@ -15,14 +15,12 @@ app! { tasks: { EXTI0: { - enabled: true, path: exti0, priority: 1, resources: [GPIOA, SPI1], }, EXTI1: { - enabled: true, path: exti1, priority: 2, resources: [GPIOA, SPI1], diff --git a/examples/modules.rs b/examples/modules.rs index 313ebc4..6bdf8d9 100644 --- a/examples/modules.rs +++ b/examples/modules.rs @@ -31,14 +31,11 @@ app! { tasks: { SYS_TICK: { path: tasks::sys_tick, - priority: 1, resources: [CO_OWNED, ON, SHARED], }, TIM2: { - enabled: true, path: tasks::tim2, - priority: 1, resources: [CO_OWNED], }, }, diff --git a/examples/nested.rs b/examples/nested.rs index 2cb23f9..92f90cb 100644 --- a/examples/nested.rs +++ b/examples/nested.rs @@ -24,21 +24,18 @@ 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], diff --git a/examples/preemption.rs b/examples/preemption.rs index e117695..057e4fd 100644 --- a/examples/preemption.rs +++ b/examples/preemption.rs @@ -25,7 +25,6 @@ app! { }, TIM2: { - enabled: true, path: tim2, priority: 1, resources: [COUNTER], diff --git a/examples/two-tasks.rs b/examples/two-tasks.rs index 7343137..42b91e4 100644 --- a/examples/two-tasks.rs +++ b/examples/two-tasks.rs @@ -33,7 +33,6 @@ app! { // For interrupts the `enabled` field must be specified. It // indicates if the interrupt will be enabled or disabled once // `idle` starts - enabled: true, path: tim2, priority: 1, resources: [COUNTER], |
