mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-16 12:55:23 +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
|
|
@ -21,7 +21,6 @@ app! {
|
|||
|
||||
tasks: {
|
||||
EXTI0: {
|
||||
enabled: true,
|
||||
path: exti0,
|
||||
priority: 1,
|
||||
resources: [ON],
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ use rtfm::app;
|
|||
|
||||
app! {
|
||||
//~^ error proc macro panicked
|
||||
//~| help parsing
|
||||
device: stm32f103xx,
|
||||
|
||||
tasks: {
|
||||
|
|
|
|||
|
|
@ -7,9 +7,7 @@ extern crate stm32f103xx;
|
|||
|
||||
use rtfm::app;
|
||||
|
||||
app! {
|
||||
//~^ error no associated item named `SYS_TICK` found for type
|
||||
//~| error no associated item named `SYS_TICK` found for type
|
||||
app! { //~ error proc macro panicked
|
||||
device: stm32f103xx,
|
||||
|
||||
tasks: {
|
||||
|
|
|
|||
|
|
@ -7,14 +7,14 @@ extern crate stm32f103xx;
|
|||
|
||||
use rtfm::app;
|
||||
|
||||
app! { //~ error no associated item named `EXTI0` found for type
|
||||
app! {
|
||||
//~^ error no associated item named `EXTI33` found for type
|
||||
//~| error no associated item named `EXTI33` found for type
|
||||
device: stm32f103xx,
|
||||
|
||||
tasks: {
|
||||
// ERROR `enabled` needs to be specified for interrupts
|
||||
EXTI0: {
|
||||
priority: 1,
|
||||
},
|
||||
// ERROR this interrupt doesn't exist
|
||||
EXTI33: {},
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,21 +18,18 @@ app! {
|
|||
|
||||
tasks: {
|
||||
EXTI0: {
|
||||
enabled: true,
|
||||
path: exti0,
|
||||
priority: 1,
|
||||
resources: [MAX, ON],
|
||||
},
|
||||
|
||||
EXTI1: {
|
||||
enabled: true,
|
||||
path: exti1,
|
||||
priority: 2,
|
||||
resources: [ON],
|
||||
},
|
||||
|
||||
EXTI2: {
|
||||
enabled: true,
|
||||
path: exti2,
|
||||
priority: 16,
|
||||
resources: [MAX],
|
||||
|
|
|
|||
|
|
@ -17,14 +17,12 @@ app! {
|
|||
|
||||
tasks: {
|
||||
EXTI0: {
|
||||
enabled: true,
|
||||
path: exti0,
|
||||
priority: 1,
|
||||
resources: [STATE],
|
||||
},
|
||||
|
||||
EXTI1: {
|
||||
enabled: true,
|
||||
path: exti1,
|
||||
priority: 2,
|
||||
resources: [STATE],
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ app! { //~ error bound `rtfm::Threshold: core::marker::Send` is not satisfied
|
|||
|
||||
tasks: {
|
||||
EXTI0: {
|
||||
enabled: true,
|
||||
path: exti0,
|
||||
priority: 1,
|
||||
resources: [TOKEN],
|
||||
|
|
|
|||
|
|
@ -18,14 +18,12 @@ app! {
|
|||
|
||||
tasks: {
|
||||
EXTI0: {
|
||||
enabled: true,
|
||||
path: exti0,
|
||||
priority: 1,
|
||||
resources: [A, B],
|
||||
},
|
||||
|
||||
EXTI1: {
|
||||
enabled: true,
|
||||
path: exti1,
|
||||
priority: 2,
|
||||
resources: [A, B],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue