mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-16 21:05:35 +01:00
make task.$T.enabled optional
and move the logic that differentiates interrupts from exceptions from the crate to the procedural macro logic
This commit is contained in:
parent
ad2a523cf9
commit
d396da5950
17 changed files with 112 additions and 92 deletions
|
|
@ -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],
|
||||
|
|
|
|||
|
|
@ -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],
|
||||
|
|
|
|||
|
|
@ -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],
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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],
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ app! {
|
|||
},
|
||||
|
||||
TIM2: {
|
||||
enabled: true,
|
||||
path: tim2,
|
||||
priority: 1,
|
||||
resources: [COUNTER],
|
||||
|
|
|
|||
|
|
@ -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],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue