diff options
| author | diondokter <[email protected]> | 2025-08-29 14:44:32 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2025-09-11 14:45:27 +0200 |
| commit | 99209accb5b37f236691e060474bfc4823d2e123 (patch) | |
| tree | 835c6f7a179d0fc19816d9c5cd560b68d7f75b55 /examples | |
| parent | 52d178560501a464dba67da89a1570ae9a2cf66c (diff) | |
Add edf example to CI and fix the example
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/nrf52840-edf/Cargo.toml | 12 | ||||
| -rw-r--r-- | examples/nrf52840-edf/src/bin/basic.rs | 3 |
2 files changed, 8 insertions, 7 deletions
diff --git a/examples/nrf52840-edf/Cargo.toml b/examples/nrf52840-edf/Cargo.toml index c7147d1af..9efdff7c4 100644 --- a/examples/nrf52840-edf/Cargo.toml +++ b/examples/nrf52840-edf/Cargo.toml | |||
| @@ -6,16 +6,16 @@ license = "MIT OR Apache-2.0" | |||
| 6 | 6 | ||
| 7 | [dependencies] | 7 | [dependencies] |
| 8 | # NOTE: "edf-scheduler" feature is enabled | 8 | # NOTE: "edf-scheduler" feature is enabled |
| 9 | embassy-executor = { version = "0.7.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "edf-scheduler"] } | 9 | embassy-executor = { version = "0.9.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "edf-scheduler"] } |
| 10 | embassy-time = { version = "0.4.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } | 10 | embassy-time = { version = "0.5.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 11 | embassy-nrf = { version = "0.3.1", path = "../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } | 11 | embassy-nrf = { version = "0.7.0", path = "../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac", "time"] } |
| 12 | 12 | ||
| 13 | defmt = "0.3" | 13 | defmt = "1.0.1" |
| 14 | defmt-rtt = "0.4" | 14 | defmt-rtt = "1.0.0" |
| 15 | 15 | ||
| 16 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } | 16 | cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-single-core"] } |
| 17 | cortex-m-rt = "0.7.0" | 17 | cortex-m-rt = "0.7.0" |
| 18 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 18 | panic-probe = { version = "1.0.0", features = ["print-defmt"] } |
| 19 | 19 | ||
| 20 | [profile.release] | 20 | [profile.release] |
| 21 | debug = 2 | 21 | debug = 2 |
diff --git a/examples/nrf52840-edf/src/bin/basic.rs b/examples/nrf52840-edf/src/bin/basic.rs index c270c67b9..8a8e46449 100644 --- a/examples/nrf52840-edf/src/bin/basic.rs +++ b/examples/nrf52840-edf/src/bin/basic.rs | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | 14 | ||
| 15 | use core::sync::atomic::{compiler_fence, Ordering}; | 15 | use core::sync::atomic::{compiler_fence, Ordering}; |
| 16 | 16 | ||
| 17 | use defmt::unwrap; | ||
| 17 | use embassy_executor::raw::Deadline; | 18 | use embassy_executor::raw::Deadline; |
| 18 | use embassy_executor::Spawner; | 19 | use embassy_executor::Spawner; |
| 19 | use embassy_time::{Duration, Instant, Timer}; | 20 | use embassy_time::{Duration, Instant, Timer}; |
| @@ -57,7 +58,7 @@ async fn main(spawner: Spawner) { | |||
| 57 | 58 | ||
| 58 | // Spawn all of our load workers! | 59 | // Spawn all of our load workers! |
| 59 | for i in 0..tasks { | 60 | for i in 0..tasks { |
| 60 | spawner.must_spawn(load_task(i, work_time_ticks, time_window)); | 61 | spawner.spawn(unwrap!(load_task(i, work_time_ticks, time_window))); |
| 61 | } | 62 | } |
| 62 | 63 | ||
| 63 | // Let all the tasks spin up | 64 | // Let all the tasks spin up |
