aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge@japaric.io> 2017-07-27 17:08:42 -0500
committerGravatar Jorge Aparicio <jorge@japaric.io> 2017-07-27 17:08:42 -0500
commitd396da59502ef67f624bb4d8927ff8697232f66c (patch)
tree264e29e59cf4fe119fb82481b9c6949c579e8399 /examples
parentad2a523cf9d39191d54f4dda3c99f22b5bade7de (diff)
downloadrtic-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.rs4
-rw-r--r--examples/generics.rs2
-rw-r--r--examples/modules.rs3
-rw-r--r--examples/nested.rs3
-rw-r--r--examples/preemption.rs1
-rw-r--r--examples/two-tasks.rs1
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],
d>Gravatar Jarred Sumner 1-0/+3 2022-12-03[fetch] Fix bug where .arrayBuffer() on an empty Response body returned a `Ui...Gravatar Jarred Sumner 1-1/+1 2022-12-03Don't invalidate previous file descriptro to avoid tripping assertionGravatar Jarred Sumner 1-5/+0 2022-12-03miscGravatar Jarred Sumner 3-1/+31 2022-12-03Add missing typeGravatar Jarred Sumner 1-0/+5 2022-12-03`process.stdout` and `process.stderr`Gravatar Jarred Sumner 15-564/+1537 2022-12-03simdutf ascii validation is about 20% faster on arm64 than our zig simd @Vect...Gravatar Jarred Sumner 1-0/+3 2022-12-03typo in readme (#1576)Gravatar Reed Jones 1-2/+2