[][src]Struct linux_embedded_hal::Spidev

pub struct Spidev(pub Spidev);

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

Implementations

impl Spidev[src]

pub fn open<P>(path: P) -> Result<Self> where
    P: AsRef<Path>, 
[src]

See spidev::Spidev::open for details.

Methods from Deref<Target = Spidev>

pub fn inner(&self) -> &File[src]

Get a reference to the underlying File object

pub fn configure(&mut self, options: &SpidevOptions) -> Result<(), Error>[src]

Write the provided configuration to this device

pub fn transfer(
    &self,
    transfer: &mut spi_ioc_transfer<'_, '_>
) -> Result<(), Error>
[src]

Perform a single transfer

pub fn transfer_multiple(
    &self,
    transfers: &mut [spi_ioc_transfer<'_, '_>]
) -> Result<(), Error>
[src]

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

impl Deref for Spidev[src]

type Target = Spidev

The resulting type after dereferencing.

impl DerefMut for Spidev[src]

impl Transactional<u8> for Spidev[src]

Transactional implementation batches SPI operations into a single transaction

type Error = Error

Associated error type

impl Transfer<u8> for Spidev[src]

type Error = Error

Error type

impl Write<u8> for Spidev[src]

type Error = Error

Error type

Auto Trait Implementations

impl RefUnwindSafe for Spidev

impl Send for Spidev

impl Sync for Spidev

impl Unpin for Spidev

impl UnwindSafe for Spidev

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.