more docs fixes

This commit is contained in:
Robin Mueller 2025-09-23 13:55:55 +02:00
parent de5dd10a58
commit 99febbe3a4
No known key found for this signature in database
GPG Key ID: A649FB78196E3849
6 changed files with 8 additions and 10 deletions

View File

@ -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<T> to enforce yields
/// This can be used in combination with [super::BlockingAsync] to enforce yields
/// between long running blocking operations.
pub struct YieldingAsync<T> {
wrapped: T,

View File

@ -135,9 +135,9 @@ impl<T> Mutex<raw::NoopRawMutex, T> {
// 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::*;

View File

@ -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::*;

View File

@ -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<M, T>
where
M: RawMutex,

View File

@ -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).

View File

@ -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>;
}