pub struct Mma8x5x<I2C, IC, MODE> { /* private fields */ }
Expand description

MMA8x5x device driver

Implementations

Destroy driver instance, return I²C bus and delay instance.

Return device ID (Who am I)

Get offset correction for axes X, Y and Z.

Set G scale: +/-2g, +/-4g, +/-8g

Set read mode (Normal/Fast)

Set offset correction.

The resolution is 1.96/LSB. The offset compensation range is +/-250mg.

Set output data rate in WAKE mode

Set power mode in WAKE mode

Reset device

Enable self-test mode

Disable self-test mode

Auto-sleep/wake configuration

Set power mode in sleep mode

Enable auto-sleep mode

Disable auto-sleep mode

Set sampling rate used in auto-sleep mode

Set auto-sleep/wake count

Interrupt configuration

Set interrupt pin polarity

Set interrupt pin configuration

Set enabled interrupts

Set interrupt source pin routes

Set interrupts that wake the device

Portrait/landscape detection configuration

Enable portrait/landscape detection

Disable portrait/landscape detection

Set portrait/landscape debounce counter mode

Set portrait/landscape debounce counter

Set portrait/landscape debounce counter

Set portrait/landscape debounce counter

Change mode to active

Change mode to standby

Reset (changes mode to standby)

Read unscaled acceleration sensor data.

Note: The values are only valid when in active mode or during self-test

Read acceleration sensor data scaled to G.

Note: The values are only valid when in active mode or during self-test

Read unscaled acceleration sensor data.

Note: The values are only valid when in active mode or during self-test

Read acceleration sensor data scaled to G.

Note: The values are only valid when in active mode or during self-test

Read unscaled acceleration sensor data.

Note: The values are only valid when in active mode or during self-test

Read acceleration sensor data scaled to G.

Note: The values are only valid when in active mode or during self-test

Read unscaled acceleration sensor data.

Note: The values are only valid when in active mode or during self-test

Read acceleration sensor data scaled to G.

Note: The values are only valid when in active mode or during self-test

Read unscaled acceleration sensor data.

Note: The values are only valid when in active mode or during self-test

Read acceleration sensor data scaled to G.

Note: The values are only valid when in active mode or during self-test

Read current system mode

Read current data status

Read current portrait/landscape status

Read current interrupt status

Create new instance of the MMA8451 device.

Create new instance of the MMA8452 device.

Create new instance of the MMA8453 device.

Create new instance of the MMA8652 device.

Create new instance of the MMA8653 device.

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.

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.