diff options
| -rw-r--r-- | embassy-executor/Cargo.toml | 3 | ||||
| -rw-r--r-- | embassy-executor/src/lib.rs | 23 | ||||
| -rw-r--r-- | embassy-macros/Cargo.toml | 4 | ||||
| -rw-r--r-- | examples/nrf-rtos-trace/Cargo.toml | 2 |
4 files changed, 3 insertions, 29 deletions
diff --git a/embassy-executor/Cargo.toml b/embassy-executor/Cargo.toml index 3a623e99f..54ea1a548 100644 --- a/embassy-executor/Cargo.toml +++ b/embassy-executor/Cargo.toml | |||
| @@ -49,9 +49,6 @@ turbowakers = [] | |||
| 49 | 49 | ||
| 50 | integrated-timers = ["dep:embassy-time"] | 50 | integrated-timers = ["dep:embassy-time"] |
| 51 | 51 | ||
| 52 | # Trace interrupt invocations with rtos-trace. | ||
| 53 | rtos-trace-interrupt = ["rtos-trace", "embassy-macros/rtos-trace-interrupt"] | ||
| 54 | |||
| 55 | [dependencies] | 52 | [dependencies] |
| 56 | defmt = { version = "0.3", optional = true } | 53 | defmt = { version = "0.3", optional = true } |
| 57 | log = { version = "0.4.14", optional = true } | 54 | log = { version = "0.4.14", optional = true } |
diff --git a/embassy-executor/src/lib.rs b/embassy-executor/src/lib.rs index f2c86d8e6..3b61b4ba5 100644 --- a/embassy-executor/src/lib.rs +++ b/embassy-executor/src/lib.rs | |||
| @@ -44,25 +44,4 @@ pub use spawner::*; | |||
| 44 | /// Implementation details for embassy macros. | 44 | /// Implementation details for embassy macros. |
| 45 | /// Do not use. Used for macros and HALs only. Not covered by semver guarantees. | 45 | /// Do not use. Used for macros and HALs only. Not covered by semver guarantees. |
| 46 | #[doc(hidden)] | 46 | #[doc(hidden)] |
| 47 | pub mod _export { | 47 | pub mod _export {} |
| 48 | #[cfg(feature = "rtos-trace")] | ||
| 49 | pub use rtos_trace::trace; | ||
| 50 | |||
| 51 | /// Expands the given block of code when `embassy-executor` is compiled with | ||
| 52 | /// the `rtos-trace-interrupt` feature. | ||
| 53 | #[doc(hidden)] | ||
| 54 | #[macro_export] | ||
| 55 | #[cfg(feature = "rtos-trace-interrupt")] | ||
| 56 | macro_rules! rtos_trace_interrupt { | ||
| 57 | ($($tt:tt)*) => { $($tt)* }; | ||
| 58 | } | ||
| 59 | |||
| 60 | /// Does not expand the given block of code when `embassy-executor` is | ||
| 61 | /// compiled without the `rtos-trace-interrupt` feature. | ||
| 62 | #[doc(hidden)] | ||
| 63 | #[macro_export] | ||
| 64 | #[cfg(not(feature = "rtos-trace-interrupt"))] | ||
| 65 | macro_rules! rtos_trace_interrupt { | ||
| 66 | ($($tt:tt)*) => {}; | ||
| 67 | } | ||
| 68 | } | ||
diff --git a/embassy-macros/Cargo.toml b/embassy-macros/Cargo.toml index a893cd30f..4e94bf834 100644 --- a/embassy-macros/Cargo.toml +++ b/embassy-macros/Cargo.toml | |||
| @@ -20,6 +20,4 @@ proc-macro2 = "1.0.29" | |||
| 20 | [lib] | 20 | [lib] |
| 21 | proc-macro = true | 21 | proc-macro = true |
| 22 | 22 | ||
| 23 | [features] | 23 | [features] \ No newline at end of file |
| 24 | # Enabling this cause interrupt::take! to require embassy-executor | ||
| 25 | rtos-trace-interrupt = [] | ||
diff --git a/examples/nrf-rtos-trace/Cargo.toml b/examples/nrf-rtos-trace/Cargo.toml index e30b13f28..e3524deb4 100644 --- a/examples/nrf-rtos-trace/Cargo.toml +++ b/examples/nrf-rtos-trace/Cargo.toml | |||
| @@ -17,7 +17,7 @@ log = [ | |||
| 17 | 17 | ||
| 18 | [dependencies] | 18 | [dependencies] |
| 19 | embassy-sync = { version = "0.4.0", path = "../../embassy-sync" } | 19 | embassy-sync = { version = "0.4.0", path = "../../embassy-sync" } |
| 20 | embassy-executor = { version = "0.3.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "rtos-trace", "rtos-trace-interrupt", "integrated-timers"] } | 20 | embassy-executor = { version = "0.3.3", path = "../../embassy-executor", features = ["arch-cortex-m", "executor-thread", "rtos-trace", "integrated-timers"] } |
| 21 | embassy-time = { version = "0.1.5", path = "../../embassy-time" } | 21 | embassy-time = { version = "0.1.5", path = "../../embassy-time" } |
| 22 | embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac"] } | 22 | embassy-nrf = { version = "0.1.0", path = "../../embassy-nrf", features = ["nrf52840", "time-driver-rtc1", "gpiote", "unstable-pac"] } |
| 23 | 23 | ||
