From d396da59502ef67f624bb4d8927ff8697232f66c Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Thu, 27 Jul 2017 17:08:42 -0500 Subject: make task.$T.enabled optional and move the logic that differentiates interrupts from exceptions from the crate to the procedural macro logic --- tests/cfail/critical-section.rs | 1 - tests/cfail/duplicated-task.rs | 1 - tests/cfail/exception.rs | 4 +--- tests/cfail/interrupt.rs | 10 +++++----- tests/cfail/lock.rs | 3 --- tests/cfail/token-outlive.rs | 2 -- tests/cfail/token-transfer.rs | 1 - tests/cfail/wrong-threshold.rs | 2 -- 8 files changed, 6 insertions(+), 18 deletions(-) (limited to 'tests/cfail') diff --git a/tests/cfail/critical-section.rs b/tests/cfail/critical-section.rs index 7e73fd3..728388e 100644 --- a/tests/cfail/critical-section.rs +++ b/tests/cfail/critical-section.rs @@ -21,7 +21,6 @@ app! { tasks: { EXTI0: { - enabled: true, path: exti0, priority: 1, resources: [ON], diff --git a/tests/cfail/duplicated-task.rs b/tests/cfail/duplicated-task.rs index a167576..d91f09b 100644 --- a/tests/cfail/duplicated-task.rs +++ b/tests/cfail/duplicated-task.rs @@ -9,7 +9,6 @@ use rtfm::app; app! { //~^ error proc macro panicked - //~| help parsing device: stm32f103xx, tasks: { diff --git a/tests/cfail/exception.rs b/tests/cfail/exception.rs index 1428bcc..065ccad 100644 --- a/tests/cfail/exception.rs +++ b/tests/cfail/exception.rs @@ -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: { diff --git a/tests/cfail/interrupt.rs b/tests/cfail/interrupt.rs index 2969d1f..c70528f 100644 --- a/tests/cfail/interrupt.rs +++ b/tests/cfail/interrupt.rs @@ -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: {}, }, } diff --git a/tests/cfail/lock.rs b/tests/cfail/lock.rs index 8e6da46..e0e37e0 100644 --- a/tests/cfail/lock.rs +++ b/tests/cfail/lock.rs @@ -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], diff --git a/tests/cfail/token-outlive.rs b/tests/cfail/token-outlive.rs index dc9112e..31231b7 100644 --- a/tests/cfail/token-outlive.rs +++ b/tests/cfail/token-outlive.rs @@ -17,14 +17,12 @@ app! { tasks: { EXTI0: { - enabled: true, path: exti0, priority: 1, resources: [STATE], }, EXTI1: { - enabled: true, path: exti1, priority: 2, resources: [STATE], diff --git a/tests/cfail/token-transfer.rs b/tests/cfail/token-transfer.rs index b8bcc00..d10b82b 100644 --- a/tests/cfail/token-transfer.rs +++ b/tests/cfail/token-transfer.rs @@ -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], diff --git a/tests/cfail/wrong-threshold.rs b/tests/cfail/wrong-threshold.rs index 57d6d30..c9459af 100644 --- a/tests/cfail/wrong-threshold.rs +++ b/tests/cfail/wrong-threshold.rs @@ -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], -- cgit v1.2.3