diff options
Diffstat (limited to 'embassy-cortex-m/src')
| -rw-r--r-- | embassy-cortex-m/src/executor.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/embassy-cortex-m/src/executor.rs b/embassy-cortex-m/src/executor.rs index 17ccf0e81..4a3fa9903 100644 --- a/embassy-cortex-m/src/executor.rs +++ b/embassy-cortex-m/src/executor.rs | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | //! Executor specific to cortex-m devices. | 1 | //! Executor specific to cortex-m devices. |
| 2 | use core::marker::PhantomData; | 2 | use core::marker::PhantomData; |
| 3 | 3 | ||
| 4 | pub use embassy::executor::*; | 4 | pub use embassy_executor::executor::*; |
| 5 | 5 | ||
| 6 | use crate::interrupt::{Interrupt, InterruptExt}; | 6 | use crate::interrupt::{Interrupt, InterruptExt}; |
| 7 | 7 | ||
| @@ -60,18 +60,18 @@ impl<I: Interrupt> InterruptExecutor<I> { | |||
| 60 | /// The executor keeps running in the background through the interrupt. | 60 | /// The executor keeps running in the background through the interrupt. |
| 61 | /// | 61 | /// |
| 62 | /// This returns a [`SendSpawner`] you can use to spawn tasks on it. A [`SendSpawner`] | 62 | /// This returns a [`SendSpawner`] you can use to spawn tasks on it. A [`SendSpawner`] |
| 63 | /// is returned instead of a [`Spawner`](embassy::executor::Spawner) because the executor effectively runs in a | 63 | /// is returned instead of a [`Spawner`](embassy_executor::executor::Spawner) because the executor effectively runs in a |
| 64 | /// different "thread" (the interrupt), so spawning tasks on it is effectively | 64 | /// different "thread" (the interrupt), so spawning tasks on it is effectively |
| 65 | /// sending them. | 65 | /// sending them. |
| 66 | /// | 66 | /// |
| 67 | /// To obtain a [`Spawner`](embassy::executor::Spawner) for this executor, use [`Spawner::for_current_executor()`](embassy::executor::Spawner::for_current_executor()) from | 67 | /// To obtain a [`Spawner`](embassy_executor::executor::Spawner) for this executor, use [`Spawner::for_current_executor()`](embassy_executor::executor::Spawner::for_current_executor()) from |
| 68 | /// a task running in it. | 68 | /// a task running in it. |
| 69 | /// | 69 | /// |
| 70 | /// This function requires `&'static mut self`. This means you have to store the | 70 | /// This function requires `&'static mut self`. This means you have to store the |
| 71 | /// Executor instance in a place where it'll live forever and grants you mutable | 71 | /// Executor instance in a place where it'll live forever and grants you mutable |
| 72 | /// access. There's a few ways to do this: | 72 | /// access. There's a few ways to do this: |
| 73 | /// | 73 | /// |
| 74 | /// - a [Forever](embassy::util::Forever) (safe) | 74 | /// - a [Forever](embassy_util::Forever) (safe) |
| 75 | /// - a `static mut` (unsafe) | 75 | /// - a `static mut` (unsafe) |
| 76 | /// - a local variable in a function you know never returns (like `fn main() -> !`), upgrading its lifetime with `transmute`. (unsafe) | 76 | /// - a local variable in a function you know never returns (like `fn main() -> !`), upgrading its lifetime with `transmute`. (unsafe) |
| 77 | pub fn start(&'static mut self) -> SendSpawner { | 77 | pub fn start(&'static mut self) -> SendSpawner { |
