Struct lis2dw12::Lis2dw12[][src]

pub struct Lis2dw12<SPI, CS> { /* fields omitted */ }

Implementations

impl<SPI, SpiError, CS, PinError> Lis2dw12<SPI, CS> where
    SPI: Transfer<u8, Error = SpiError>,
    CS: OutputPin<Error = PinError>, 
[src]

pub fn new(spi: SPI, cs: CS) -> Self[src]

pub fn destroy(self) -> (SPI, CS)[src]

pub fn check_who_am_i(&mut self) -> Result<(), Error<SpiError, PinError>>[src]

pub fn set_low_power_mode(
    &mut self,
    low_power_mode: LowPowerMode
) -> Result<(), Error<SpiError, PinError>>
[src]

pub fn set_operating_mode(
    &mut self,
    mode: OperatingMode
) -> Result<(), Error<SpiError, PinError>>
[src]

pub fn set_low_noise(
    &mut self,
    is_enabled: bool
) -> Result<(), Error<SpiError, PinError>>
[src]

pub fn set_full_scale_selection(
    &mut self,
    full_scale_selection: FullScaleSelection
) -> Result<(), Error<SpiError, PinError>>
[src]

pub fn set_output_data_rate(
    &mut self,
    odr: OutputDataRate
) -> Result<(), Error<SpiError, PinError>>
[src]

pub fn get_device_id(&mut self) -> Result<u8, Error<SpiError, PinError>>[src]

pub fn get_raw(&mut self) -> Result<I16x3, Error<SpiError, PinError>>[src]

Trait Implementations

impl<SPI, SpiError, CS, PinError> RawAccelerometer<I16x3> for Lis2dw12<SPI, CS> where
    SPI: Transfer<u8, Error = SpiError>,
    CS: OutputPin<Error = PinError>,
    SpiError: Debug,
    PinError: Debug
[src]

fn accel_raw(&mut self) -> Result<I16x3, Error<Self::Error>>[src]

Get acceleration reading from the accelerometer

type Error = Error<SpiError, PinError>

Error type

Auto Trait Implementations

impl<SPI, CS> Send for Lis2dw12<SPI, CS> where
    CS: Send,
    SPI: Send

impl<SPI, CS> Sync for Lis2dw12<SPI, CS> where
    CS: Sync,
    SPI: Sync

impl<SPI, CS> Unpin for Lis2dw12<SPI, CS> where
    CS: Unpin,
    SPI: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.