pub struct Configuration {
    pub mode: Mode,
    pub datarate: DataRate,
    pub enable_x_axis: bool,
    pub enable_y_axis: bool,
    pub enable_z_axis: bool,
    pub block_data_update: bool,
    pub enable_temperature: bool,
}
Expand description

Sensor configuration options

Fields

mode: Mode

The operating mode, default Mode::HighResolution.

datarate: DataRate

The output data rate, default DataRate::Hz_400.

enable_x_axis: bool

Measure changes in the x axis, default true.

enable_y_axis: bool

Measure changes in the y axis, default true.

enable_z_axis: bool

Measure changes in the z axis, default true.

block_data_update: bool

When is data updated

  • when true: only after data is read
  • when false: continually

default true

enable_temperature: bool

Enable temperature measurements. When set, it implies block_data_update = true.

default: false

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.