Skip to content

Commit 0584ebe

Browse files
committed
Misc doc fixes.
1 parent a0f2426 commit 0584ebe

File tree

6 files changed

+13
-28
lines changed

6 files changed

+13
-28
lines changed

embedded-hal-async/README.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,9 @@
77
An asynchronous Hardware Abstraction Layer (HAL) for embedded systems.
88

99
This crate contains asynchronous versions of the [`embedded-hal`](https://crates.io/crates/embedded-hal) traits and shares its scope and [design goals](https://docs.rs/embedded-hal/latest/embedded_hal/#design-goals).
10-
The purpose of this crate is to iterate over these trait versions before integrating them into [`embedded-hal`](https://crates.io/crates/embedded-hal).
11-
12-
**NOTE** These traits are still experimental. At least one breaking change to this crate is expected in the future (changing from GATs to `async fn`), but there might be more.
1310

1411
This project is developed and maintained by the [HAL team](https://github.com/rust-embedded/wg#the-hal-team).
1512

16-
## [API reference]
17-
18-
[API reference]: https://docs.rs/embedded-hal-async
19-
2013
## Minimum Supported Rust Version (MSRV)
2114

2215
This crate requires Rust nightly newer than `nightly-2022-11-22`, due to requiring support for
@@ -30,8 +23,8 @@ at any time.
3023
Licensed under either of
3124

3225
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or
33-
http://www.apache.org/licenses/LICENSE-2.0)
34-
- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
26+
<http://www.apache.org/licenses/LICENSE-2.0>)
27+
- MIT license ([LICENSE-MIT](LICENSE-MIT) or <http://opensource.org/licenses/MIT>)
3528

3629
at your option.
3730

embedded-hal-async/src/lib.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
1-
//! An asynchronous Hardware Abstraction Layer (HAL) for embedded systems
2-
//!
3-
//! **NOTE** These traits are still experimental. At least one breaking
4-
//! change to this crate is expected in the future (changing from GATs to
5-
//! `async fn`), but there might be more.
6-
//!
7-
//! **NOTE** The traits and modules in this crate should follow the same structure as in
8-
//! `embedded-hal` to ease merging and migration.
9-
1+
#![doc = include_str!("../README.md")]
102
#![warn(missing_docs)]
113
#![no_std]
124
#![allow(incomplete_features)]

embedded-hal-async/src/spi.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pub use spi_transaction as transaction;
114114
/// `SpiDevice` represents ownership over a single SPI device on a (possibly shared) bus, selected
115115
/// with a CS (Chip Select) pin.
116116
///
117-
/// See (the docs on embedded-hal)[embedded_hal::spi::blocking] for important information on SPI Bus vs Device traits.
117+
/// See (the docs on embedded-hal)[embedded_hal::spi] for important information on SPI Bus vs Device traits.
118118
///
119119
/// # Safety
120120
///
@@ -239,7 +239,7 @@ unsafe impl<T: SpiDevice> SpiDevice for &mut T {
239239
pub trait SpiBusFlush: ErrorType {
240240
/// Wait until all operations have completed and the bus is idle.
241241
///
242-
/// See (the docs on embedded-hal)[embedded_hal::spi::blocking] for information on flushing.
242+
/// See (the docs on embedded-hal)[embedded_hal::spi] for information on flushing.
243243
async fn flush(&mut self) -> Result<(), Self::Error>;
244244
}
245245

@@ -257,7 +257,7 @@ pub trait SpiBusRead<Word: 'static + Copy = u8>: SpiBusFlush {
257257
/// typically `0x00`, `0xFF`, or configurable.
258258
///
259259
/// Implementations are allowed to return before the operation is
260-
/// complete. See (the docs on embedded-hal)[embedded_hal::spi::blocking] for details on flushing.
260+
/// complete. See (the docs on embedded-hal)[embedded_hal::spi] for details on flushing.
261261
async fn read(&mut self, words: &mut [Word]) -> Result<(), Self::Error>;
262262
}
263263

@@ -272,7 +272,7 @@ pub trait SpiBusWrite<Word: 'static + Copy = u8>: SpiBusFlush {
272272
/// Write `words` to the slave, ignoring all the incoming words
273273
///
274274
/// Implementations are allowed to return before the operation is
275-
/// complete. See (the docs on embedded-hal)[embedded_hal::spi::blocking] for details on flushing.
275+
/// complete. See (the docs on embedded-hal)[embedded_hal::spi] for details on flushing.
276276
async fn write(&mut self, words: &[Word]) -> Result<(), Self::Error>;
277277
}
278278

@@ -286,7 +286,7 @@ impl<T: SpiBusWrite<Word>, Word: 'static + Copy> SpiBusWrite<Word> for &mut T {
286286
///
287287
/// `SpiBus` represents **exclusive ownership** over the whole SPI bus, with SCK, MOSI and MISO pins.
288288
///
289-
/// See (the docs on embedded-hal)[embedded_hal::spi::blocking] for important information on SPI Bus vs Device traits.
289+
/// See (the docs on embedded-hal)[embedded_hal::spi] for important information on SPI Bus vs Device traits.
290290
pub trait SpiBus<Word: 'static + Copy = u8>: SpiBusRead<Word> + SpiBusWrite<Word> {
291291
/// Write and read simultaneously. `write` is written to the slave on MOSI and
292292
/// words received on MISO are stored in `read`.
@@ -298,7 +298,7 @@ pub trait SpiBus<Word: 'static + Copy = u8>: SpiBusRead<Word> + SpiBusWrite<Word
298298
/// typically `0x00`, `0xFF`, or configurable.
299299
///
300300
/// Implementations are allowed to return before the operation is
301-
/// complete. See (the docs on embedded-hal)[embedded_hal::spi::blocking] for details on flushing.
301+
/// complete. See (the docs on embedded-hal)[embedded_hal::spi] for details on flushing.
302302
async fn transfer<'a>(
303303
&'a mut self,
304304
read: &'a mut [Word],
@@ -310,7 +310,7 @@ pub trait SpiBus<Word: 'static + Copy = u8>: SpiBusRead<Word> + SpiBusWrite<Word
310310
/// `words` buffer, overwriting it.
311311
///
312312
/// Implementations are allowed to return before the operation is
313-
/// complete. See (the docs on embedded-hal)[embedded_hal::spi::blocking] for details on flushing.
313+
/// complete. See (the docs on embedded-hal)[embedded_hal::spi] for details on flushing.
314314
async fn transfer_in_place<'a>(&'a mut self, words: &'a mut [Word]) -> Result<(), Self::Error>;
315315
}
316316

embedded-hal-bus/src/spi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ where
2828

2929
/// [`SpiDevice`] implementation with exclusive access to the bus (not shared).
3030
///
31-
/// This is the most straightforward way of obtaining an [`SpiDevice`] from an [`SpiBus`](embedded_hal::spi::blocking::SpiBus),
31+
/// This is the most straightforward way of obtaining an [`SpiDevice`] from an [`SpiBus`](embedded_hal::spi::SpiBus),
3232
/// ideal for when no sharing is required (only one SPI device is present on the bus).
3333
pub struct ExclusiveDevice<BUS, CS> {
3434
bus: BUS,

embedded-hal/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
//!
3636
//! - Where possible must *not* be tied to a specific asynchronous model. The API should be usable
3737
//! in blocking mode, with the `futures` model, with an async/await model or with a callback model.
38-
//! (cf. the [`nb`] crate)
38+
//! (cf. the [`nb`](https://docs.rs/nb) crate)
3939
//!
4040
//! - Must be minimal, and thus easy to implement and zero cost, yet highly composable. People that
4141
//! want higher level abstraction should *prefer to use this HAL* rather than *re-implement*

embedded-hal/src/spi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
//! # For HAL authors
133133
//!
134134
//! HALs **must** implement [`SpiBus`], [`SpiBusRead`] and [`SpiBusWrite`]. Users can combine the bus together with the CS pin (which should
135-
//! implement [`OutputPin`](crate::digital::blocking::OutputPin)) using HAL-independent [`SpiDevice`] implementations such as the ones in [`embedded-hal-bus`](https://crates.io/crates/embedded-hal-bus).
135+
//! implement [`OutputPin`](crate::digital::OutputPin)) using HAL-independent [`SpiDevice`] implementations such as the ones in [`embedded-hal-bus`](https://crates.io/crates/embedded-hal-bus).
136136
//!
137137
//! HALs may additionally implement [`SpiDevice`] to **take advantage of hardware CS management**, which may provide some performance
138138
//! benefits. (There's no point in a HAL implementing [`SpiDevice`] if the CS management is software-only, this task is better left to

0 commit comments

Comments
 (0)