aboutsummaryrefslogtreecommitdiff
path: root/embassy-executor
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-executor')
-rw-r--r--embassy-executor/Cargo.toml3
-rw-r--r--embassy-executor/src/lib.rs12
2 files changed, 9 insertions, 6 deletions
diff --git a/embassy-executor/Cargo.toml b/embassy-executor/Cargo.toml
index d10752b3e..ca00f2e71 100644
--- a/embassy-executor/Cargo.toml
+++ b/embassy-executor/Cargo.toml
@@ -50,6 +50,9 @@ time-tick-1000hz = ["time"]
50time-tick-1mhz = ["time"] 50time-tick-1mhz = ["time"]
51time-tick-16mhz = ["time"] 51time-tick-16mhz = ["time"]
52 52
53# Trace interrupt invocations with rtos-trace.
54rtos-trace-interrupt = ["rtos-trace"]
55
53[dependencies] 56[dependencies]
54defmt = { version = "0.3", optional = true } 57defmt = { version = "0.3", optional = true }
55log = { version = "0.4.14", optional = true } 58log = { version = "0.4.14", optional = true }
diff --git a/embassy-executor/src/lib.rs b/embassy-executor/src/lib.rs
index 32724c15c..47c0c1d64 100644
--- a/embassy-executor/src/lib.rs
+++ b/embassy-executor/src/lib.rs
@@ -23,20 +23,20 @@ pub mod export {
23 pub use rtos_trace::trace; 23 pub use rtos_trace::trace;
24 24
25 /// Expands the given block of code when `embassy-executor` is compiled with 25 /// Expands the given block of code when `embassy-executor` is compiled with
26 /// the `rtos-trace` feature. 26 /// the `rtos-trace-interrupt` feature.
27 #[doc(hidden)] 27 #[doc(hidden)]
28 #[macro_export] 28 #[macro_export]
29 #[cfg(feature = "rtos-trace")] 29 #[cfg(feature = "rtos-trace-interrupt")]
30 macro_rules! rtos_trace { 30 macro_rules! rtos_trace_interrupt {
31 ($($tt:tt)*) => { $($tt)* }; 31 ($($tt:tt)*) => { $($tt)* };
32 } 32 }
33 33
34 /// Does not expand the given block of code when `embassy-executor` is 34 /// Does not expand the given block of code when `embassy-executor` is
35 /// compiled without the `rtos-trace` feature. 35 /// compiled without the `rtos-trace-interrupt` feature.
36 #[doc(hidden)] 36 #[doc(hidden)]
37 #[macro_export] 37 #[macro_export]
38 #[cfg(not(feature = "rtos-trace"))] 38 #[cfg(not(feature = "rtos-trace-interrupt"))]
39 macro_rules! rtos_trace { 39 macro_rules! rtos_trace_interrupt {
40 ($($tt:tt)*) => {}; 40 ($($tt:tt)*) => {};
41 } 41 }
42} 42}