63#ifndef CONFIG_QMI8658_PARAM_I2C
65# define CONFIG_QMI8658_PARAM_I2C 0x6B
78 QMI8658_DATA_RATE_8KHZ = 0x00,
79 QMI8658_DATA_RATE_4KHZ = 0x01,
80 QMI8658_DATA_RATE_2KHZ = 0x02,
81 QMI8658_DATA_RATE_1KHZ = 0x03,
82 QMI8658_DATA_RATE_500HZ = 0x04,
83 QMI8658_DATA_RATE_250HZ = 0x05,
84 QMI8658_DATA_RATE_125HZ = 0x06,
85 QMI8658_DATA_RATE_62_5HZ = 0x07,
86 QMI8658_DATA_RATE_31_25HZ = 0x08,
95 QMI8658_ACC_LOWPWR_DATA_RATE_128HZ = 0x0C,
96 QMI8658_ACC_LOWPWR_DATA_RATE_21HZ = 0x0D,
97 QMI8658_ACC_LOWPWR_DATA_RATE_11HZ = 0x0E,
98 QMI8658_ACC_LOWPWR_DATA_RATE_3HZ = 0x0F
105 QMI8658_ACC_FS_2G = 0x00,
106 QMI8658_ACC_FS_4G = 0x01,
107 QMI8658_ACC_FS_8G = 0x02,
108 QMI8658_ACC_FS_16G = 0x03
115 QMI8658_GYRO_FS_16DPS = 0x00,
116 QMI8658_GYRO_FS_32DPS = 0x01,
117 QMI8658_GYRO_FS_64DPS = 0x02,
118 QMI8658_GYRO_FS_128DPS = 0x03,
119 QMI8658_GYRO_FS_256DPS = 0x04,
120 QMI8658_GYRO_FS_512DPS = 0x05,
121 QMI8658_GYRO_FS_1024DPS = 0x06,
122 QMI8658_GYRO_FS_2048DPS = 0x07
163 QMI8658_DISABLE_ALL = 0,
164 QMI8658_ENABLE_ACC = 1,
165 QMI8658_ENABLE_GYRO = 2
uint_fast8_t i2c_t
Default i2c_t type definition.
qmi8658_gyro_fs_t
Gyroscope full scale.
qmi8658_axis_t
QMI8658 axis identifiers.
int qmi8658_read_acc(const qmi8658_t *dev, qmi8658_3d_data_t *data)
Read accelerometer data in mg.
int qmi8658_read_temp(const qmi8658_t *dev, int16_t *data)
Read temperature data in degC x 100.
qmi8658_acc_fs_t
Accelerometer full scale.
qmi8658_acc_lowpwr_odr_t
Accelerometer low power data rate settings.
qmi8658_odr_t
Data rate settings.
int qmi8658_enable_tap(const qmi8658_t *dev)
Enable the tap detection engine.
qmi8658_mode_t
QMI8658 operating modes.
int qmi8658_set_mode(qmi8658_t *dev, qmi8658_mode_t mode)
Set the operating mode of the device.
int qmi8658_read_gyro(const qmi8658_t *dev, qmi8658_3d_data_t *data)
Read gyroscope data in dps.
qmi8658_enable_flag_t
Enable sensor flags.
int qmi8658_init(qmi8658_t *dev, const qmi8658_params_t *params)
Initialize the given device.
int qmi8658_disable_tap(const qmi8658_t *dev)
Disable the tap detection engine.
int qmi8658_read_tap(const qmi8658_t *dev, qmi8658_tap_data_t *data)
Read tap detection data.
qmi8658_tap_prio_t
Tap axis priorities.
@ QMI8658_X_AXIS
Sensor X axis.
@ QMI8658_Y_AXIS
Sensor Y axis.
@ QMI8658_Z_AXIS
Sensor Z axis.
@ QMI8658_NORMAL_ACC_GYRO
IMU mode (Accelerometer + Gyroscope)
@ QMI8658_LOWPWR_ACC
Low power mode (Accelerometer only)
@ QMI8658_NORMAL_ACC
Accelerometer only mode (if ODR <= 1kHz, otherwise Gyro is also enabled)
@ QMI8658_NORMAL_GYRO
Gyroscope only mode.
@ QMI8658_POWER_DOWN
All functional blocks off, minimal power consumption.
@ QMI8658_TAP_PRIO_YZX
Y > Z > >
@ QMI8658_TAP_PRIO_XYZ
X > Y > Z.
@ QMI8658_TAP_PRIO_YXZ
Y > X > Z.
@ QMI8658_TAP_PRIO_XZY
X > Z > Y.
@ QMI8658_TAP_PRIO_ZYX
Z > Y > X.
@ QMI8658_TAP_PRIO_ZXY
Z > X > Y.
Low-level I2C peripheral driver interface definition.
Device initialization parameters.
qmi8658_acc_fs_t acc_fs
accelerometer full scale
qmi8658_odr_t acc_odr
accelerometer output data rate
qmi8658_acc_lowpwr_odr_t acc_lowpwr_odr
accelerometer low power output data rate
qmi8658_gyro_fs_t gyro_fs
gyroscope full scale
qmi8658_odr_t gyro_odr
gyroscope output data rate
Device descriptor for the driver.
qmi8658_enable_flag_t enable_flags
Currently enabled sensors.
qmi8658_params_t params
Device initialization parameters.
bool initialized
Device is initialized.
uint8_t num
Number of taps detected: 0 (no tap), 1 (single tap) or 2 (double tap)
bool neg_polarity
Tap was detected in the negative direction of tap axis (otherwise positive direction)
qmi8658_axis_t axis
Axis on which the tap was detected.