aboutsummaryrefslogtreecommitdiff
path: root/ui/single/task-priority-too-high.rs
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge@japaric.io> 2019-06-13 23:56:59 +0200
committerGravatar Jorge Aparicio <jorge@japaric.io> 2019-06-13 23:56:59 +0200
commit81275bfa4f41e2066770087f3a33cad4227eab41 (patch)
treec779a68e7cecf4c2613c7593376f980cea5dbc05 /ui/single/task-priority-too-high.rs
parentfafeeb27270ef24fc3852711c6032f65aa7dbcc0 (diff)
downloadrtic-81275bfa4f41e2066770087f3a33cad4227eab41.tar.gz
rtic-81275bfa4f41e2066770087f3a33cad4227eab41.tar.zst
rtic-81275bfa4f41e2066770087f3a33cad4227eab41.zip
rtfm-syntax refactor + heterogeneous multi-core support
Diffstat (limited to 'ui/single/task-priority-too-high.rs')
-rw-r--r--ui/single/task-priority-too-high.rs38
1 files changed, 38 insertions, 0 deletions
diff --git a/ui/single/task-priority-too-high.rs b/ui/single/task-priority-too-high.rs
new file mode 100644
index 00000000..c7c9dc9b
--- /dev/null
+++ b/ui/single/task-priority-too-high.rs
@@ -0,0 +1,38 @@
+#![no_main]
+
+use rtfm::app;
+
+#[rtfm::app(device = lm3s6965)]
+const APP: () = {
+ #[init]
+ fn init(_: init::Context) {}
+
+ #[interrupt(priority = 1)]
+ fn GPIOA(_: GPIOA::Context) {}
+
+ #[interrupt(priority = 2)]
+ fn GPIOB(_: GPIOB::Context) {}
+
+ #[interrupt(priority = 3)]
+ fn GPIOC(_: GPIOC::Context) {}
+
+ #[interrupt(priority = 4)]
+ fn GPIOD(_: GPIOD::Context) {}
+
+ #[interrupt(priority = 5)]
+ fn GPIOE(_: GPIOE::Context) {}
+
+ #[interrupt(priority = 6)]
+ fn UART0(_: UART0::Context) {}
+
+ #[interrupt(priority = 7)]
+ fn UART1(_: UART1::Context) {}
+
+ // OK, this is the maximum priority supported by the device
+ #[interrupt(priority = 8)]
+ fn SSI0(_: SSI0::Context) {}
+
+ // this value is too high!
+ #[interrupt(priority = 9)]
+ fn I2C0(_: I2C0::Context) {}
+};