diff options
| author | Dario Nieuwenhuis <[email protected]> | 2022-08-17 23:40:16 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2022-08-18 01:22:30 +0200 |
| commit | 5daa173ce4b153a532b4daa9e94c7a248231f25b (patch) | |
| tree | 2ef0b4d6f9b1c02dac2589e7b57982c20cbc0e66 /embassy-executor/src/lib.rs | |
| parent | 1c5b54a4823d596db730eb476c3ab78110557214 (diff) | |
Split embassy-time from embassy-executor.
Diffstat (limited to 'embassy-executor/src/lib.rs')
| -rw-r--r-- | embassy-executor/src/lib.rs | 42 |
1 files changed, 32 insertions, 10 deletions
diff --git a/embassy-executor/src/lib.rs b/embassy-executor/src/lib.rs index 69e4aeb4b..9328a7378 100644 --- a/embassy-executor/src/lib.rs +++ b/embassy-executor/src/lib.rs | |||
| @@ -1,22 +1,44 @@ | |||
| 1 | #![cfg_attr(not(any(feature = "std", feature = "wasm")), no_std)] | 1 | #![cfg_attr(not(any(feature = "std", feature = "wasm")), no_std)] |
| 2 | #![cfg_attr(feature = "nightly", feature(generic_associated_types, type_alias_impl_trait))] | ||
| 3 | #![cfg_attr(all(feature = "nightly", target_arch = "xtensa"), feature(asm_experimental_arch))] | 2 | #![cfg_attr(all(feature = "nightly", target_arch = "xtensa"), feature(asm_experimental_arch))] |
| 4 | #![allow(clippy::new_without_default)] | 3 | #![allow(clippy::new_without_default)] |
| 5 | #![doc = include_str!("../../README.md")] | 4 | #![doc = include_str!("../README.md")] |
| 6 | #![warn(missing_docs)] | 5 | #![warn(missing_docs)] |
| 7 | 6 | ||
| 8 | // This mod MUST go first, so that the others see its macros. | 7 | // This mod MUST go first, so that the others see its macros. |
| 9 | pub(crate) mod fmt; | 8 | pub(crate) mod fmt; |
| 10 | 9 | ||
| 11 | pub mod executor; | ||
| 12 | #[cfg(feature = "time")] | ||
| 13 | pub mod time; | ||
| 14 | |||
| 15 | #[cfg(feature = "nightly")] | 10 | #[cfg(feature = "nightly")] |
| 16 | pub use embassy_macros::{main, task}; | 11 | pub use embassy_macros::{main, task}; |
| 17 | 12 | ||
| 18 | #[doc(hidden)] | 13 | cfg_if::cfg_if! { |
| 19 | /// Implementation details for embassy macros. DO NOT USE. | 14 | if #[cfg(cortex_m)] { |
| 20 | pub mod export { | 15 | #[path="arch/cortex_m.rs"] |
| 21 | pub use atomic_polyfill as atomic; | 16 | mod arch; |
| 17 | pub use arch::*; | ||
| 18 | } | ||
| 19 | else if #[cfg(target_arch="riscv32")] { | ||
| 20 | #[path="arch/riscv32.rs"] | ||
| 21 | mod arch; | ||
| 22 | pub use arch::*; | ||
| 23 | } | ||
| 24 | else if #[cfg(all(target_arch="xtensa", feature = "nightly"))] { | ||
| 25 | #[path="arch/xtensa.rs"] | ||
| 26 | mod arch; | ||
| 27 | pub use arch::*; | ||
| 28 | } | ||
| 29 | else if #[cfg(feature="wasm")] { | ||
| 30 | #[path="arch/wasm.rs"] | ||
| 31 | mod arch; | ||
| 32 | pub use arch::*; | ||
| 33 | } | ||
| 34 | else if #[cfg(feature="std")] { | ||
| 35 | #[path="arch/std.rs"] | ||
| 36 | mod arch; | ||
| 37 | pub use arch::*; | ||
| 38 | } | ||
| 22 | } | 39 | } |
| 40 | |||
| 41 | pub mod raw; | ||
| 42 | |||
| 43 | mod spawner; | ||
| 44 | pub use spawner::*; | ||
