diff --git a/embassy-embedded-hal/src/adapter/yielding_async.rs b/embassy-embedded-hal/src/adapter/yielding_async.rs index 87f822a63..e0ca3aedc 100644 --- a/embassy-embedded-hal/src/adapter/yielding_async.rs +++ b/embassy-embedded-hal/src/adapter/yielding_async.rs @@ -2,7 +2,7 @@ use embassy_futures::yield_now; /// Wrapper that yields for each operation to the wrapped instance /// -/// This can be used in combination with BlockingAsync to enforce yields +/// This can be used in combination with [super::BlockingAsync] to enforce yields /// between long running blocking operations. pub struct YieldingAsync { wrapped: T, diff --git a/embassy-sync/src/blocking_mutex/mod.rs b/embassy-sync/src/blocking_mutex/mod.rs index 11809c763..62bfc26fb 100644 --- a/embassy-sync/src/blocking_mutex/mod.rs +++ b/embassy-sync/src/blocking_mutex/mod.rs @@ -135,9 +135,9 @@ impl Mutex { // There's still a ThreadModeRawMutex for use with the generic Mutex (handy with Channel, for example), // but that will require T: Send even though it shouldn't be needed. -#[cfg(any(cortex_m, feature = "std"))] +#[cfg(any(cortex_m, doc, feature = "std"))] pub use thread_mode_mutex::*; -#[cfg(any(cortex_m, feature = "std"))] +#[cfg(any(cortex_m, doc, feature = "std"))] mod thread_mode_mutex { use super::*; diff --git a/embassy-sync/src/blocking_mutex/raw.rs b/embassy-sync/src/blocking_mutex/raw.rs index 50f965e00..fbb9ece15 100644 --- a/embassy-sync/src/blocking_mutex/raw.rs +++ b/embassy-sync/src/blocking_mutex/raw.rs @@ -89,7 +89,7 @@ unsafe impl RawMutex for NoopRawMutex { // ================ -#[cfg(any(cortex_m, feature = "std"))] +#[cfg(any(cortex_m, doc, feature = "std"))] mod thread_mode { use super::*; @@ -147,5 +147,5 @@ mod thread_mode { return unsafe { (0xE000ED04 as *const u32).read_volatile() } & 0x1FF == 0; } } -#[cfg(any(cortex_m, feature = "std"))] +#[cfg(any(cortex_m, doc, feature = "std"))] pub use thread_mode::*; diff --git a/embassy-sync/src/rwlock.rs b/embassy-sync/src/rwlock.rs index 0d784a7dc..e43388c4d 100644 --- a/embassy-sync/src/rwlock.rs +++ b/embassy-sync/src/rwlock.rs @@ -37,8 +37,6 @@ struct State { /// Use [`NoopRawMutex`](crate::blocking_mutex::raw::NoopRawMutex) when data is only shared between tasks running on the same executor. /// /// Use [`ThreadModeRawMutex`](crate::blocking_mutex::raw::ThreadModeRawMutex) when data is shared between tasks running on the same executor but you want a singleton. -/// - pub struct RwLock where M: RawMutex, diff --git a/embassy-time-driver/src/lib.rs b/embassy-time-driver/src/lib.rs index 32cb68296..44d9a156a 100644 --- a/embassy-time-driver/src/lib.rs +++ b/embassy-time-driver/src/lib.rs @@ -6,7 +6,7 @@ //! //! - Define a struct `MyDriver` //! - Implement [`Driver`] for it -//! - Register it as the global driver with [`time_driver_impl`](crate::time_driver_impl). +//! - Register it as the global driver with [`time_driver_impl`]. //! //! If your driver has a single set tick rate, enable the corresponding [`tick-hz-*`](crate#tick-rate) feature, //! which will prevent users from needing to configure it themselves (or selecting an incorrect configuration). diff --git a/embassy-usb-driver/src/lib.rs b/embassy-usb-driver/src/lib.rs index 3ad96c61d..59845a268 100644 --- a/embassy-usb-driver/src/lib.rs +++ b/embassy-usb-driver/src/lib.rs @@ -205,7 +205,7 @@ pub trait Bus { /// /// # Errors /// - /// * [`Unsupported`](crate::Unsupported) - This UsbBus implementation doesn't support + /// * [`Unsupported`] - This UsbBus implementation doesn't support /// simulating a disconnect or it has not been enabled at creation time. fn force_reset(&mut self) -> Result<(), Unsupported> { Err(Unsupported) @@ -215,7 +215,7 @@ pub trait Bus { /// /// # Errors /// - /// * [`Unsupported`](crate::Unsupported) - This UsbBus implementation doesn't support + /// * [`Unsupported`] - This UsbBus implementation doesn't support /// remote wakeup or it has not been enabled at creation time. async fn remote_wakeup(&mut self) -> Result<(), Unsupported>; }