diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2023-04-04 15:50:12 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-04-04 15:50:12 +0000 |
| commit | 5923e143e35547b1972f2e48082e93dfbe1dadac (patch) | |
| tree | 809a90f79fd3d0bb66843df5b8fee24663498919 /examples/stm32f0 | |
| parent | 143105eeb66eef1012d8638212aa6894ffccf02f (diff) | |
| parent | d3c4e4a20a05085eae8d568c7efdbe09bada9cf5 (diff) | |
Merge #1321
1321: executor: add Pender, rework Cargo features. r=Dirbaio a=Dirbaio
This introduces a `Pender` struct with enum cases for thread-mode, interrupt-mode and
custom callback executors. This avoids calls through function pointers when using only
the thread or interrupt executors. Faster, and friendlier to `cargo-call-stack`.
`embassy-executor` now has `arch-xxx` Cargo features to select the arch and to enable
the builtin executors (thread and interrupt).
Co-authored-by: Dario Nieuwenhuis <[email protected]>
Diffstat (limited to 'examples/stm32f0')
| -rw-r--r-- | examples/stm32f0/Cargo.toml | 2 | ||||
| -rw-r--r-- | examples/stm32f0/src/bin/multiprio.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/stm32f0/Cargo.toml b/examples/stm32f0/Cargo.toml index 89d99b6d3..5c82c5579 100644 --- a/examples/stm32f0/Cargo.toml +++ b/examples/stm32f0/Cargo.toml | |||
| @@ -13,7 +13,7 @@ defmt = "0.3" | |||
| 13 | defmt-rtt = "0.4" | 13 | defmt-rtt = "0.4" |
| 14 | panic-probe = "0.3" | 14 | panic-probe = "0.3" |
| 15 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } | 15 | embassy-sync = { version = "0.1.0", path = "../../embassy-sync", features = ["defmt"] } |
| 16 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["defmt", "integrated-timers"] } | 16 | embassy-executor = { version = "0.1.0", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } |
| 17 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 17 | embassy-time = { version = "0.1.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 18 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "memory-x", "stm32f091rc", "time-driver-any", "exti", "unstable-pac"] } | 18 | embassy-stm32 = { version = "0.1.0", path = "../../embassy-stm32", features = ["nightly", "defmt", "memory-x", "stm32f091rc", "time-driver-any", "exti", "unstable-pac"] } |
| 19 | static_cell = "1.0" | 19 | static_cell = "1.0" |
diff --git a/examples/stm32f0/src/bin/multiprio.rs b/examples/stm32f0/src/bin/multiprio.rs index e0dc8c989..430a805fc 100644 --- a/examples/stm32f0/src/bin/multiprio.rs +++ b/examples/stm32f0/src/bin/multiprio.rs | |||
| @@ -62,7 +62,7 @@ use core::mem; | |||
| 62 | use cortex_m::peripheral::NVIC; | 62 | use cortex_m::peripheral::NVIC; |
| 63 | use cortex_m_rt::entry; | 63 | use cortex_m_rt::entry; |
| 64 | use defmt::*; | 64 | use defmt::*; |
| 65 | use embassy_stm32::executor::{Executor, InterruptExecutor}; | 65 | use embassy_executor::{Executor, InterruptExecutor}; |
| 66 | use embassy_stm32::interrupt; | 66 | use embassy_stm32::interrupt; |
| 67 | use embassy_stm32::pac::Interrupt; | 67 | use embassy_stm32::pac::Interrupt; |
| 68 | use embassy_time::{Duration, Instant, Timer}; | 68 | use embassy_time::{Duration, Instant, Timer}; |
