pub struct Lsm6dsv16x { /* private fields */ }Expand description
LSM6DSV16X driver. Does not own the SPI bus or CS line — they are passed in per-call so that SPI4 can be shared with other devices (DWM tag on CS1).
Implementations§
Source§impl Lsm6dsv16x
impl Lsm6dsv16x
Sourcepub fn new<I, PINS, CS>(
spi: &mut SpiBus<I, PINS>,
cs: &mut CS,
) -> Result<Self, Error>where
I: Instance,
PINS: Pins<I>,
CS: CsControl,
pub fn new<I, PINS, CS>(
spi: &mut SpiBus<I, PINS>,
cs: &mut CS,
) -> Result<Self, Error>where
I: Instance,
PINS: Pins<I>,
CS: CsControl,
Probe WHO_AM_I, soft-reset, and configure accel + gyro for ±2 g / ±2000 dps at 120 Hz ODR in high-performance mode.
Sourcepub fn read_sample<I, PINS, CS>(
&mut self,
spi: &mut SpiBus<I, PINS>,
cs: &mut CS,
) -> Result<ImuSample, Error>where
I: Instance,
PINS: Pins<I>,
CS: CsControl,
pub fn read_sample<I, PINS, CS>(
&mut self,
spi: &mut SpiBus<I, PINS>,
cs: &mut CS,
) -> Result<ImuSample, Error>where
I: Instance,
PINS: Pins<I>,
CS: CsControl,
Burst-read gyro XYZ and accel XYZ (12 bytes starting at OUTX_L_G) and convert to SI units. Gyro comes first in the register map, then accel.
Auto Trait Implementations§
impl Freeze for Lsm6dsv16x
impl RefUnwindSafe for Lsm6dsv16x
impl Send for Lsm6dsv16x
impl Sync for Lsm6dsv16x
impl Unpin for Lsm6dsv16x
impl UnsafeUnpin for Lsm6dsv16x
impl UnwindSafe for Lsm6dsv16x
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more