Add separate feature flag to enable interrupt tracing
This commit is contained in:
@ -50,6 +50,9 @@ time-tick-1000hz = ["time"]
|
||||
time-tick-1mhz = ["time"]
|
||||
time-tick-16mhz = ["time"]
|
||||
|
||||
# Trace interrupt invocations with rtos-trace.
|
||||
rtos-trace-interrupt = ["rtos-trace"]
|
||||
|
||||
[dependencies]
|
||||
defmt = { version = "0.3", optional = true }
|
||||
log = { version = "0.4.14", optional = true }
|
||||
|
@ -23,20 +23,20 @@ pub mod export {
|
||||
pub use rtos_trace::trace;
|
||||
|
||||
/// Expands the given block of code when `embassy-executor` is compiled with
|
||||
/// the `rtos-trace` feature.
|
||||
/// the `rtos-trace-interrupt` feature.
|
||||
#[doc(hidden)]
|
||||
#[macro_export]
|
||||
#[cfg(feature = "rtos-trace")]
|
||||
macro_rules! rtos_trace {
|
||||
#[cfg(feature = "rtos-trace-interrupt")]
|
||||
macro_rules! rtos_trace_interrupt {
|
||||
($($tt:tt)*) => { $($tt)* };
|
||||
}
|
||||
|
||||
/// Does not expand the given block of code when `embassy-executor` is
|
||||
/// compiled without the `rtos-trace` feature.
|
||||
/// compiled without the `rtos-trace-interrupt` feature.
|
||||
#[doc(hidden)]
|
||||
#[macro_export]
|
||||
#[cfg(not(feature = "rtos-trace"))]
|
||||
macro_rules! rtos_trace {
|
||||
#[cfg(not(feature = "rtos-trace-interrupt"))]
|
||||
macro_rules! rtos_trace_interrupt {
|
||||
($($tt:tt)*) => {};
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user