Internal addresses, registers and constants. More...
Internal addresses, registers and constants.
Definition in file qmi8658_constants.h.
Go to the source code of this file.
Enumerations | |
| enum | qmi8658_sensor_id_t { QMI8658_SENSOR_ACC = 0 , QMI8658_SENSOR_GYRO } |
| Sensor IDs. More... | |
QMI8658 registers | |
| #define | QMI8658_REG_RESET (0x60) |
| Soft reset register. | |
| #define | QMI8658_REG_WHO_AM_I (0x00) |
| Device identifier register. | |
| #define | QMI8658_REG_CTRL1 (0x02) |
| Serial interface, sensor enable settings. | |
| #define | QMI8658_REG_CTRL2 (0x03) |
| Accelerometer settings. | |
| #define | QMI8658_REG_CTRL3 (0x04) |
| Gyroscope settings. | |
| #define | QMI8658_REG_CTRL7 (0x08) |
| Sensor enable register. | |
| #define | QMI8658_REG_CTRL8 (0x09) |
| Motion detection enable register. | |
| #define | QMI8658_REG_CTRL9 (0x0A) |
| Predefined host command. | |
| #define | QMI8658_REG_STATUSINT (0x2D) |
| CTRL9 command status. | |
| #define | QMI8658_REG_STATUS0 (0x2E) |
| Output data status register. | |
| #define | QMI8658_REG_STATUS1 (0x2F) |
| Miscellaneous status register. | |
| #define | QMI8658_REG_TEMP_L (0x33) |
| Temperature data output (low byte) | |
| #define | QMI8658_REG_TEMP_H (0x34) |
| Temperature data output (high byte) | |
| #define | QMI8658_REG_AX_L (0x35) |
| X-axis acceleration data (low byte) | |
| #define | QMI8658_REG_AX_H (0x36) |
| X-axis acceleration data (high byte) | |
| #define | QMI8658_REG_AY_L (0x37) |
| Y-axis acceleration data (low byte) | |
| #define | QMI8658_REG_AY_H (0x38) |
| Y-axis acceleration data (high byte) | |
| #define | QMI8658_REG_AZ_L (0x39) |
| Z-axis acceleration data (low byte) | |
| #define | QMI8658_REG_AZ_H (0x3A) |
| Z-axis acceleration data (high byte) | |
| #define | QMI8658_REG_GX_L (0x3B) |
| X-axis angular rate data (low byte) | |
| #define | QMI8658_REG_GX_H (0x3C) |
| X-axis angular rate data (high byte) | |
| #define | QMI8658_REG_GY_L (0x3D) |
| Y-axis angular rate data (low byte) | |
| #define | QMI8658_REG_GY_H (0x3E) |
| Y-axis angular rate data (high byte) | |
| #define | QMI8658_REG_GZ_L (0x3F) |
| Z-axis angular rate data (low byte) | |
| #define | QMI8658_REG_GZ_H (0x40) |
| Z-axis angular rate data (high byte) | |
| #define | QMI8658_REG_TAP_STATUS (0x59) |
| Tap engine status. | |
| #define | QMI8658_REG_CAL1_L (0x0B) |
| First CAL register. | |
QMI8658 register values | |
| #define | QMI8658_RESET_VALUE (0xB0) |
| Value in register 0x4D after successful reset. | |
| #define | QMI8658_WHO_AM_I_VALUE (0x05) |
| Expected device identifier. | |
QMI8658 CTRL9 protocol commands | |
| #define | QMI8658_CTRL9_CMD_ACK (0x00) |
| Acknowledge CTRL9 execution. | |
| #define | QMI8658_CTRL9_CMD_CONFIG_TAP (0x0C) |
| Configure Tap detection. | |
Helper masks and offsets | |
| #define | QMI8658_CTRL_FS_SHIFT (4) |
| Shift of full scale part in CTRL2/3. | |
| #define | QMI8658_CTRL1_ADDR_AI_MASK (1 << 6) |
| Address auto increment bit in CTRL1. | |
| #define | QMI8658_CTRL1_SENSOR_DISABLE_MASK (1 << 0) |
| SensorDisable bit in CTRL1. | |
| #define | QMI8658_CTRL8_TAP_EN_MASK (1 << 0) |
| Tap_EN bit in CTRL8. | |
| #define | QMI8658_STATUS0_ACC_MASK (1 << 0) |
| Accelerometer data status bit in STATUS0. | |
| #define | QMI8658_STATUS0_GYRO_MASK (1 << 1) |
| Gyroscope data status bit in STATUS0. | |
| #define | QMI8658_STATUS1_TAP_MASK (1 << 1) |
| Tap data status bit in STATUS1. | |
| #define | QMI8658_TEMP_SCALE_FACTOR (256) |
| Scale factor of raw temperature data. | |
| #define | QMI8658_TAP_NUM_SHIFT (0) |
| Shift tap number bits in TAP_STATUS. | |
| #define | QMI8658_TAP_AXIS_SHIFT (4) |
| Shift of tap axis bits in TAP_STATUS. | |
| #define | QMI8658_TAP_POLARITY_SHIFT (7) |
| Shift of tap polarity bit in TAP_STATUS. | |
| #define | QMI8658_CTRL9_DONE_MASK (1 << 7) |
| CTRL9 command done bit in STATUSINT. | |
Mode transition times | |
| #define | QMI8658_RESET_WAIT_MS (15) |
| Wait time after soft reset. | |
| #define | QMI8658_NORMAL_FILTER_WAIT_MS (100) |
| Worst case wait time after setting ODR in normal mode. | |
| #define | QMI8658_LOWPWR_FILTER_WAIT_MS (1000) |
| Worst case wait time after setting ODR in low power mode. | |
| #define | QMI8658_ACC_WAKEUP_MS (3) |
| Accelerometer wakeup time. | |
| #define | QMI8658_GYRO_WAKEUP_MS (150) |
| Gyroscope wakeup time. | |
| #define | QMI8658_CTRL9_TIMEOUT_MS (1000) |
| CTRL9 command timeout. | |
| #define QMI8658_ACC_WAKEUP_MS (3) |
Accelerometer wakeup time.
Definition at line 112 of file qmi8658_constants.h.
| #define QMI8658_CTRL1_ADDR_AI_MASK (1 << 6) |
Address auto increment bit in CTRL1.
Definition at line 78 of file qmi8658_constants.h.
| #define QMI8658_CTRL1_SENSOR_DISABLE_MASK (1 << 0) |
SensorDisable bit in CTRL1.
Definition at line 80 of file qmi8658_constants.h.
| #define QMI8658_CTRL8_TAP_EN_MASK (1 << 0) |
Tap_EN bit in CTRL8.
Definition at line 82 of file qmi8658_constants.h.
| #define QMI8658_CTRL9_CMD_ACK (0x00) |
Acknowledge CTRL9 execution.
Definition at line 67 of file qmi8658_constants.h.
| #define QMI8658_CTRL9_CMD_CONFIG_TAP (0x0C) |
Configure Tap detection.
Definition at line 68 of file qmi8658_constants.h.
| #define QMI8658_CTRL9_DONE_MASK (1 << 7) |
CTRL9 command done bit in STATUSINT.
Definition at line 98 of file qmi8658_constants.h.
| #define QMI8658_CTRL9_TIMEOUT_MS (1000) |
CTRL9 command timeout.
Definition at line 116 of file qmi8658_constants.h.
| #define QMI8658_CTRL_FS_SHIFT (4) |
Shift of full scale part in CTRL2/3.
Definition at line 76 of file qmi8658_constants.h.
| #define QMI8658_GYRO_WAKEUP_MS (150) |
Gyroscope wakeup time.
Definition at line 114 of file qmi8658_constants.h.
| #define QMI8658_LOWPWR_FILTER_WAIT_MS (1000) |
Worst case wait time after setting ODR in low power mode.
Definition at line 110 of file qmi8658_constants.h.
| #define QMI8658_NORMAL_FILTER_WAIT_MS (100) |
Worst case wait time after setting ODR in normal mode.
Definition at line 108 of file qmi8658_constants.h.
| #define QMI8658_REG_AX_H (0x36) |
X-axis acceleration data (high byte)
Definition at line 40 of file qmi8658_constants.h.
| #define QMI8658_REG_AX_L (0x35) |
X-axis acceleration data (low byte)
Definition at line 39 of file qmi8658_constants.h.
| #define QMI8658_REG_AY_H (0x38) |
Y-axis acceleration data (high byte)
Definition at line 42 of file qmi8658_constants.h.
| #define QMI8658_REG_AY_L (0x37) |
Y-axis acceleration data (low byte)
Definition at line 41 of file qmi8658_constants.h.
| #define QMI8658_REG_AZ_H (0x3A) |
Z-axis acceleration data (high byte)
Definition at line 44 of file qmi8658_constants.h.
| #define QMI8658_REG_AZ_L (0x39) |
Z-axis acceleration data (low byte)
Definition at line 43 of file qmi8658_constants.h.
| #define QMI8658_REG_CAL1_L (0x0B) |
First CAL register.
Definition at line 52 of file qmi8658_constants.h.
| #define QMI8658_REG_CTRL1 (0x02) |
Serial interface, sensor enable settings.
Definition at line 28 of file qmi8658_constants.h.
| #define QMI8658_REG_CTRL2 (0x03) |
Accelerometer settings.
Definition at line 29 of file qmi8658_constants.h.
| #define QMI8658_REG_CTRL3 (0x04) |
Gyroscope settings.
Definition at line 30 of file qmi8658_constants.h.
| #define QMI8658_REG_CTRL7 (0x08) |
Sensor enable register.
Definition at line 31 of file qmi8658_constants.h.
| #define QMI8658_REG_CTRL8 (0x09) |
Motion detection enable register.
Definition at line 32 of file qmi8658_constants.h.
| #define QMI8658_REG_CTRL9 (0x0A) |
Predefined host command.
Definition at line 33 of file qmi8658_constants.h.
| #define QMI8658_REG_GX_H (0x3C) |
X-axis angular rate data (high byte)
Definition at line 46 of file qmi8658_constants.h.
| #define QMI8658_REG_GX_L (0x3B) |
X-axis angular rate data (low byte)
Definition at line 45 of file qmi8658_constants.h.
| #define QMI8658_REG_GY_H (0x3E) |
Y-axis angular rate data (high byte)
Definition at line 48 of file qmi8658_constants.h.
| #define QMI8658_REG_GY_L (0x3D) |
Y-axis angular rate data (low byte)
Definition at line 47 of file qmi8658_constants.h.
| #define QMI8658_REG_GZ_H (0x40) |
Z-axis angular rate data (high byte)
Definition at line 50 of file qmi8658_constants.h.
| #define QMI8658_REG_GZ_L (0x3F) |
Z-axis angular rate data (low byte)
Definition at line 49 of file qmi8658_constants.h.
| #define QMI8658_REG_RESET (0x60) |
Soft reset register.
Definition at line 26 of file qmi8658_constants.h.
| #define QMI8658_REG_STATUS0 (0x2E) |
Output data status register.
Definition at line 35 of file qmi8658_constants.h.
| #define QMI8658_REG_STATUS1 (0x2F) |
Miscellaneous status register.
Definition at line 36 of file qmi8658_constants.h.
| #define QMI8658_REG_STATUSINT (0x2D) |
CTRL9 command status.
Definition at line 34 of file qmi8658_constants.h.
| #define QMI8658_REG_TAP_STATUS (0x59) |
Tap engine status.
Definition at line 51 of file qmi8658_constants.h.
| #define QMI8658_REG_TEMP_H (0x34) |
Temperature data output (high byte)
Definition at line 38 of file qmi8658_constants.h.
| #define QMI8658_REG_TEMP_L (0x33) |
Temperature data output (low byte)
Definition at line 37 of file qmi8658_constants.h.
| #define QMI8658_REG_WHO_AM_I (0x00) |
Device identifier register.
Definition at line 27 of file qmi8658_constants.h.
| #define QMI8658_RESET_VALUE (0xB0) |
Value in register 0x4D after successful reset.
Definition at line 59 of file qmi8658_constants.h.
| #define QMI8658_RESET_WAIT_MS (15) |
Wait time after soft reset.
Definition at line 106 of file qmi8658_constants.h.
| #define QMI8658_STATUS0_ACC_MASK (1 << 0) |
Accelerometer data status bit in STATUS0.
Definition at line 84 of file qmi8658_constants.h.
| #define QMI8658_STATUS0_GYRO_MASK (1 << 1) |
Gyroscope data status bit in STATUS0.
Definition at line 86 of file qmi8658_constants.h.
| #define QMI8658_STATUS1_TAP_MASK (1 << 1) |
Tap data status bit in STATUS1.
Definition at line 88 of file qmi8658_constants.h.
| #define QMI8658_TAP_AXIS_SHIFT (4) |
Shift of tap axis bits in TAP_STATUS.
Definition at line 94 of file qmi8658_constants.h.
| #define QMI8658_TAP_NUM_SHIFT (0) |
Shift tap number bits in TAP_STATUS.
Definition at line 92 of file qmi8658_constants.h.
| #define QMI8658_TAP_POLARITY_SHIFT (7) |
Shift of tap polarity bit in TAP_STATUS.
Definition at line 96 of file qmi8658_constants.h.
| #define QMI8658_TEMP_SCALE_FACTOR (256) |
Scale factor of raw temperature data.
Definition at line 90 of file qmi8658_constants.h.
| #define QMI8658_WHO_AM_I_VALUE (0x05) |
Expected device identifier.
Definition at line 60 of file qmi8658_constants.h.
| enum qmi8658_sensor_id_t |
Sensor IDs.
Definition at line 122 of file qmi8658_constants.h.