[−][src]Struct mpu9250::MpuConfig
Configuration of MPU9250
Implementations
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: Clone> Clone for MpuConfig<MODE>
[src]
impl<MODE: Copy> Copy for MpuConfig<MODE>
[src]
impl<MODE: Debug> Debug for MpuConfig<MODE>
[src]
Auto Trait Implementations
impl<MODE> RefUnwindSafe for MpuConfig<MODE> where
MODE: RefUnwindSafe,
MODE: RefUnwindSafe,
impl<MODE> Send for MpuConfig<MODE> where
MODE: Send,
MODE: Send,
impl<MODE> Sync for MpuConfig<MODE> where
MODE: Sync,
MODE: Sync,
impl<MODE> Unpin for MpuConfig<MODE> where
MODE: Unpin,
MODE: Unpin,
impl<MODE> UnwindSafe for MpuConfig<MODE> where
MODE: UnwindSafe,
MODE: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,