Skip to content

Commit

Permalink
Document delay operations are capped
Browse files Browse the repository at this point in the history
  • Loading branch information
LehMaxence committed Sep 22, 2023
1 parent 5878590 commit 847e93e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ use std::path::Path;

/// Newtype around [`spidev::Spidev`] that implements the `embedded-hal` traits
///
/// [Delay operations][delay] are capped to 65535 microseconds.
///
/// [`spidev::Spidev`]: https://docs.rs/spidev/0.5.2/spidev/struct.Spidev.html
/// [delay]: embedded_hal::spi::Operation::DelayUs
pub struct Spidev(pub spidev::Spidev);

impl Spidev {
Expand Down Expand Up @@ -79,6 +82,12 @@ mod embedded_hal_impl {
}

impl SpiDevice for Spidev {
///Perform a transaction against the device. [Read more][transaction]
///
/// [Delay operations][delay] are capped to 65535 microseconds.
///
/// [transaction]: SpiDevice::transaction
/// [delay]: SpiOperation::DelayUs
fn transaction(
&mut self,
operations: &mut [SpiOperation<'_, u8>],
Expand Down

0 comments on commit 847e93e

Please sign in to comment.