Go to the documentation of this file.
54 #ifndef CONFIG_MMA8X5X_I2C_ADDRESS
55 #define CONFIG_MMA8X5X_I2C_ADDRESS 0x1D
@ MMA8X5X_RATE_400HZ
400 Hz Output Data Rate in WAKE mode
@ MMA8X5X_TYPE_MMA8451
MMA8451.
@ MMA8X5X_RATE_100HZ
100 Hz Output Data Rate in WAKE mode
i2c_t i2c
I2C bus the device is connected to.
Configuration parameters.
void mma8x5x_read(const mma8x5x_t *dev, mma8x5x_data_t *data)
Read accelerometer's data.
int mma8x5x_is_ready(const mma8x5x_t *dev)
Check for new set of measurement data.
int16_t y
acceleration in Y direction
@ MMA8X5X_RANGE_4G
+/- 4 g Full Scale Range
Device descriptor for MMA8x5x accelerometers.
void mma8x5x_set_user_offset(const mma8x5x_t *dev, int8_t x, int8_t y, int8_t z)
Set user offset correction.
@ MMA8X5X_TYPE_MMA8652
MMA8652.
mma8x5x_params_t params
device configuration parameters
unsigned int i2c_t
Default i2c_t type definition.
@ MMA8X5X_RANGE_2G
+/- 2 g Full Scale Range
void mma8x5x_set_active(const mma8x5x_t *dev)
Set active mode, this enables periodic measurements.
@ MMA8X5X_RATE_1HZ25
12.5 Hz Output Data Rate in WAKE mode
void mma8x5x_ack_int(const mma8x5x_t *dev)
Acknowledge motion detection interrupt.
@ MMA8X5X_NOI2C
I2C communication failed.
@ MMA8X5X_RATE_1HZ56
1.56 Hz Output Data Rate in WAKE mode
int16_t x
acceleration in X direction
int16_t z
acceleration in Z direction
uint8_t range
scale range to use
@ MMA8X5X_DATA_READY
new data ready to be read
@ MMA8X5X_TYPE_MMA8452
MMA8452.
@ MMA8X5X_NODEV
no MMA8X5X device found on the bus
uint8_t addr
I2C bus address of the device.
@ MMA8X5X_TYPE_MMA8653
MMA8653.
@ MMA8X5X_RATE_800HZ
800 Hz Output Data Rate in WAKE mode
@ MMA8X5X_TYPE_MMA8453
MMA8453.
Data type for the result data.
void mma8x5x_set_motiondetect(const mma8x5x_t *dev, uint8_t int_pin, uint8_t threshold)
Configure motion detection interrupt.
@ MMA8X5X_NODATA
no data available
@ MMA8X5X_RATE_200HZ
200 Hz Output Data Rate in WAKE mode
int mma8x5x_init(mma8x5x_t *dev, const mma8x5x_params_t *params)
Initialize the MMA8x5x accelerometer driver.
@ MMA8X5X_RANGE_8G
+/- 8 g Full Scale Range
void mma8x5x_set_standby(const mma8x5x_t *dev)
Set standby mode.
Low-level I2C peripheral driver interface definition.
uint8_t rate
sampling rate to use
@ MMA8X5X_RATE_50HZ
50 Hz Output Data Rate in WAKE mode
@ MMA8X5X_OK
everything was fine
@ MMA8X5X_RATE_6HZ25
6.25 Hz Output Data Rate in WAKE mode