mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-09-27 04:10:25 +00:00
more docs fixes
This commit is contained in:
parent
de5dd10a58
commit
99febbe3a4
@ -2,7 +2,7 @@ use embassy_futures::yield_now;
|
|||||||
|
|
||||||
/// Wrapper that yields for each operation to the wrapped instance
|
/// 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.
|
/// between long running blocking operations.
|
||||||
pub struct YieldingAsync<T> {
|
pub struct YieldingAsync<T> {
|
||||||
wrapped: T,
|
wrapped: T,
|
||||||
|
@ -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),
|
// 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.
|
// 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::*;
|
pub use thread_mode_mutex::*;
|
||||||
#[cfg(any(cortex_m, feature = "std"))]
|
#[cfg(any(cortex_m, doc, feature = "std"))]
|
||||||
mod thread_mode_mutex {
|
mod thread_mode_mutex {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
@ -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 {
|
mod thread_mode {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
@ -147,5 +147,5 @@ mod thread_mode {
|
|||||||
return unsafe { (0xE000ED04 as *const u32).read_volatile() } & 0x1FF == 0;
|
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::*;
|
pub use thread_mode::*;
|
||||||
|
@ -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 [`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.
|
/// 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>
|
pub struct RwLock<M, T>
|
||||||
where
|
where
|
||||||
M: RawMutex,
|
M: RawMutex,
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
//!
|
//!
|
||||||
//! - Define a struct `MyDriver`
|
//! - Define a struct `MyDriver`
|
||||||
//! - Implement [`Driver`] for it
|
//! - 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,
|
//! 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).
|
//! which will prevent users from needing to configure it themselves (or selecting an incorrect configuration).
|
||||||
|
@ -205,7 +205,7 @@ pub trait Bus {
|
|||||||
///
|
///
|
||||||
/// # Errors
|
/// # 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.
|
/// simulating a disconnect or it has not been enabled at creation time.
|
||||||
fn force_reset(&mut self) -> Result<(), Unsupported> {
|
fn force_reset(&mut self) -> Result<(), Unsupported> {
|
||||||
Err(Unsupported)
|
Err(Unsupported)
|
||||||
@ -215,7 +215,7 @@ pub trait Bus {
|
|||||||
///
|
///
|
||||||
/// # Errors
|
/// # 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.
|
/// remote wakeup or it has not been enabled at creation time.
|
||||||
async fn remote_wakeup(&mut self) -> Result<(), Unsupported>;
|
async fn remote_wakeup(&mut self) -> Result<(), Unsupported>;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user