Struct mpu9250::Mpu9250[][src]

pub struct Mpu9250<SPI, NCS, MODE> { /* fields omitted */ }

MPU9250 driver

Methods

impl<E, SPI, NCS> Mpu9250<SPI, NCS, Imu> where
    SPI: Write<u8, Error = E> + Transfer<u8, Error = E>,
    NCS: OutputPin
[src]

Creates a new Imu driver from a SPI peripheral and a NCS pin with default Accel scale, Gyro scale, DLPF, and with no sample rate divisor.

Creates a new Imu driver from a SPI peripheral and a NCS pin with optionally configured Accel scale, Gyro scale, DLPF, and sample rate divisor.

Reads and returns raw unscaled Accelerometer + Gyroscope + Thermometer measurements (LSB).

Reads and returns Accelerometer + Gyroscope + Thermometer measurements scaled and converted to respective units.

impl<E, SPI, NCS> Mpu9250<SPI, NCS, Marg> where
    SPI: Write<u8, Error = E> + Transfer<u8, Error = E>,
    NCS: OutputPin
[src]

Creates a new Marg driver from a SPI peripheral and a NCS pin with default Accel scale, Gyro scale, Mag scale, DLPF, and with no sample rate divisor.

Creates a new MARG driver from a SPI peripheral and a NCS pin with optionally configured Accel scale, Gyro scale, Mag scale, DLPF, and sample rate divisor.

Reads and returns raw unscaled Accelerometer + Gyroscope + Thermometer

  • Magnetometer measurements (LSB).

Reads and returns Accelerometer + Gyroscope + Thermometer + Magnetometer measurements scaled and converted to respective units.

Reads and returns raw unscaled Magnetometer measurements (LSB).

Read and returns Magnetometer measurements scaled, adjusted for factory sensitivities, and converted to Teslas.

Returns raw mag sensitivity adjustments

Returns mag sensitivity adjustments

Sets magnetrometer full reading scale (MagScale)

Reads the AK8963 (magnetometer) WHO_AM_I register; should return 0x48

impl<E, SPI, NCS, MODE> Mpu9250<SPI, NCS, MODE> where
    SPI: Write<u8, Error = E> + Transfer<u8, Error = E>,
    NCS: OutputPin
[src]

Reads and returns unscaled accelerometer measurements (LSB).

Reads and returns accelerometer measurements scaled and converted to g.

Applies a digital low pass filter to the accelerometer data (Dlpf).

Sets accelerometer full reading scale (Accel scale).

Reads and returns unsacled Gyroscope measurements (LSB).

Reads and returns gyroscope measurements scaled and converted to rad/s.

Applies a digital low pass filter to the gyroscope data (Dlpf).

Sets gyroscope full reading scale (Gyro scale).

Reads and returns raw unscaled temperature sensor measurements (LSB).

Reads and returns adjusted temperature measurements converted to C.

Clears Fchoice bits and sets rate divisor (SMPLRT_DIV).

Destroys the driver recovering the SPI peripheral and the NCS pin

Reads the WHO_AM_I register; should return 0x71

impl<SPI, NCS, MODE> Mpu9250<SPI, NCS, MODE>
[src]

Returns Accelerometer resolution.

Returns Gyroscope resolution.

Returns Magnetometer resolution.

Auto Trait Implementations

impl<SPI, NCS, MODE> Send for Mpu9250<SPI, NCS, MODE> where
    MODE: Send,
    NCS: Send,
    SPI: Send

impl<SPI, NCS, MODE> Sync for Mpu9250<SPI, NCS, MODE> where
    MODE: Sync,
    NCS: Sync,
    SPI: Sync