[][src]Struct lsm9ds1::interface::spi::SpiInterface

pub struct SpiInterface<SPI, AG, M> { /* fields omitted */ }

This combines the SPI Interface and chip select pins

Methods

impl<SPI, AG, M, CommE, PinE> SpiInterface<SPI, AG, M> where
    SPI: Transfer<u8, Error = CommE> + Write<u8, Error = CommE>,
    AG: OutputPin<Error = PinE>,
    M: OutputPin<Error = PinE>, 
[src]

pub fn init(spi: SPI, ag_cs: AG, m_cs: M) -> Self[src]

Initializes an Interface with SPI instance and AG and M chip select OutputPins

Arguments

  • spi - SPI instance
  • ag_cs - Chip Select pin for Accelerometer/Gyroscope
  • m_cs - Chip Select pin for Magnetometer

Trait Implementations

impl<SPI, AG, M, CommE, PinE> Interface for SpiInterface<SPI, AG, M> where
    SPI: Transfer<u8, Error = CommE> + Write<u8, Error = CommE>,
    AG: OutputPin<Error = PinE>,
    M: OutputPin<Error = PinE>, 
[src]

Implementation of Interface

type Error = Error<CommE, PinE>

Auto Trait Implementations

impl<SPI, AG, M> Send for SpiInterface<SPI, AG, M> where
    AG: Send,
    M: Send,
    SPI: Send

impl<SPI, AG, M> Sync for SpiInterface<SPI, AG, M> where
    AG: Sync,
    M: Sync,
    SPI: Sync

impl<SPI, AG, M> Unpin for SpiInterface<SPI, AG, M> where
    AG: Unpin,
    M: Unpin,
    SPI: Unpin

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.