Struct spidev::Spidev
[−]
[src]
pub struct Spidev { // some fields omitted }
Provide high-level access to Linux Spidev Driver
Methods
impl Spidev
fn open<P: AsRef<Path>>(path: P) -> Result<Spidev>
Open the spidev device with the provided path
Typically, the path will be something like "/dev/spidev0.0"
where the first number if the bus and the second number
is the chip select on that bus for the device being targetted.
fn configure(&mut self, options: &SpidevOptions) -> Result<()>
Write the provided configuration to this device
fn transfer(&self, transfer: &mut SpidevTransfer) -> Result<()>
Perform a single transfer
fn transfer_multiple(&self, transfers: &Vec<SpidevTransfer>) -> Result<()>
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.