From ca59c1ff3570474dc819c2d759c69c3a186ca5bc Mon Sep 17 00:00:00 2001 From: Ulf Lilleengen Date: Thu, 23 Jun 2022 12:59:18 +0200 Subject: Add more API docs for embassy-cortex-m and embassy-nrf --- embassy-cortex-m/src/executor.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'embassy-cortex-m/src/executor.rs') diff --git a/embassy-cortex-m/src/executor.rs b/embassy-cortex-m/src/executor.rs index 34f3ec236..8c7f8cf9d 100644 --- a/embassy-cortex-m/src/executor.rs +++ b/embassy-cortex-m/src/executor.rs @@ -1,3 +1,4 @@ +//! Executor specific to cortex-m devices. use core::marker::PhantomData; pub use embassy::executor::Executor; @@ -60,18 +61,18 @@ impl InterruptExecutor { /// The executor keeps running in the background through the interrupt. /// /// This returns a [`SendSpawner`] you can use to spawn tasks on it. A [`SendSpawner`] - /// is returned instead of a [`Spawner`] because the executor effectively runs in a + /// is returned instead of a [`Spawner`](embassy::executor::Spawner) because the executor effectively runs in a /// different "thread" (the interrupt), so spawning tasks on it is effectively /// sending them. /// - /// To obtain a [`Spawner`] for this executor, use [`Spawner::for_current_executor`] from + /// To obtain a [`Spawner`](embassy::executor::Spawner) for this executor, use [`Spawner::for_current_executor()`](embassy::executor::Spawner::for_current_executor()) from /// a task running in it. /// /// This function requires `&'static mut self`. This means you have to store the /// Executor instance in a place where it'll live forever and grants you mutable /// access. There's a few ways to do this: /// - /// - a [Forever](crate::util::Forever) (safe) + /// - a [Forever](embassy::util::Forever) (safe) /// - a `static mut` (unsafe) /// - a local variable in a function you know never returns (like `fn main() -> !`), upgrading its lifetime with `transmute`. (unsafe) pub fn start(&'static mut self) -> SendSpawner { -- cgit