aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-04-03 01:11:42 +0200
committerDario Nieuwenhuis <[email protected]>2023-04-03 01:11:42 +0200
commitb41ee47115509ba5ed302c684c0c36b6a3e3f76f (patch)
tree8217426731db9ada73f1a3c6a87a872ab928e700
parentcd2ed065dc50e8540b17bfaecbf421679d2ab60d (diff)
executor: unify export mod.
-rw-r--r--embassy-executor/src/lib.rs12
-rw-r--r--embassy-macros/src/macros/cortex_m_interrupt_take.rs4
2 files changed, 6 insertions, 10 deletions
diff --git a/embassy-executor/src/lib.rs b/embassy-executor/src/lib.rs
index 4c7e2f4cd..8707995b4 100644
--- a/embassy-executor/src/lib.rs
+++ b/embassy-executor/src/lib.rs
@@ -46,11 +46,13 @@ cfg_if::cfg_if! {
46 } 46 }
47} 47}
48 48
49/// Implementation details for embassy macros.
50/// Do not use. Used for macros and HALs only. Not covered by semver guarantees.
49#[doc(hidden)] 51#[doc(hidden)]
50/// Implementation details for embassy macros. DO NOT USE. 52pub mod _export {
51pub mod export {
52 #[cfg(feature = "rtos-trace")] 53 #[cfg(feature = "rtos-trace")]
53 pub use rtos_trace::trace; 54 pub use rtos_trace::trace;
55 pub use static_cell::StaticCell;
54 56
55 /// Expands the given block of code when `embassy-executor` is compiled with 57 /// Expands the given block of code when `embassy-executor` is compiled with
56 /// the `rtos-trace-interrupt` feature. 58 /// the `rtos-trace-interrupt` feature.
@@ -75,9 +77,3 @@ pub mod raw;
75 77
76mod spawner; 78mod spawner;
77pub use spawner::*; 79pub use spawner::*;
78
79/// Do not use. Used for macros and HALs only. Not covered by semver guarantees.
80#[doc(hidden)]
81pub mod _export {
82 pub use static_cell::StaticCell;
83}
diff --git a/embassy-macros/src/macros/cortex_m_interrupt_take.rs b/embassy-macros/src/macros/cortex_m_interrupt_take.rs
index e2ebf98c7..4806d1c12 100644
--- a/embassy-macros/src/macros/cortex_m_interrupt_take.rs
+++ b/embassy-macros/src/macros/cortex_m_interrupt_take.rs
@@ -10,12 +10,12 @@ pub fn run(name: syn::Ident) -> Result<TokenStream, TokenStream> {
10 let (isr_enter, isr_exit) = ( 10 let (isr_enter, isr_exit) = (
11 quote! { 11 quote! {
12 ::embassy_executor::rtos_trace_interrupt! { 12 ::embassy_executor::rtos_trace_interrupt! {
13 ::embassy_executor::export::trace::isr_enter(); 13 ::embassy_executor::_export::trace::isr_enter();
14 } 14 }
15 }, 15 },
16 quote! { 16 quote! {
17 ::embassy_executor::rtos_trace_interrupt! { 17 ::embassy_executor::rtos_trace_interrupt! {
18 ::embassy_executor::export::trace::isr_exit(); 18 ::embassy_executor::_export::trace::isr_exit();
19 } 19 }
20 }, 20 },
21 ); 21 );