Struct bma2xx::Bma222e

source ·
pub struct Bma222e<I2C> { /* private fields */ }
Expand description

Create an instance of the accelerometer

Implementations

Create a new instance for fun and profit!

Soft-reset the chip

Read the temperature of the chip

Return the chip’s identifier. While there are many devices in this family, this crate was written for the BMA222E and you should compare this value to REG_CHIPID.

Set the FIFO mode for events

How many events are stored in the FIFO

Did the event FIFO overflow?

Pull accelerometer data from the FIFO.

Grab an axis and create an AxisData

Grab data for X axis

Grab data for Y axis

Grab data for Z axis

How many writes are left in the device’s EEPROM. Each write will decrement this counter and the chip will deny writes at zero, so use any writes sparingly. The counter is only four bits wide (16 total writes)

Pull values from internal EEPROM

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.

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.