diff options
| author | Quentin Smith <[email protected]> | 2022-08-16 00:42:08 -0400 |
|---|---|---|
| committer | Quentin Smith <[email protected]> | 2022-08-16 00:42:08 -0400 |
| commit | 0bf178dd1b11d97f20cb93c5fdb0c779259be0f8 (patch) | |
| tree | 4a6e4ef6cfad569e1491e1e81f505a0b9fa3fb58 /embassy-executor | |
| parent | 145af0e4ab75d931cba401f1755f383bcc713892 (diff) | |
Add separate feature flag to enable interrupt tracing
Diffstat (limited to 'embassy-executor')
| -rw-r--r-- | embassy-executor/Cargo.toml | 3 | ||||
| -rw-r--r-- | embassy-executor/src/lib.rs | 12 |
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"] | |||
| 50 | time-tick-1mhz = ["time"] | 50 | time-tick-1mhz = ["time"] |
| 51 | time-tick-16mhz = ["time"] | 51 | time-tick-16mhz = ["time"] |
| 52 | 52 | ||
| 53 | # Trace interrupt invocations with rtos-trace. | ||
| 54 | rtos-trace-interrupt = ["rtos-trace"] | ||
| 55 | |||
| 53 | [dependencies] | 56 | [dependencies] |
| 54 | defmt = { version = "0.3", optional = true } | 57 | defmt = { version = "0.3", optional = true } |
| 55 | log = { version = "0.4.14", optional = true } | 58 | log = { 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 | } |
