aboutsummaryrefslogtreecommitdiff
path: root/tests/cfail/cfg-resources.rs
diff options
context:
space:
mode:
authorJorge Aparicio <jorge@japaric.io>2019-09-15 17:09:40 +0000
committerGitHub <noreply@github.com>2019-09-15 17:09:40 +0000
commit4ff28e9d13e845abf39c662643ae2ff5df57ec16 (patch)
tree7d9770cd357e584d85ef6ddc32bddd1a937d1020 /tests/cfail/cfg-resources.rs
parentfafeeb27270ef24fc3852711c6032f65aa7dbcc0 (diff)
parent7aa270cb92180abfc9102a69efdde378c3396b5e (diff)
Merge pull request #205 from japaric/heterogeneous
rtfm-syntax refactor + heterogeneous multi-core support
Diffstat (limited to 'tests/cfail/cfg-resources.rs')
-rw-r--r--tests/cfail/cfg-resources.rs64
1 files changed, 0 insertions, 64 deletions
diff --git a/tests/cfail/cfg-resources.rs b/tests/cfail/cfg-resources.rs
deleted file mode 100644
index 5e20c4d..0000000
--- a/tests/cfail/cfg-resources.rs
+++ /dev/null
@@ -1,64 +0,0 @@
-#![no_main]
-#![no_std]
-
-extern crate lm3s6965;
-extern crate panic_halt;
-extern crate rtfm;
-
-use rtfm::app;
-
-#[app(device = lm3s6965)]
-const APP: () = {
- #[cfg(never)]
- static mut O1: u32 = 0; // init
- #[cfg(never)]
- static mut O2: u32 = 0; // idle
- #[cfg(never)]
- static mut O3: u32 = 0; // EXTI0
- #[cfg(never)]
- static O4: u32 = 0; // idle
- #[cfg(never)]
- static O5: u32 = 0; // EXTI1
- #[cfg(never)]
- static O6: u32 = 0; // init
-
- #[cfg(never)]
- static mut S1: u32 = 0; // idle & EXTI0
- #[cfg(never)]
- static mut S2: u32 = 0; // EXTI0 & EXTI1
- #[cfg(never)]
- static S3: u32 = 0;
-
- #[init(resources = [O1, O4, O5, O6, S3])]
- fn init(c: init::Context) {
- c.resources.O1; //~ ERROR no field `O1`
- c.resources.O4; //~ ERROR no field `O4`
- c.resources.O5; //~ ERROR no field `O5`
- c.resources.O6; //~ ERROR no field `O6`
- c.resources.S3; //~ ERROR no field `S3`
- }
-
- #[idle(resources = [O2, O4, S1, S3])]
- fn idle(c: idle::Context) -> ! {
- c.resources.O2; //~ ERROR no field `O2`
- c.resources.O4; //~ ERROR no field `O4`
- c.resources.S1; //~ ERROR no field `S1`
- c.resources.S3; //~ ERROR no field `S3`
-
- loop {}
- }
-
- #[interrupt(resources = [O3, S1, S2, S3])]
- fn UART0(c: UART0::Context) {
- c.resources.O3; //~ ERROR no field `O3`
- c.resources.S1; //~ ERROR no field `S1`
- c.resources.S2; //~ ERROR no field `S2`
- c.resources.S3; //~ ERROR no field `S3`
- }
-
- #[interrupt(resources = [S2, O5])]
- fn UART1(c: UART1::Context) {
- c.resources.S2; //~ ERROR no field `S2`
- c.resources.O5; //~ ERROR no field `O5`
- }
-};