From 81275bfa4f41e2066770087f3a33cad4227eab41 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Thu, 13 Jun 2019 23:56:59 +0200 Subject: rtfm-syntax refactor + heterogeneous multi-core support --- ui/single/task-priority-too-high.rs | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 ui/single/task-priority-too-high.rs (limited to 'ui/single/task-priority-too-high.rs') diff --git a/ui/single/task-priority-too-high.rs b/ui/single/task-priority-too-high.rs new file mode 100644 index 0000000..c7c9dc9 --- /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) {} +}; -- cgit v1.2.3 From 4e51bb68b976c6bb6a9a989dc560d2a8123a84ca Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Thu, 20 Jun 2019 06:19:59 +0200 Subject: RFC #207 --- ui/single/task-priority-too-high.rs | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'ui/single/task-priority-too-high.rs') 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) {} }; -- cgit v1.2.3