aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorJorge Aparicio <jorge@japaric.io>2019-06-20 06:19:59 +0200
committerJorge Aparicio <jorge@japaric.io>2019-06-20 06:19:59 +0200
commit4e51bb68b976c6bb6a9a989dc560d2a8123a84ca (patch)
tree5c14f21f904c15034d477c7e4400e01d212a9f2a /ui
parentb150ab29e25637e41ba5de81f6cbbdfe24834a3f (diff)
RFC #207
Diffstat (limited to 'ui')
-rw-r--r--ui/single/exception-invalid.rs4
-rw-r--r--ui/single/exception-invalid.stderr4
-rw-r--r--ui/single/exception-systick-used.rs4
-rw-r--r--ui/single/exception-systick-used.stderr4
-rw-r--r--ui/single/extern-interrupt-used.rs2
-rw-r--r--ui/single/extern-interrupt-used.stderr6
-rw-r--r--ui/single/locals-cfg.rs8
-rw-r--r--ui/single/resources-cfg.rs8
-rw-r--r--ui/single/resources-cfg.stderr12
-rw-r--r--ui/single/task-priority-too-high.rs36
10 files changed, 44 insertions, 44 deletions
diff --git a/ui/single/exception-invalid.rs b/ui/single/exception-invalid.rs
index 426cb67..54f5992 100644
--- a/ui/single/exception-invalid.rs
+++ b/ui/single/exception-invalid.rs
@@ -2,6 +2,6 @@
#[rtfm::app(device = lm3s6965)]
const APP: () = {
- #[exception]
- fn NonMaskableInt(_: NonMaskableInt::Context) {}
+ #[task(binds = NonMaskableInt)]
+ fn nmi(_: nmi::Context) {}
};
diff --git a/ui/single/exception-invalid.stderr b/ui/single/exception-invalid.stderr
index f7fc292..306074b 100644
--- a/ui/single/exception-invalid.stderr
+++ b/ui/single/exception-invalid.stderr
@@ -1,8 +1,8 @@
error: only exceptions with configurable priority can be used as hardware tasks
--> $DIR/exception-invalid.rs:6:8
|
-6 | fn NonMaskableInt(_: NonMaskableInt::Context) {}
- | ^^^^^^^^^^^^^^
+6 | fn nmi(_: nmi::Context) {}
+ | ^^^
error: aborting due to previous error
diff --git a/ui/single/exception-systick-used.rs b/ui/single/exception-systick-used.rs
index d30da1b..1155834 100644
--- a/ui/single/exception-systick-used.rs
+++ b/ui/single/exception-systick-used.rs
@@ -2,8 +2,8 @@
#[rtfm::app(device = lm3s6965)]
const APP: () = {
- #[exception]
- fn SysTick(_: SysTick::Context) {}
+ #[task(binds = SysTick)]
+ fn sys_tick(_: sys_tick::Context) {}
#[task(schedule = [foo])]
fn foo(_: foo::Context) {}
diff --git a/ui/single/exception-systick-used.stderr b/ui/single/exception-systick-used.stderr
index 47786c6..e2ccbd3 100644
--- a/ui/single/exception-systick-used.stderr
+++ b/ui/single/exception-systick-used.stderr
@@ -1,8 +1,8 @@
error: this exception can't be used because it's being used by the runtime
--> $DIR/exception-systick-used.rs:6:8
|
-6 | fn SysTick(_: SysTick::Context) {}
- | ^^^^^^^
+6 | fn sys_tick(_: sys_tick::Context) {}
+ | ^^^^^^^^
error: aborting due to previous error
diff --git a/ui/single/extern-interrupt-used.rs b/ui/single/extern-interrupt-used.rs
index 25f34b3..59f3806 100644
--- a/ui/single/extern-interrupt-used.rs
+++ b/ui/single/extern-interrupt-used.rs
@@ -2,7 +2,7 @@
#[rtfm::app(device = lm3s6965)]
const APP: () = {
- #[interrupt(binds = UART0)]
+ #[task(binds = UART0)]
fn a(_: a::Context) {}
extern "C" {
diff --git a/ui/single/extern-interrupt-used.stderr b/ui/single/extern-interrupt-used.stderr
index 8707b1d..2e084ca 100644
--- a/ui/single/extern-interrupt-used.stderr
+++ b/ui/single/extern-interrupt-used.stderr
@@ -1,8 +1,8 @@
error: `extern` interrupts can't be used as hardware tasks
- --> $DIR/extern-interrupt-used.rs:5:25
+ --> $DIR/extern-interrupt-used.rs:5:20
|
-5 | #[interrupt(binds = UART0)]
- | ^^^^^
+5 | #[task(binds = UART0)]
+ | ^^^^^
error: aborting due to previous error
diff --git a/ui/single/locals-cfg.rs b/ui/single/locals-cfg.rs
index bcce5ca..8761f72 100644
--- a/ui/single/locals-cfg.rs
+++ b/ui/single/locals-cfg.rs
@@ -20,16 +20,16 @@ const APP: () = {
loop {}
}
- #[exception]
- fn SVCall(_: SVCall::Context) {
+ #[task(binds = SVCall)]
+ fn svcall(_: svcall::Context) {
#[cfg(never)]
static mut FOO: u32 = 0;
FOO;
}
- #[interrupt]
- fn UART0(_: UART0::Context) {
+ #[task(binds = UART0)]
+ fn uart0(_: uart0::Context) {
#[cfg(never)]
static mut FOO: u32 = 0;
diff --git a/ui/single/resources-cfg.rs b/ui/single/resources-cfg.rs
index f8c3672..6f608fa 100644
--- a/ui/single/resources-cfg.rs
+++ b/ui/single/resources-cfg.rs
@@ -41,16 +41,16 @@ const APP: () = {
loop {}
}
- #[interrupt(resources = [O3, S1, S2, S3])]
- fn UART0(c: UART0::Context) {
+ #[task(binds = UART0, resources = [O3, S1, S2, S3])]
+ fn uart0(c: uart0::Context) {
c.resources.O3;
c.resources.S1;
c.resources.S2;
c.resources.S3;
}
- #[interrupt(resources = [S2, O5])]
- fn UART1(c: UART1::Context) {
+ #[task(binds = UART1, resources = [S2, O5])]
+ fn uart1(c: uart1::Context) {
c.resources.S2;
c.resources.O5;
}
diff --git a/ui/single/resources-cfg.stderr b/ui/single/resources-cfg.stderr
index 88c34d2..55e7ee0 100644
--- a/ui/single/resources-cfg.stderr
+++ b/ui/single/resources-cfg.stderr
@@ -70,7 +70,7 @@ error[E0609]: no field `S3` on type `idleResources<'_>`
|
= 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:46:21
|
46 | c.resources.O3;
@@ -78,7 +78,7 @@ error[E0609]: no field `O3` on type `UART0Resources<'_>`
|
= 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:47:21
|
47 | c.resources.S1;
@@ -86,7 +86,7 @@ error[E0609]: no field `S1` on type `UART0Resources<'_>`
|
= 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:48:21
|
48 | c.resources.S2;
@@ -94,7 +94,7 @@ error[E0609]: no field `S2` on type `UART0Resources<'_>`
|
= 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:49:21
|
49 | c.resources.S3;
@@ -102,7 +102,7 @@ error[E0609]: no field `S3` on type `UART0Resources<'_>`
|
= 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:54:21
|
54 | c.resources.S2;
@@ -110,7 +110,7 @@ error[E0609]: no field `S2` on type `UART1Resources<'_>`
|
= 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:55:21
|
55 | c.resources.O5;
diff --git a/ui/single/task-priority-too-high.rs b/ui/single/task-priority-too-high.rs
index c7c9dc9..24cb11e 100644
--- a/ui/single/task-priority-too-high.rs
+++ b/ui/single/task-priority-too-high.rs
@@ -7,32 +7,32 @@ const APP: () = {
#[init]
fn init(_: init::Context) {}
- #[interrupt(priority = 1)]
- fn GPIOA(_: GPIOA::Context) {}
+ #[task(binds = GPIOA, priority = 1)]
+ fn gpioa(_: gpioa::Context) {}
- #[interrupt(priority = 2)]
- fn GPIOB(_: GPIOB::Context) {}
+ #[task(binds = GPIOB, priority = 2)]
+ fn gpiob(_: gpiob::Context) {}
- #[interrupt(priority = 3)]
- fn GPIOC(_: GPIOC::Context) {}
+ #[task(binds = GPIOC, priority = 3)]
+ fn gpioc(_: gpioc::Context) {}
- #[interrupt(priority = 4)]
- fn GPIOD(_: GPIOD::Context) {}
+ #[task(binds = GPIOD, priority = 4)]
+ fn gpiod(_: gpiod::Context) {}
- #[interrupt(priority = 5)]
- fn GPIOE(_: GPIOE::Context) {}
+ #[task(binds = GPIOE, priority = 5)]
+ fn gpioe(_: gpioe::Context) {}
- #[interrupt(priority = 6)]
- fn UART0(_: UART0::Context) {}
+ #[task(binds = UART0, priority = 6)]
+ fn uart0(_: uart0::Context) {}
- #[interrupt(priority = 7)]
- fn UART1(_: UART1::Context) {}
+ #[task(binds = UART1, priority = 7)]
+ fn uart1(_: uart1::Context) {}
// OK, this is the maximum priority supported by the device
- #[interrupt(priority = 8)]
- fn SSI0(_: SSI0::Context) {}
+ #[task(binds = SSI0, priority = 8)]
+ fn ssi0(_: ssi0::Context) {}
// this value is too high!
- #[interrupt(priority = 9)]
- fn I2C0(_: I2C0::Context) {}
+ #[task(binds = I2C0, priority = 9)]
+ fn i2c0(_: i2c0::Context) {}
};