aboutsummaryrefslogtreecommitdiff
path: root/embassy-executor/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-executor/src/lib.rs')
-rw-r--r--embassy-executor/src/lib.rs41
1 files changed, 34 insertions, 7 deletions
diff --git a/embassy-executor/src/lib.rs b/embassy-executor/src/lib.rs
index 47c0c1d64..93f2eaa6d 100644
--- a/embassy-executor/src/lib.rs
+++ b/embassy-executor/src/lib.rs
@@ -1,24 +1,46 @@
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.
9pub(crate) mod fmt; 8pub(crate) mod fmt;
10 9
11pub mod executor;
12#[cfg(feature = "time")]
13pub mod time;
14
15#[cfg(feature = "nightly")] 10#[cfg(feature = "nightly")]
16pub use embassy_macros::{main, task}; 11pub use embassy_macros::{main, task};
17 12
13cfg_if::cfg_if! {
14 if #[cfg(cortex_m)] {
15 #[path="arch/cortex_m.rs"]
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 }
39}
40
18#[doc(hidden)] 41#[doc(hidden)]
19/// Implementation details for embassy macros. DO NOT USE. 42/// Implementation details for embassy macros. DO NOT USE.
20pub mod export { 43pub mod export {
21 pub use atomic_polyfill as atomic;
22 #[cfg(feature = "rtos-trace")] 44 #[cfg(feature = "rtos-trace")]
23 pub use rtos_trace::trace; 45 pub use rtos_trace::trace;
24 46
@@ -40,3 +62,8 @@ pub mod export {
40 ($($tt:tt)*) => {}; 62 ($($tt:tt)*) => {};
41 } 63 }
42} 64}
65
66pub mod raw;
67
68mod spawner;
69pub use spawner::*;