Skip to content

Commit 7bcaa87

Browse files
committed
Fix doc links and one incorrect type name
1 parent 5d406a4 commit 7bcaa87

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

embedded-hal-async/src/spi.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub use embedded_hal::spi::{
99
/// `SpiDevice` represents ownership over a single SPI device on a (possibly shared) bus, selected
1010
/// with a CS (Chip Select) pin.
1111
///
12-
/// See (the docs on embedded-hal)[embedded_hal::spi] for important information on SPI Bus vs Device traits.
12+
/// See [the docs on embedded-hal](embedded_hal::spi) for important information on SPI Bus vs Device traits.
1313
pub trait SpiDevice<Word: Copy + 'static = u8>: ErrorType {
1414
/// Perform a transaction against the device.
1515
///
@@ -108,21 +108,21 @@ impl<Word: Copy + 'static, T: SpiDevice<Word> + ?Sized> SpiDevice<Word> for &mut
108108
///
109109
/// `SpiBus` represents **exclusive ownership** over the whole SPI bus, with SCK, MOSI and MISO pins.
110110
///
111-
/// See (the docs on embedded-hal)[embedded_hal::spi] for important information on SPI Bus vs Device traits.
111+
/// See [the docs on embedded-hal][embedded_hal::spi] for important information on SPI Bus vs Device traits.
112112
pub trait SpiBus<Word: 'static + Copy = u8>: ErrorType {
113113
/// Read `words` from the slave.
114114
///
115115
/// The word value sent on MOSI during reading is implementation-defined,
116116
/// typically `0x00`, `0xFF`, or configurable.
117117
///
118118
/// Implementations are allowed to return before the operation is
119-
/// complete. See (the docs on embedded-hal)[embedded_hal::spi] for details on flushing.
119+
/// complete. See [the docs on embedded-hal][embedded_hal::spi] for details on flushing.
120120
async fn read(&mut self, words: &mut [Word]) -> Result<(), Self::Error>;
121121

122122
/// Write `words` to the slave, ignoring all the incoming words.
123123
///
124124
/// Implementations are allowed to return before the operation is
125-
/// complete. See (the docs on embedded-hal)[embedded_hal::spi] for details on flushing.
125+
/// complete. See [the docs on embedded-hal][embedded_hal::spi] for details on flushing.
126126
async fn write(&mut self, words: &[Word]) -> Result<(), Self::Error>;
127127

128128
/// Write and read simultaneously. `write` is written to the slave on MOSI and
@@ -135,20 +135,20 @@ pub trait SpiBus<Word: 'static + Copy = u8>: ErrorType {
135135
/// typically `0x00`, `0xFF`, or configurable.
136136
///
137137
/// Implementations are allowed to return before the operation is
138-
/// complete. See (the docs on embedded-hal)[embedded_hal::spi] for details on flushing.
138+
/// complete. See [the docs on embedded-hal][embedded_hal::spi] for details on flushing.
139139
async fn transfer(&mut self, read: &mut [Word], write: &[Word]) -> Result<(), Self::Error>;
140140

141141
/// Write and read simultaneously. The contents of `words` are
142142
/// written to the slave, and the received words are stored into the same
143143
/// `words` buffer, overwriting it.
144144
///
145145
/// Implementations are allowed to return before the operation is
146-
/// complete. See (the docs on embedded-hal)[embedded_hal::spi] for details on flushing.
146+
/// complete. See [the docs on embedded-hal][embedded_hal::spi] for details on flushing.
147147
async fn transfer_in_place(&mut self, words: &mut [Word]) -> Result<(), Self::Error>;
148148

149149
/// Wait until all operations have completed and the bus is idle.
150150
///
151-
/// See (the docs on embedded-hal)[embedded_hal::spi] for information on flushing.
151+
/// See [the docs on embedded-hal][embedded_hal::spi] for information on flushing.
152152
async fn flush(&mut self) -> Result<(), Self::Error>;
153153
}
154154

embedded-hal-bus/src/spi/critical_section.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@ pub struct CriticalSectionDevice<'a, BUS, CS, D> {
2323
}
2424

2525
impl<'a, BUS, CS, D> CriticalSectionDevice<'a, BUS, CS, D> {
26-
/// Create a new ExclusiveDevice.
26+
/// Create a new [`CriticalSectionDevice`].
2727
#[inline]
2828
pub fn new(bus: &'a Mutex<RefCell<BUS>>, cs: CS, delay: D) -> Self {
2929
Self { bus, cs, delay }
3030
}
3131
}
3232

3333
impl<'a, BUS, CS> CriticalSectionDevice<'a, BUS, CS, super::NoDelay> {
34-
/// Create a new CriticalSectionDevice without support for in-transaction delays.
34+
/// Create a new [`CriticalSectionDevice`] without support for in-transaction delays.
3535
///
3636
/// # Panics
3737
///
3838
/// The returned device will panic if you try to execute a transaction
39-
/// that contains any operations of type `Operation::DelayUs`.
39+
/// that contains any operations of type [`Operation::DelayUs`].
4040
#[inline]
4141
pub fn new_no_delay(bus: &'a Mutex<RefCell<BUS>>, cs: CS) -> Self {
4242
Self {

embedded-hal-bus/src/spi/exclusive.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub struct ExclusiveDevice<BUS, CS, D> {
2222
}
2323

2424
impl<BUS, CS, D> ExclusiveDevice<BUS, CS, D> {
25-
/// Create a new ExclusiveDevice.
25+
/// Create a new [`ExclusiveDevice`].
2626
#[inline]
2727
pub fn new(bus: BUS, cs: CS, delay: D) -> Self {
2828
Self { bus, cs, delay }
@@ -42,7 +42,7 @@ impl<BUS, CS, D> ExclusiveDevice<BUS, CS, D> {
4242
}
4343

4444
impl<BUS, CS> ExclusiveDevice<BUS, CS, super::NoDelay> {
45-
/// Create a new ExclusiveDevice without support for in-transaction delays.
45+
/// Create a new [`ExclusiveDevice`] without support for in-transaction delays.
4646
///
4747
/// # Panics
4848
///

embedded-hal-bus/src/spi/refcell.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ pub struct RefCellDevice<'a, BUS, CS, D> {
2020
}
2121

2222
impl<'a, BUS, CS, D> RefCellDevice<'a, BUS, CS, D> {
23-
/// Create a new RefCellDevice.
23+
/// Create a new [`RefCellDevice`].
2424
#[inline]
2525
pub fn new(bus: &'a RefCell<BUS>, cs: CS, delay: D) -> Self {
2626
Self { bus, cs, delay }
2727
}
2828
}
2929

3030
impl<'a, BUS, CS> RefCellDevice<'a, BUS, CS, super::NoDelay> {
31-
/// Create a new RefCellDevice without support for in-transaction delays.
31+
/// Create a new [`RefCellDevice`] without support for in-transaction delays.
3232
///
3333
/// # Panics
3434
///

embedded-hal-nb/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
//! [`svd2rust`]: https://crates.io/crates/svd2rust
5858
//!
5959
//! Shown below is an implementation of some of the HAL traits for the [`stm32f1xx-hal`] crate. This
60-
//! single implementation will work for *any* microcontroller in the STM32F1xx family.
60+
//! single implementation will work for *any* microcontroller in the `STM32F1xx` family.
6161
//!
6262
//! [`stm32f1`]: https://crates.io/crates/stm32f1
6363
//!

0 commit comments

Comments
 (0)