Struct linux_embedded_hal::Spidev
[−]
[src]
pub struct Spidev(pub Spidev);
Newtype around spidev::Spidev
that implements the embedded-hal
traits
Methods
impl Spidev
[src]
fn open<P>(path: P) -> Result<Self> where
P: AsRef<Path>,
[src]
P: AsRef<Path>,
See spidev::Spidev::open
for details.
Methods from Deref<Target = Spidev>
fn configure(&mut self, options: &SpidevOptions) -> Result<(), Error>
[src]
Write the provided configuration to this device
fn transfer(&self, transfer: &mut spi_ioc_transfer) -> Result<(), Error>
[src]
Perform a single transfer
fn transfer_multiple(
&self,
transfers: &mut [spi_ioc_transfer]
) -> Result<(), Error>
[src]
&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
impl Transfer<u8> for Spidev
[src]
type Error = Error
Error type
fn transfer<'b>(&mut self, buffer: &'b mut [u8]) -> Result<&'b [u8]>
[src]
Sends words
to the slave. Returns the words
received from the slave
impl Write<u8> for Spidev
[src]
type Error = Error
Error type
fn write(&mut self, buffer: &[u8]) -> Result<()>
[src]
Sends words
to the slave, ignoring all the incoming words
impl Deref for Spidev
[src]
type Target = Spidev
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.