embassy/embassy-executor/src/lib.rs

43 lines
1.3 KiB
Rust
Raw Normal View History

#![cfg_attr(not(any(feature = "std", feature = "wasm")), no_std)]
2022-06-12 22:15:44 +02:00
#![cfg_attr(feature = "nightly", feature(generic_associated_types, type_alias_impl_trait))]
#![cfg_attr(all(feature = "nightly", target_arch = "xtensa"), feature(asm_experimental_arch))]
2021-10-18 00:55:43 +02:00
#![allow(clippy::new_without_default)]
#![doc = include_str!("../../README.md")]
#![warn(missing_docs)]
2020-09-22 18:03:43 +02:00
// This mod MUST go first, so that the others see its macros.
pub(crate) mod fmt;
pub mod executor;
#[cfg(feature = "time")]
pub mod time;
2021-03-02 00:32:23 +01:00
#[cfg(feature = "nightly")]
pub use embassy_macros::{main, task};
2021-03-17 01:47:45 +01:00
#[doc(hidden)]
/// Implementation details for embassy macros. DO NOT USE.
pub mod export {
pub use atomic_polyfill as atomic;
#[cfg(feature = "rtos-trace")]
pub use rtos_trace::trace;
/// Expands the given block of code when `embassy-executor` is compiled with
/// the `rtos-trace-interrupt` feature.
#[doc(hidden)]
#[macro_export]
#[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-interrupt` feature.
#[doc(hidden)]
#[macro_export]
#[cfg(not(feature = "rtos-trace-interrupt"))]
macro_rules! rtos_trace_interrupt {
($($tt:tt)*) => {};
}
2021-03-17 01:47:45 +01:00
}