Struct linux_embedded_hal::Spidev
source · pub struct Spidev(pub Spidev);
Expand description
Newtype around spidev::Spidev
that implements the embedded-hal
traits
Tuple Fields
0: Spidev
Implementations
Methods from Deref<Target = Spidev>
sourcepub fn configure(&mut self, options: &SpidevOptions) -> Result<(), Error>
pub fn configure(&mut self, options: &SpidevOptions) -> Result<(), Error>
Write the provided configuration to this device
sourcepub fn transfer(
&self,
transfer: &mut spi_ioc_transfer<'_, '_>
) -> Result<(), Error>
pub fn transfer(
&self,
transfer: &mut spi_ioc_transfer<'_, '_>
) -> Result<(), Error>
Perform a single transfer
sourcepub fn transfer_multiple(
&self,
transfers: &mut [spi_ioc_transfer<'_, '_>]
) -> Result<(), Error>
pub fn transfer_multiple(
&self,
transfers: &mut [spi_ioc_transfer<'_, '_>]
) -> Result<(), Error>
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
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more