[][src]Struct adxl355::Adxl355

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

ADXL355 driver

Methods

impl<SPI, CS, E, PinError> Adxl355<SPI, CS> where
    SPI: Transfer<u8, Error = E> + Write<u8, Error = E>,
    CS: OutputPin<Error = PinError>, 
[src]

pub fn default(spi: SPI, cs: CS) -> Result<Self, E>[src]

Creates a new adxl355 driver from a SPI peripheral with default configuration.

pub fn new(spi: SPI, cs: CS, config: &Config) -> Result<Self, E>[src]

Takes a config object to initialize the adxl355 driver

pub fn start(&mut self)[src]

Puts the device in Measurement mode. The defaut after power up is Standby mode.

pub fn read_temp_raw(&mut self) -> u16[src]

Returns the raw contents of the temperature registers

pub fn get_device_id(&mut self) -> u8[src]

Get the device ID

Trait Implementations

impl<SPI, CS, E, PinError> Accelerometer for Adxl355<SPI, CS> where
    SPI: Transfer<u8, Error = E> + Write<u8, Error = E>,
    CS: OutputPin<Error = PinError>,
    E: Debug
[src]

type Error = E

Error type

impl<SPI, CS, E, EO> RawAccelerometer<I32x3> for Adxl355<SPI, CS> where
    SPI: Transfer<u8, Error = E> + Write<u8, Error = E>,
    CS: OutputPin<Error = EO>,
    E: Debug
[src]

type Error = E

Error type

fn accel_raw(&mut self) -> Result<I32x3, Error<E>>[src]

Gets acceleration vector reading from the accelerometer Returns a 3D vector with x,y,z, fields in a Result

Auto Trait Implementations

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

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

impl<SPI, CS> Unpin for Adxl355<SPI, CS> where
    CS: 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> 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.

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.