pub struct DataStatus {
    pub zyxor: bool,
    pub xyzor: (bool, bool, bool),
    pub zyxda: bool,
    pub xyzda: (bool, bool, bool),
}
Expand description

Data status structure. Decoded from the STATUS_REG register.

STATUS_REG has the following bit fields:

  • ZYXOR - X, Y and Z-axis data overrun
  • ZOR - Z-axis data overrun
  • YOR - Y-axis data overrun
  • XOR - X-axis data overrun
  • ZYXDA - X, Y and Z-axis new data available
  • ZDA - Z-axis new data available
  • YDA Y-axis new data available
  • XDA X-axis new data available

This struct splits the fields into more convenient groups:

  • zyxor -> ZYXOR
  • xyzor -> (XOR, YOR, ZOR)
  • zyxda -> ZYXDA
  • xyzda -> (XDA, YDA, ZDA)

Fields§

§zyxor: bool

ZYXOR bit

§xyzor: (bool, bool, bool)

(XOR, YOR, ZOR) bits

§zyxda: bool

ZYXDA bit

§xyzda: (bool, bool, bool)

(XDA, YDA, ZDA) bits

Trait Implementations§

Formats the value using the given formatter. 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.