aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Mueller <[email protected]>2025-09-23 13:55:55 +0200
committerRobin Mueller <[email protected]>2025-09-23 13:55:55 +0200
commit99febbe3a42ac05b723e6e76088d159eb0acfa5e (patch)
treec27843242e930cd6d15cdb7e3456d83df4671430
parentde5dd10a5832b330465d93399b3a9cb761e24029 (diff)
more docs fixes
-rw-r--r--embassy-embedded-hal/src/adapter/yielding_async.rs2
-rw-r--r--embassy-sync/src/blocking_mutex/mod.rs4
-rw-r--r--embassy-sync/src/blocking_mutex/raw.rs4
-rw-r--r--embassy-sync/src/rwlock.rs2
-rw-r--r--embassy-time-driver/src/lib.rs2
-rw-r--r--embassy-usb-driver/src/lib.rs4
6 files changed, 8 insertions, 10 deletions
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;
2 2
3/// Wrapper that yields for each operation to the wrapped instance 3/// Wrapper that yields for each operation to the wrapped instance
4/// 4///
5/// This can be used in combination with BlockingAsync<T> to enforce yields 5/// This can be used in combination with [super::BlockingAsync] to enforce yields
6/// between long running blocking operations. 6/// between long running blocking operations.
7pub struct YieldingAsync<T> { 7pub struct YieldingAsync<T> {
8 wrapped: T, 8 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<T> Mutex<raw::NoopRawMutex, T> {
135// There's still a ThreadModeRawMutex for use with the generic Mutex (handy with Channel, for example), 135// There's still a ThreadModeRawMutex for use with the generic Mutex (handy with Channel, for example),
136// but that will require T: Send even though it shouldn't be needed. 136// but that will require T: Send even though it shouldn't be needed.
137 137
138#[cfg(any(cortex_m, feature = "std"))] 138#[cfg(any(cortex_m, doc, feature = "std"))]
139pub use thread_mode_mutex::*; 139pub use thread_mode_mutex::*;
140#[cfg(any(cortex_m, feature = "std"))] 140#[cfg(any(cortex_m, doc, feature = "std"))]
141mod thread_mode_mutex { 141mod thread_mode_mutex {
142 use super::*; 142 use super::*;
143 143
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 {
89 89
90// ================ 90// ================
91 91
92#[cfg(any(cortex_m, feature = "std"))] 92#[cfg(any(cortex_m, doc, feature = "std"))]
93mod thread_mode { 93mod thread_mode {
94 use super::*; 94 use super::*;
95 95
@@ -147,5 +147,5 @@ mod thread_mode {
147 return unsafe { (0xE000ED04 as *const u32).read_volatile() } & 0x1FF == 0; 147 return unsafe { (0xE000ED04 as *const u32).read_volatile() } & 0x1FF == 0;
148 } 148 }
149} 149}
150#[cfg(any(cortex_m, feature = "std"))] 150#[cfg(any(cortex_m, doc, feature = "std"))]
151pub use thread_mode::*; 151pub 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 {
37/// Use [`NoopRawMutex`](crate::blocking_mutex::raw::NoopRawMutex) when data is only shared between tasks running on the same executor. 37/// Use [`NoopRawMutex`](crate::blocking_mutex::raw::NoopRawMutex) when data is only shared between tasks running on the same executor.
38/// 38///
39/// Use [`ThreadModeRawMutex`](crate::blocking_mutex::raw::ThreadModeRawMutex) when data is shared between tasks running on the same executor but you want a singleton. 39/// Use [`ThreadModeRawMutex`](crate::blocking_mutex::raw::ThreadModeRawMutex) when data is shared between tasks running on the same executor but you want a singleton.
40///
41
42pub struct RwLock<M, T> 40pub struct RwLock<M, T>
43where 41where
44 M: RawMutex, 42 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 @@
6//! 6//!
7//! - Define a struct `MyDriver` 7//! - Define a struct `MyDriver`
8//! - Implement [`Driver`] for it 8//! - Implement [`Driver`] for it
9//! - Register it as the global driver with [`time_driver_impl`](crate::time_driver_impl). 9//! - Register it as the global driver with [`time_driver_impl`].
10//! 10//!
11//! If your driver has a single set tick rate, enable the corresponding [`tick-hz-*`](crate#tick-rate) feature, 11//! If your driver has a single set tick rate, enable the corresponding [`tick-hz-*`](crate#tick-rate) feature,
12//! which will prevent users from needing to configure it themselves (or selecting an incorrect configuration). 12//! 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 {
205 /// 205 ///
206 /// # Errors 206 /// # Errors
207 /// 207 ///
208 /// * [`Unsupported`](crate::Unsupported) - This UsbBus implementation doesn't support 208 /// * [`Unsupported`] - This UsbBus implementation doesn't support
209 /// simulating a disconnect or it has not been enabled at creation time. 209 /// simulating a disconnect or it has not been enabled at creation time.
210 fn force_reset(&mut self) -> Result<(), Unsupported> { 210 fn force_reset(&mut self) -> Result<(), Unsupported> {
211 Err(Unsupported) 211 Err(Unsupported)
@@ -215,7 +215,7 @@ pub trait Bus {
215 /// 215 ///
216 /// # Errors 216 /// # Errors
217 /// 217 ///
218 /// * [`Unsupported`](crate::Unsupported) - This UsbBus implementation doesn't support 218 /// * [`Unsupported`] - This UsbBus implementation doesn't support
219 /// remote wakeup or it has not been enabled at creation time. 219 /// remote wakeup or it has not been enabled at creation time.
220 async fn remote_wakeup(&mut self) -> Result<(), Unsupported>; 220 async fn remote_wakeup(&mut self) -> Result<(), Unsupported>;
221} 221}