diff options
Diffstat (limited to 'embassy-executor/src/lib.rs')
| -rw-r--r-- | embassy-executor/src/lib.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/embassy-executor/src/lib.rs b/embassy-executor/src/lib.rs index 69e4aeb4b..dd99f9e52 100644 --- a/embassy-executor/src/lib.rs +++ b/embassy-executor/src/lib.rs | |||
| @@ -19,4 +19,25 @@ pub use embassy_macros::{main, task}; | |||
| 19 | /// Implementation details for embassy macros. DO NOT USE. | 19 | /// Implementation details for embassy macros. DO NOT USE. |
| 20 | pub mod export { | 20 | pub mod export { |
| 21 | pub use atomic_polyfill as atomic; | 21 | pub use atomic_polyfill as atomic; |
| 22 | |||
| 23 | #[cfg(feature = "rtos-trace")] | ||
| 24 | pub use rtos_trace::trace; | ||
| 25 | |||
| 26 | /// Expands the given block of code when `embassy-executor` is compiled with | ||
| 27 | /// the `rtos-trace` feature. | ||
| 28 | #[doc(hidden)] | ||
| 29 | #[macro_export] | ||
| 30 | #[cfg(feature = "rtos-trace")] | ||
| 31 | macro_rules! rtos_trace { | ||
| 32 | ($($tt:tt)*) => { $($tt)* }; | ||
| 33 | } | ||
| 34 | |||
| 35 | /// Does not expand the given block of code when `embassy-executor` is | ||
| 36 | /// compiled without the `rtos-trace` feature. | ||
| 37 | #[doc(hidden)] | ||
| 38 | #[macro_export] | ||
| 39 | #[cfg(not(feature = "rtos-trace"))] | ||
| 40 | macro_rules! rtos_trace { | ||
| 41 | ($($tt:tt)*) => {}; | ||
| 42 | } | ||
| 22 | } | 43 | } |
