Crate lis2dh12

Source
Expand description

Platform-agnostic LIS2DH12 accelerometer driver which uses I2C via embedded-hal and implements the Accelerometer trait from the accelerometer crate.

Structs§

DataStatus
Data status structure, decoded from STATUS_REG register
Error
Accelerometer errors, generic around another error type E representing an (optional) cause of this error.
F32x3
3-dimensional XYZ vector of f32 values
I16x3
3-dimensional XYZ vector of i16 values
Int
Interrupt setting and status
Lis2dh12
LIS2DH12 driver

Enums§

AddrDetectionError
Errors returned from the detect_i2c_addr
Aoi6d
AOI-6D Interrupt mode
ErrorKind
Kinds of accelerometer errors
FifoMode
FIFO mode selection
FullScale
Full-scale selection
Mode
Operating mode
Odr
Output Data Rate
SlaveAddr
Possible slave addresses

Traits§

Accelerometer
Accelerometer trait which provides g-normalized readings.
RawAccelerometer
Read raw acceleration vectors of type V: Vector.

Functions§

detect_i2c_addr
This function tries to detect the I2C address of the device by scanning all possible I2C addresses.