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