[−][src]Struct linux_embedded_hal::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]
P: AsRef<Path>,
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]
&self,
transfer: &mut spi_ioc_transfer<'_, '_>
) -> Result<(), Error>
Perform a single transfer
pub 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 Deref for Spidev
[src]
type Target = Spidev
The resulting type after dereferencing.
pub fn deref(&self) -> &Self::Target
[src]
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
pub fn try_exec<'a>(
&mut self,
operations: &mut [SpiOperation<'a, u8>]
) -> Result<(), Self::Error>
[src]
&mut self,
operations: &mut [SpiOperation<'a, u8>]
) -> Result<(), Self::Error>
impl Transfer<u8> for Spidev
[src]
type Error = Error
Error type
pub fn try_transfer<'b>(&mut self, buffer: &'b mut [u8]) -> Result<&'b [u8]>
[src]
impl Write<u8> for Spidev
[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,