pub struct Spidev(pub Spidev);
Expand description

Newtype around spidev::Spidev that implements the embedded-hal traits

Tuple Fields

0: Spidev

Implementations

See spidev::Spidev::open for details.

Methods from Deref<Target = Spidev>

Get a reference to the underlying File object

Write the provided configuration to this device

Perform a single transfer

Perform multiple transfers in a single system call to the kernel

Chaining together multiple requests like this can reduce latency and be used for conveniently and efficient implementing some protocols without extra round trips back to userspace.

Trait Implementations

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Error type

Write and read simultaneously. write is written to the slave on MOSI and words received on MISO are stored in read. Read more

Write and read simultaneously. The contents of words are written to the slave, and the received words are stored into the same words buffer, overwriting it. Read more

Wait until all operations have completed and the bus is idle. Read more

Read words from the slave. Read more

Write words to the slave, ignoring all the incoming words Read more

SPI Bus type for this device.

Perform a transaction against the device. Read more

Do a write within a transaction. Read more

Do a read within a transaction. Read more

Do a transfer within a transaction. Read more

Do an in-place transfer within a transaction. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.