mirror of
https://github.com/rust-embedded/embedded-hal.git
synced 2026-03-23 15:40:19 +00:00
Merge pull request #715 from goldlinker/master
chore: fix some minor issues in the comments
This commit is contained in:
@@ -12,7 +12,7 @@ use crate::util::AtomicCell;
|
||||
/// each with its own `CS` pin.
|
||||
///
|
||||
/// Sharing is implemented with a [`AtomicDevice`], which consists of an `UnsafeCell` and an `AtomicBool` "locked" flag.
|
||||
/// This means it has low overhead, like [`RefCellDevice`](crate::spi::RefCellDevice). Aditionally, it is `Send`,
|
||||
/// This means it has low overhead, like [`RefCellDevice`](crate::spi::RefCellDevice). Additionally, it is `Send`,
|
||||
/// which allows sharing a single bus across multiple threads (interrupt priority level), like [`CriticalSectionDevice`](crate::spi::CriticalSectionDevice),
|
||||
/// while not using critical sections and therefore impacting real-time performance less.
|
||||
///
|
||||
|
||||
@@ -96,7 +96,7 @@ impl<T: tokio::io::AsyncWrite + Unpin + ?Sized> embedded_io_async::Write for Fro
|
||||
impl<T: tokio::io::AsyncSeek + Unpin + ?Sized> embedded_io_async::Seek for FromTokio<T> {
|
||||
async fn seek(&mut self, pos: embedded_io::SeekFrom) -> Result<u64, Self::Error> {
|
||||
// Note: `start_seek` can return an error if there is another seek in progress.
|
||||
// Therefor it is recommended to call `poll_complete` before any call to `start_seek`.
|
||||
// Therefore it is recommended to call `poll_complete` before any call to `start_seek`.
|
||||
poll_fn(|cx| Pin::new(&mut self.inner).poll_complete(cx)).await?;
|
||||
Pin::new(&mut self.inner).start_seek(pos.into())?;
|
||||
poll_fn(|cx| Pin::new(&mut self.inner).poll_complete(cx)).await
|
||||
|
||||
Reference in New Issue
Block a user