Fixing test errors

This commit is contained in:
Emil Fresk 2020-10-01 20:14:07 +02:00
parent e7f0d9c3e3
commit 9d2598dc07
5 changed files with 37 additions and 31 deletions

View file

@ -3,11 +3,13 @@
#[rtic::app(device = lm3s6965)] #[rtic::app(device = lm3s6965)]
const APP: () = { const APP: () = {
#[init] #[init]
fn init(_: init::Context) { fn init(_: init::Context) -> init::LateResources {
#[cfg(never)] #[cfg(never)]
static mut FOO: u32 = 0; static mut FOO: u32 = 0;
FOO; FOO;
init::LateResources {}
} }
#[idle] #[idle]

View file

@ -5,27 +5,27 @@ error[E0425]: cannot find value `FOO` in this scope
| ^^^ not found in this scope | ^^^ not found in this scope
error[E0425]: cannot find value `FOO` in this scope error[E0425]: cannot find value `FOO` in this scope
--> $DIR/locals-cfg.rs:18:9 --> $DIR/locals-cfg.rs:20:9
| |
18 | FOO; 20 | FOO;
| ^^^ not found in this scope | ^^^ not found in this scope
error[E0425]: cannot find value `FOO` in this scope error[E0425]: cannot find value `FOO` in this scope
--> $DIR/locals-cfg.rs:28:9 --> $DIR/locals-cfg.rs:30:9
| |
28 | FOO; 30 | FOO;
| ^^^ not found in this scope | ^^^ not found in this scope
error[E0425]: cannot find value `FOO` in this scope error[E0425]: cannot find value `FOO` in this scope
--> $DIR/locals-cfg.rs:36:9 --> $DIR/locals-cfg.rs:38:9
| |
36 | FOO; 38 | FOO;
| ^^^ not found in this scope | ^^^ not found in this scope
error[E0425]: cannot find value `FOO` in this scope error[E0425]: cannot find value `FOO` in this scope
--> $DIR/locals-cfg.rs:44:9 --> $DIR/locals-cfg.rs:46:9
| |
44 | FOO; 46 | FOO;
| ^^^ not found in this scope | ^^^ not found in this scope
error: duplicate lang item in crate `panic_halt`: `panic_impl`. error: duplicate lang item in crate `panic_halt`: `panic_impl`.

View file

@ -41,12 +41,14 @@ const APP: () = {
} }
#[init(resources = [o1, o4, o5, o6, s3])] #[init(resources = [o1, o4, o5, o6, s3])]
fn init(c: init::Context) { fn init(c: init::Context) -> init::LateResources {
c.resources.o1; c.resources.o1;
c.resources.o4; c.resources.o4;
c.resources.o5; c.resources.o5;
c.resources.o6; c.resources.o6;
c.resources.s3; c.resources.s3;
init::LateResources {}
} }
#[idle(resources = [o2, &o4, s1, &s3])] #[idle(resources = [o2, &o4, s1, &s3])]

View file

@ -39,81 +39,81 @@ error[E0609]: no field `s3` on type `initResources<'_>`
= note: available fields are: `__marker__` = note: available fields are: `__marker__`
error[E0609]: no field `o2` on type `idleResources<'_>` error[E0609]: no field `o2` on type `idleResources<'_>`
--> $DIR/resources-cfg.rs:54:21 --> $DIR/resources-cfg.rs:56:21
| |
54 | c.resources.o2; 56 | c.resources.o2;
| ^^ unknown field | ^^ unknown field
| |
= note: available fields are: `__marker__` = note: available fields are: `__marker__`
error[E0609]: no field `o4` on type `idleResources<'_>` error[E0609]: no field `o4` on type `idleResources<'_>`
--> $DIR/resources-cfg.rs:55:21 --> $DIR/resources-cfg.rs:57:21
| |
55 | c.resources.o4; 57 | c.resources.o4;
| ^^ unknown field | ^^ unknown field
| |
= note: available fields are: `__marker__` = note: available fields are: `__marker__`
error[E0609]: no field `s1` on type `idleResources<'_>` error[E0609]: no field `s1` on type `idleResources<'_>`
--> $DIR/resources-cfg.rs:56:21 --> $DIR/resources-cfg.rs:58:21
| |
56 | c.resources.s1; 58 | c.resources.s1;
| ^^ unknown field | ^^ unknown field
| |
= note: available fields are: `__marker__` = note: available fields are: `__marker__`
error[E0609]: no field `s3` on type `idleResources<'_>` error[E0609]: no field `s3` on type `idleResources<'_>`
--> $DIR/resources-cfg.rs:57:21 --> $DIR/resources-cfg.rs:59:21
| |
57 | c.resources.s3; 59 | c.resources.s3;
| ^^ unknown field | ^^ unknown field
| |
= note: available fields are: `__marker__` = note: available fields are: `__marker__`
error[E0609]: no field `o3` on type `uart0Resources<'_>` error[E0609]: no field `o3` on type `uart0Resources<'_>`
--> $DIR/resources-cfg.rs:64:21 --> $DIR/resources-cfg.rs:66:21
| |
64 | c.resources.o3; 66 | c.resources.o3;
| ^^ unknown field | ^^ unknown field
| |
= note: available fields are: `__marker__` = note: available fields are: `__marker__`
error[E0609]: no field `s1` on type `uart0Resources<'_>` error[E0609]: no field `s1` on type `uart0Resources<'_>`
--> $DIR/resources-cfg.rs:65:21 --> $DIR/resources-cfg.rs:67:21
| |
65 | c.resources.s1; 67 | c.resources.s1;
| ^^ unknown field | ^^ unknown field
| |
= note: available fields are: `__marker__` = note: available fields are: `__marker__`
error[E0609]: no field `s2` on type `uart0Resources<'_>` error[E0609]: no field `s2` on type `uart0Resources<'_>`
--> $DIR/resources-cfg.rs:66:21 --> $DIR/resources-cfg.rs:68:21
| |
66 | c.resources.s2; 68 | c.resources.s2;
| ^^ unknown field | ^^ unknown field
| |
= note: available fields are: `__marker__` = note: available fields are: `__marker__`
error[E0609]: no field `s3` on type `uart0Resources<'_>` error[E0609]: no field `s3` on type `uart0Resources<'_>`
--> $DIR/resources-cfg.rs:67:21 --> $DIR/resources-cfg.rs:69:21
| |
67 | c.resources.s3; 69 | c.resources.s3;
| ^^ unknown field | ^^ unknown field
| |
= note: available fields are: `__marker__` = note: available fields are: `__marker__`
error[E0609]: no field `s2` on type `uart1Resources<'_>` error[E0609]: no field `s2` on type `uart1Resources<'_>`
--> $DIR/resources-cfg.rs:72:21 --> $DIR/resources-cfg.rs:74:21
| |
72 | c.resources.s2; 74 | c.resources.s2;
| ^^ unknown field | ^^ unknown field
| |
= note: available fields are: `__marker__` = note: available fields are: `__marker__`
error[E0609]: no field `o5` on type `uart1Resources<'_>` error[E0609]: no field `o5` on type `uart1Resources<'_>`
--> $DIR/resources-cfg.rs:73:21 --> $DIR/resources-cfg.rs:75:21
| |
73 | c.resources.o5; 75 | c.resources.o5;
| ^^ unknown field | ^^ unknown field
| |
= note: available fields are: `__marker__` = note: available fields are: `__marker__`

View file

@ -5,7 +5,9 @@ use rtic::app;
#[rtic::app(device = lm3s6965)] #[rtic::app(device = lm3s6965)]
const APP: () = { const APP: () = {
#[init] #[init]
fn init(_: init::Context) {} fn init(_: init::Context) -> init::LateResources {
init::LateResources {}
}
#[task(binds = GPIOA, priority = 1)] #[task(binds = GPIOA, priority = 1)]
fn gpioa(_: gpioa::Context) {} fn gpioa(_: gpioa::Context) {}