[][src]Struct mpu9250::MpuConfig

pub struct MpuConfig<MODE> { /* fields omitted */ }

Configuration of MPU9250

Methods

impl MpuConfig<Imu>[src]

pub fn imu() -> Self[src]

Creates configuration for [Imu] driver (accelerometer + gyroscope). with default Accel scale, Gyro scale, [Mag scale], AccelDataRate, GyroTempDataRate, and no sample rate divisor.

impl MpuConfig<Marg>[src]

pub fn marg() -> Self[src]

Creates configuration for [Marg] driver (accelerometer + gyroscope + magnetometer) with default Accel scale, Gyro scale, Mag scale, AccelDataRate, GyroTempDataRate, and no sample rate divisor.

impl<MODE> MpuConfig<MODE>[src]

pub fn gyro_scale(&mut self, scale: GyroScale) -> &mut Self[src]

Sets gyroscope full reading scale (Gyro scale).

pub fn accel_scale(&mut self, scale: AccelScale) -> &mut Self[src]

Sets accelerometer full reading scale (Accel scale).

pub fn accel_data_rate(&mut self, data_rate: AccelDataRate) -> &mut Self[src]

Sets accelerometer data rate config (AccelDataRate).

pub fn gyro_temp_data_rate(&mut self, data_rate: GyroTempDataRate) -> &mut Self[src]

Sets gyroscope and temperatures data rate config (GyroTempDataRate).

pub fn sample_rate_divisor(&mut self, smplrt_div: u8) -> &mut Self[src]

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 GyroTempDataRate see GyroTempDataRate. SampleRate = InternalSampleRate / (1 + SMPLRT_DIV).

impl MpuConfig<Marg>[src]

pub fn mag_scale(&mut self, scale: MagScale) -> &mut Self[src]

Sets magnetrometer full reading scale (MagScale)

Trait Implementations

impl<MODE: Debug> Debug for MpuConfig<MODE>[src]

impl<MODE: Copy> Copy for MpuConfig<MODE>[src]

impl<MODE: Clone> Clone for MpuConfig<MODE>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<MODE> Send for MpuConfig<MODE> where
    MODE: Send

impl<MODE> Sync for MpuConfig<MODE> where
    MODE: Sync

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>,