diff options
author | 2017-07-27 17:08:42 -0500 | |
---|---|---|
committer | 2017-07-27 17:08:42 -0500 | |
commit | d396da59502ef67f624bb4d8927ff8697232f66c (patch) | |
tree | 264e29e59cf4fe119fb82481b9c6949c579e8399 /examples | |
parent | ad2a523cf9d39191d54f4dda3c99f22b5bade7de (diff) | |
download | rtic-d396da59502ef67f624bb4d8927ff8697232f66c.tar.gz rtic-d396da59502ef67f624bb4d8927ff8697232f66c.tar.zst rtic-d396da59502ef67f624bb4d8927ff8697232f66c.zip |
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 918a2e67..184349bf 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 7c261d54..6c6e1d6e 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 313ebc49..6bdf8d9a 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 2cb23f95..92f90cbf 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 e1176958..057e4fd9 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 7343137d..42b91e4a 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], |