Loading...
Searching...
No Matches

Detailed Description

Author
Yahia Abdella yahia.nosp@m..abd.nosp@m.ella@.nosp@m.tuhh.nosp@m..de

Definition in file qmi8658.h.

#include "periph/i2c.h"
#include <stdbool.h>
+ Include dependency graph for qmi8658.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  qmi8658_params_t
 Device initialization parameters. More...
 
struct  qmi8658_t
 Device descriptor for the driver. More...
 
struct  qmi8658_3d_data_t
 3D output data More...
 
struct  qmi8658_tap_data_t
 Tap detection data. More...
 

Enumerations

enum  qmi8658_odr_t {
  QMI8658_DATA_RATE_8KHZ = 0x00 , QMI8658_DATA_RATE_4KHZ = 0x01 , QMI8658_DATA_RATE_2KHZ = 0x02 , QMI8658_DATA_RATE_1KHZ = 0x03 ,
  QMI8658_DATA_RATE_500HZ = 0x04 , QMI8658_DATA_RATE_250HZ = 0x05 , QMI8658_DATA_RATE_125HZ = 0x06 , QMI8658_DATA_RATE_62_5HZ = 0x07 ,
  QMI8658_DATA_RATE_31_25HZ = 0x08
}
 Data rate settings. More...
 
enum  qmi8658_acc_lowpwr_odr_t { QMI8658_ACC_LOWPWR_DATA_RATE_128HZ = 0x0C , QMI8658_ACC_LOWPWR_DATA_RATE_21HZ = 0x0D , QMI8658_ACC_LOWPWR_DATA_RATE_11HZ = 0x0E , QMI8658_ACC_LOWPWR_DATA_RATE_3HZ = 0x0F }
 Accelerometer low power data rate settings. More...
 
enum  qmi8658_acc_fs_t { QMI8658_ACC_FS_2G = 0x00 , QMI8658_ACC_FS_4G = 0x01 , QMI8658_ACC_FS_8G = 0x02 , QMI8658_ACC_FS_16G = 0x03 }
 Accelerometer full scale. More...
 
enum  qmi8658_gyro_fs_t {
  QMI8658_GYRO_FS_16DPS = 0x00 , QMI8658_GYRO_FS_32DPS = 0x01 , QMI8658_GYRO_FS_64DPS = 0x02 , QMI8658_GYRO_FS_128DPS = 0x03 ,
  QMI8658_GYRO_FS_256DPS = 0x04 , QMI8658_GYRO_FS_512DPS = 0x05 , QMI8658_GYRO_FS_1024DPS = 0x06 , QMI8658_GYRO_FS_2048DPS = 0x07
}
 Gyroscope full scale. More...
 
enum  qmi8658_tap_prio_t {
  QMI8658_TAP_PRIO_XYZ = 0 , QMI8658_TAP_PRIO_XZY = 1 , QMI8658_TAP_PRIO_YXZ = 2 , QMI8658_TAP_PRIO_YZX = 3 ,
  QMI8658_TAP_PRIO_ZXY = 4 , QMI8658_TAP_PRIO_ZYX = 5
}
 Tap axis priorities. More...
 
enum  qmi8658_mode_t {
  QMI8658_POWER_DOWN , QMI8658_NORMAL_ACC , QMI8658_NORMAL_GYRO , QMI8658_NORMAL_ACC_GYRO ,
  QMI8658_LOWPWR_ACC
}
 QMI8658 operating modes. More...
 
enum  qmi8658_axis_t { QMI8658_X_AXIS = 1 , QMI8658_Y_AXIS = 2 , QMI8658_Z_AXIS = 3 }
 QMI8658 axis identifiers. More...
 
enum  qmi8658_enable_flag_t { QMI8658_DISABLE_ALL = 0 , QMI8658_ENABLE_ACC = 1 , QMI8658_ENABLE_GYRO = 2 }
 Enable sensor flags. More...
 

Functions

int qmi8658_init (qmi8658_t *dev, const qmi8658_params_t *params)
 Initialize the given device.
 
int qmi8658_set_mode (qmi8658_t *dev, qmi8658_mode_t mode)
 Set the operating mode of the device.
 
int qmi8658_enable_tap (const qmi8658_t *dev)
 Enable the tap detection engine.
 
int qmi8658_disable_tap (const qmi8658_t *dev)
 Disable the tap detection engine.
 
int qmi8658_read_acc (const qmi8658_t *dev, qmi8658_3d_data_t *data)
 Read accelerometer data in mg.
 
int qmi8658_read_gyro (const qmi8658_t *dev, qmi8658_3d_data_t *data)
 Read gyroscope data in dps.
 
int qmi8658_read_temp (const qmi8658_t *dev, int16_t *data)
 Read temperature data in degC x 100.
 
int qmi8658_read_tap (const qmi8658_t *dev, qmi8658_tap_data_t *data)
 Read tap detection data.
 
#define CONFIG_QMI8658_PARAM_I2C   0x6B
 QMI8658 IMU driver compile configuration.