[−][src]Struct adxl355::Adxl355
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]
SPI: Transfer<u8, Error = E> + Write<u8, Error = E>,
CS: OutputPin<Error = PinError>,
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]
SPI: Transfer<u8, Error = E> + Write<u8, Error = E>,
CS: OutputPin<Error = PinError>,
E: Debug,
type Error = E
Error type
fn sample_rate(&mut self) -> Result<f32, Error<Self::Error>>
[src]
fn accel_norm(&mut self) -> Result<F32x3, Error<Self::Error>>
[src]
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]
SPI: Transfer<u8, Error = E> + Write<u8, Error = E>,
CS: OutputPin<Error = EO>,
E: Debug,
Auto Trait Implementations
impl<SPI, CS> Send for Adxl355<SPI, CS> where
CS: Send,
SPI: Send,
CS: Send,
SPI: Send,
impl<SPI, CS> Sync for Adxl355<SPI, CS> where
CS: Sync,
SPI: Sync,
CS: Sync,
SPI: Sync,
impl<SPI, CS> Unpin for Adxl355<SPI, CS> where
CS: Unpin,
SPI: Unpin,
CS: Unpin,
SPI: Unpin,
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,
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> Same<T> for T
type Output = T
Should always be Self
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.
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>,