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, AccelDataRateConfig, GyroTempDataRateConfig, 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, AccelDataRateConfig, GyroTempDataRateConfig, 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, AccelDataRateConfig, GyroTempDataRateConfig, and 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, AccelDataRateConfig, GyroTempDataRateConfig, 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.

Reads and returns unsacled Gyroscope measurements (LSB).

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

Sets accelerometer data rate config (AccelDataRateConfig).

Sets accelerometer full reading scale (Accel scale).

Sets gyroscope and temperatures data rate config (GyroTempDataRateConfig).

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.

Sets sample rate divisor. Sample rate divisor divides the internal sample rate to generate the sample rate that controls sensor data output rate, FIFO sample rate. NOTE: This register is only effective when dlpf mode used for GyroTempDataRateConfig see GyroTempDataRateConfig. SampleRate = InternalSampleRate / (1 + SMPLRT_DIV).

Calculates the average of the at-rest readings of accelerometer and gyroscope and then loads the resulting offsets into accelerometer and gyro bias registers.

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