|
SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
|
QMI8658 IMU sensor driver class. More...
#include <SensorQMI8658.hpp>
Classes | |
| struct | EventCallbacks |
| Grouped callbacks for QMI8658 events. More... | |
Public Member Functions | |
| SensorQMI8658 () | |
| Construct a new SensorQMI8658 object. | |
| ~SensorQMI8658 () override | |
| Destroy the SensorQMI8658 object. | |
| bool | reset () override |
| Reset the IMU sensor to its default state. | |
| bool | selfTest () override |
| Perform self-test on the IMU sensor. | |
| bool | isPresent () override |
| Check if the IMU sensor is responding. | |
| uint8_t | getChipID () override |
| Get the chip ID / WHO_AM_I value. | |
| uint32_t | getFirmwareVersion () override |
| Get the firmware version. | |
| bool | setOperationMode (OperationMode mode) override |
| Set IMU operation mode. | |
| float | getTemperature () override |
| Get the temperature reading from the sensor. | |
| uint32_t | getTimestamp () override |
| Get the timestamp from the sensor. | |
| bool | isDataReady (uint8_t mask=static_cast< uint8_t >(ImuBase::DataReadyMask::BOTH)) override |
| Check if requested IMU data is available. | |
| bool | readAccel (AccelerometerData &out) override |
| Read accelerometer data. | |
| bool | enableAccel () override |
| Enable the accelerometer. | |
| bool | disableAccel () override |
| Disable the accelerometer. | |
| bool | isAccelEnabled () override |
| Check if accelerometer is enabled. | |
| bool | setAccelFullScaleRange (AccelFullScaleRange range) override |
| Set accelerometer full scale range. | |
| bool | setAccelOutputDataRate (float data_rate_hz) override |
| Set accelerometer output data rate. | |
| bool | readAccelRaw (int16_t &x, int16_t &y, int16_t &z) override |
| Read raw accelerometer data without scaling. | |
| bool | readGyro (GyroscopeData &out) override |
| Read gyroscope data. | |
| bool | enableGyro () override |
| Enable the gyroscope. | |
| bool | disableGyro () override |
| Disable the gyroscope. | |
| bool | isGyroEnabled () override |
| Check if gyroscope is enabled. | |
| bool | setGyroFullScaleRange (GyroFullScaleRange range) override |
| Set gyroscope full scale range. | |
| bool | setGyroOutputDataRate (float data_rate_hz) override |
| Set gyroscope output data rate. | |
| bool | readGyroRaw (int16_t &x, int16_t &y, int16_t &z) override |
| Read raw gyroscope data without scaling. | |
| bool | enableSyncMode () override |
| Enable synchronous sampling mode. | |
| bool | disableSyncMode () override |
| Disable synchronous sampling mode. | |
| bool | configureFifo (bool enable, uint8_t watermark_samples=16) override |
| Configure the FIFO buffer. | |
| uint16_t | readFromFifo (AccelerometerData *accel_data, uint16_t accel_count, GyroscopeData *gyro_data, uint16_t gyro_count) override |
| Read data from FIFO buffer. | |
| bool | configAccel (AccelFullScaleRange range, float data_rate_hz, LpfMode lpf=LpfMode::MODE_0) |
| Configure the accelerometer with specified parameters. | |
| bool | configGyro (GyroFullScaleRange range, float data_rate_hz, LpfMode lpf=LpfMode::MODE_0) |
| Configure the gyroscope with specified parameters. | |
| bool | enableInterrupt (IntPin pin) |
| Enable interrupt on specified pin. | |
| bool | disableInterrupt (IntPin pin) |
| Disable interrupt on specified pin. | |
| bool | enableDataReadyInterrupt (IntPin pin=IntPin::PIN2) |
| Enable data ready interrupt. | |
| uint8_t | getInterruptStatus () |
| Get interrupt status. | |
| void | setPins (int pin) |
| Set interrupt pin. | |
| void | setIntPin (int pin) |
| Backward-compatible alias of setPins. | |
| bool | configFifo (FifoMode mode, FifoSamples samples=FifoSamples::SAMPLES_16, uint8_t watermark_samples=16) |
| Configure FIFO with specified mode. | |
| bool | resetFifo () |
| Reset the FIFO. | |
| uint8_t | getFifoStatus () |
| Get FIFO status. | |
| bool | enableLockingMechanism () |
| Enable the data locking mechanism. | |
| bool | disableLockingMechanism () |
| Disable the data locking mechanism. | |
| bool | calibrate (uint16_t *gyro_x_gain=nullptr, uint16_t *gyro_y_gain=nullptr, uint16_t *gyro_z_gain=nullptr) |
| Perform on-demand calibration. | |
| bool | writeCalibration (uint16_t gyro_x_gain, uint16_t gyro_y_gain, uint16_t gyro_z_gain) |
| Write previously saved gyro calibration gains. | |
| void | setAccelOffset (int16_t x, int16_t y, int16_t z) |
| Set accelerometer host delta offsets. | |
| void | setGyroOffset (int16_t x, int16_t y, int16_t z) |
| Set gyroscope host delta offsets. | |
| bool | selfTestAccel () |
| Perform accelerometer self-test. | |
| bool | selfTestGyro () |
| Perform gyroscope self-test. | |
| bool | configMotionDetect (MotionType type, float threshold_x, float threshold_y, float threshold_z, uint8_t duration) |
| Configure motion detection parameters. | |
| bool | configMotionDetectDefault (MotionType type) |
| Configure motion detection with default parameters. | |
| bool | enableMotionDetect (IntPin pin=IntPin::PIN1) |
| Enable motion detection on specified pin. | |
| bool | disableMotionDetect () |
| Disable motion detection. | |
| bool | configWakeOnMotion (uint8_t threshold=200, float odr_hz=128.0f, IntPin pin=IntPin::PIN2) |
| Configure wake-on-motion (WoM) feature. | |
| bool | configWakeOnMotionAdvanced (uint8_t threshold, float odr_hz, IntPin pin, uint8_t default_pin_value, uint8_t blanking_time, AccelFullScaleRange acc_range) |
| Configure wake-on-motion (WoM) with full vendor parameters. | |
| bool | configAccel (AccelRange range, AccelODR odr, LpfMode lpf=LpfMode::MODE_0) |
| bool | configAccel (AccelRange range, float data_rate_hz, LpfMode lpf=LpfMode::MODE_0) |
| bool | configGyro (GyroRange range, GyroODR odr, LpfMode lpf=LpfMode::MODE_0) |
| bool | configGyro (GyroRange range, float data_rate_hz, LpfMode lpf=LpfMode::MODE_0) |
| bool | configWakeOnMotion (uint8_t threshold, AccelODR odr, IntPin pin) |
| bool | configWakeOnMotion (uint8_t threshold, AccelODR odr, IntPin pin, uint8_t default_pin_value, uint8_t blanking_time, AccelRange acc_range) |
| bool | configTap (TapPriority priority, uint8_t peak_window, uint16_t tap_window, uint16_t double_tap_window, float peak_mag_threshold, float quiet_threshold) |
| Configure tap detection parameters. | |
| bool | configTapDefault (TapPriority priority=TapPriority::X_GT_Y_GT_Z) |
| Configure tap detection with default parameters. | |
| bool | enableTap (IntPin pin=IntPin::PIN1) |
| Enable tap detection. | |
| bool | disableTap () |
| Disable tap detection. | |
| TapEvent | getTapStatus () |
| Get tap status. | |
| bool | configPedometer (uint16_t sample_count, uint16_t peak_to_peak, uint16_t peak_threshold, uint16_t time_up, uint8_t time_low=20, uint8_t entry_count=10, uint8_t fix_precision=0, uint8_t sig_count=4) |
| Configure pedometer parameters. | |
| bool | configPedometerDefault (float odr=125.0f) |
| Configure pedometer with default parameters. | |
| bool | enablePedometer (IntPin pin=IntPin::DISABLE) |
| Enable pedometer. | |
| bool | disablePedometer () |
| Disable pedometer. | |
| uint32_t | getStepCount () |
| Get pedometer step count. | |
| bool | resetStepCount () |
| Reset pedometer counter. | |
| void | setAnyMotionCallback (MotionCallback callback) |
| Set callback for any-motion event. | |
| void | setNoMotionCallback (MotionCallback callback) |
| Set callback for no-motion event. | |
| void | setSignificantMotionCallback (MotionCallback callback) |
| Set callback for significant motion event. | |
| void | setWakeOnMotionCallback (MotionCallback callback) |
| Set callback for wake-on-motion event. | |
| void | setTapCallback (TapCallback callback) |
| Set callback for tap event. | |
| void | setPedometerCallback (MotionCallback callback) |
| Set callback for pedometer event. | |
| void | setAccelDataReadyCallback (DataReadyCallback callback) |
| Set callback for accelerometer data ready. | |
| void | setGyroDataReadyCallback (DataReadyCallback callback) |
| Set callback for gyroscope data ready. | |
| void | setDataLockingCallback (DataReadyCallback callback) |
| Set callback for data locking. | |
| void | setCallbacks (const EventCallbacks &cbs) |
| Set all event callbacks at once. | |
| EventCallbacks & | getCallbacks () |
| Get current callbacks. | |
| const EventCallbacks & | getCallbacks () const |
| Get current callbacks (const). | |
| uint16_t | update () |
| Update sensor status and process events. | |
| void | dumpRegisters () |
| Dump control registers for debugging. | |
| void | getChipUsid (uint8_t *buffer, uint8_t length) |
| Get sensor USID (unique chip ID). | |
| float | getAccelScale () |
| Get the accelerometer scale factor. | |
| float | getGyroScale () |
| Get the gyroscope scale factor. | |
| void | setAxisLayout (Layout layout) |
| Set the sensor axis layout for coordinate transformation. | |
| Layout | getAxisLayout () const |
| Get the current axis layout setting. | |
| void | axisConvert (int16_t accel_data[3], int16_t gyro_data[3]) |
| Apply axis conversion to raw sensor data. | |
| void | enableStaticCalibration (bool enable) |
| Start static calibration. | |
| bool | isStaticCalibrationEnabled () const |
| Check if static calibration is enabled. | |
| bool | isStaticCalibrationComplete () const |
| Get the current static calibration status. | |
| bool | processStaticCalibration (int16_t accel_data[3], int16_t gyro_data[3]) |
| Process static calibration with current sensor data. | |
| void | getStaticCalibrationOffsets (int16_t accel_offset[3], int16_t gyro_offset[3]) |
| Get static calibration offsets. | |
| void | resetStaticCalibration () |
| Reset static calibration. | |
| void | enableDynamicGyroCalibration (bool enable) |
| Enable dynamic gyroscope calibration. | |
| bool | isDynamicGyroCalibrationEnabled () const |
| Check if dynamic gyro calibration is enabled. | |
| void | getDynamicGyroCalibrationOffsets (int16_t gyro_offset[3]) |
| Get dynamic gyroscope calibration offsets. | |
| void | processDynamicCalibration (int16_t accel_data[3], int16_t gyro_data[3]) |
| Process dynamic calibration with current sensor data. | |
| bool | hardwareSelfTest (bool includeAccel=true, bool includeGyro=true) |
| Perform hardware self-test on both sensors. | |
| void | getHardwareSelfTestResults (float accel_result[3], float gyro_result[3]) |
| Get hardware self-test results. | |
| SensorQMI8658 ()=default | |
| Constructor for SensorQMI8658. | |
| ~SensorQMI8658 () | |
| Destructor for SensorQMI8658. | |
| void | setPins (int _irq) |
| Set sensor interrupt pins. | |
| bool | reset (bool waitResult=true, uint32_t timeout=500) |
| Reset the sensor. | |
| uint8_t | getChipID () |
| Get the chip ID. | |
| int | whoAmI () |
| Get the WHO_AM_I register value. | |
| uint32_t | getTimestamp () |
| Get the timestamp. | |
| float | getTemperature_C () |
| Get the temperature in degree Celsius. | |
| void | enableINT (IntPin pin, bool enable=true) |
| Enable or disable the interrupt. | |
| uint8_t | getIrqStatus () |
| Get the IRQ status. | |
| void | enableDataReadyINT (bool enable=true) |
| Enable or disable the Data Ready interrupt. | |
| bool | configAccelerometer (AccelRange range, AccelODR odr, LpfMode lpfOdr=LPF_MODE_0) |
| Configure the accelerometer. | |
| bool | configGyroscope (GyroRange range, GyroODR odr, LpfMode lpfOdr=LPF_MODE_0) |
| Configure the gyroscope. | |
| bool | configFIFO (FIFO_Mode mode, FIFO_Samples samples=FIFO_SAMPLES_16, IntPin pin=INTERRUPT_PIN_DISABLE, uint8_t trigger_samples=16) |
| Configure the FIFO. | |
| uint16_t | readFromFifo (IMUdata *acc, uint16_t accLength, IMUdata *gyro, uint16_t gyrLength) |
| readFromFifo | |
| bool | enableAccelerometer () |
| Enable the accelerometer. | |
| bool | disableAccelerometer () |
| Disable the accelerometer. | |
| bool | isEnableAccelerometer () |
| Check if the accelerometer is enabled. | |
| bool | isEnableGyroscope () |
| Check if the gyroscope is enabled. | |
| bool | enableGyroscope () |
| Enable the gyroscope. | |
| bool | disableGyroscope () |
| Disable the gyroscope. | |
| bool | getAccelRaw (int16_t *rawBuffer) |
| Get the raw accelerometer data. | |
| bool | getAccelerometer (float &x, float &y, float &z) |
| Get the accelerometer data. | |
| float | getAccelerometerScales () |
| Get the accelerometer scales. | |
| float | getGyroscopeScales () |
| Get the gyroscope scales. | |
| bool | getGyroRaw (int16_t *rawBuffer) |
| Get the raw gyroscope data. | |
| bool | getGyroscope (float &x, float &y, float &z) |
| Get the raw gyroscope data. | |
| bool | getDataReady () |
| Check if new data is available. | |
| bool | enableSyncSampleMode () |
| Enable the synchronous sample mode. | |
| bool | disableSyncSampleMode () |
| Disable the synchronous sample mode. | |
| bool | enableLockingMechanism () |
| Enable the locking mechanism. | |
| bool | disableLockingMechanism () |
| Disable the locking mechanism. | |
| void | dumpCtrlRegister () |
| Dump the control register values. | |
| void | powerDown () |
| Power down the sensor. | |
| void | powerOn () |
| Power on the sensor. | |
| int | getStatusRegister () |
| Get the Pedometer counter. | |
| int | configActivityInterruptMap (IntPin pin) |
| Config activity interrupt pin mapping. | |
| bool | configPedometer (uint16_t ped_sample_cnt, uint16_t ped_fix_peak2peak, uint16_t ped_fix_peak, uint16_t ped_time_up, uint8_t ped_time_low=0x14, uint8_t ped_time_cnt_entry=0x0A, uint8_t ped_fix_precision=0x00, uint8_t ped_sig_count=0x04) |
| configPedometer | |
| uint32_t | getPedometerCounter () |
| Get the Pedometer counter. | |
| bool | clearPedometerCounter () |
| Clear the Pedometer counter. | |
| bool | enablePedometer (IntPin pin=INTERRUPT_PIN_DISABLE) |
| enablePedometer | |
| bool | disablePedometer () |
| bool | configTap (uint8_t priority, uint8_t peakWindow, uint16_t tapWindow, uint16_t dTapWindow, float alpha, float gamma, float peakMagThr, float UDMThr) |
| configTap | |
| bool | enableTap (IntPin pin=INTERRUPT_PIN_1) |
| Enable tap detection. | |
| bool | disableTap () |
| Disable tap detection. | |
| TapEvent | getTapStatus () |
| Get the current tap status. | |
| bool | configMotion (uint8_t modeCtrl, float AnyMotionXThr, float AnyMotionYThr, float AnyMotionZThr, uint8_t AnyMotionWindow, float NoMotionXThr, float NoMotionYThr, float NoMotionZThr, uint8_t NoMotionWindow, uint16_t SigMotionWaitWindow, uint16_t SigMotionConfirmWindow) |
| bool | enableMotionDetect (IntPin pin=INTERRUPT_PIN_1) |
| Enable motion detection. | |
| bool | disableMotionDetect () |
| Disable motion detection. | |
| bool | configWakeOnMotion (uint8_t WoMThreshold=200, AccelODR odr=ACC_ODR_LOWPOWER_128Hz, IntPin pin=INTERRUPT_PIN_2, uint8_t defaultPinValue=1, uint8_t blankingTime=0x20, AccelRange accRange=ACC_RANGE_8G) |
| configWakeOnMotion | |
| void | getChipUsid (uint8_t *buffer, uint8_t length) |
| Get Sensor chip USID. | |
| uint32_t | getChipFirmwareVersion () |
| Get Sensor chip firmware version. | |
| uint16_t | update () |
| Update sensor status. | |
| void | setWakeupMotionEventCallBack (EventCallBack_t cb) |
| void | setTapEventCallBack (EventCallBack_t cb) |
| void | setPedometerEventCallBack (EventCallBack_t cb) |
| void | setNoMotionEventCallBack (EventCallBack_t cb) |
| void | setAnyMotionEventCallBack (EventCallBack_t cb) |
| void | setSignificantMotionEventCallBack (EventCallBack_t cb) |
| void | setGyroDataReadyCallBack (EventCallBack_t cb) |
| void | setAccelDataReadyEventCallBack (EventCallBack_t cb) |
| void | setDataLockingEventCallBack (EventCallBack_t cb) |
| bool | calibration (uint16_t *gX_gain=NULL, uint16_t *gY_gain=NULL, uint16_t *gZ_gain=NULL) |
| Set Gyroscope calibration gains. | |
| bool | writeCalibration (uint16_t gX_gain, uint16_t gY_gain, uint16_t gZ_gain) |
| Write Gyroscope calibration gains. | |
| bool | selfTestAccel () |
| Perform self-test on the accelerometer. | |
| bool | selfTestGyro () |
| Perform self-test on the gyroscope. | |
| void | setAccelOffset (int16_t offset_x, int16_t offset_y, int16_t offset_z) |
| Write accelerometer calibration offsets. | |
| void | setGyroOffset (int16_t offset_x, int16_t offset_y, int16_t offset_z) |
| Write gyroscope calibration offsets. | |
Public Member Functions inherited from ComplexDeviceWithHal | |
| bool | begin (CommInterface interface, SensorCommCustom::CustomCallback callback, SensorCommCustomHal::CustomHalCallback hal_callback, uint8_t addr=0) |
| Initialize the sensor using custom callback interface. | |
Public Member Functions inherited from DeviceBeginCommon | |
| virtual | ~DeviceBeginCommon () |
| uint8_t | getAddress () const |
| uint8_t | getInterface () const |
Public Member Functions inherited from SensorCommWrapper | |
| SensorCommWrapper ()=default | |
| int | readReg (uint8_t reg) const |
| int | readRegBuff (uint8_t reg, uint8_t *buf, size_t len) const |
| int | readBuff (uint8_t *buf, size_t len) const |
| int | writeReg (uint8_t reg, uint8_t val) |
| int | writeRegBuff (uint8_t reg, uint8_t *buf, size_t len) |
| int | writeBuff (uint8_t *buf, size_t len) |
| int | writeThenRead (const uint8_t *write_buffer, size_t write_len, uint8_t *read_buffer, size_t read_len) |
| bool | setRegBit (uint8_t reg, uint8_t bit) |
| bool | clrRegBit (uint8_t reg, uint8_t bit) |
| bool | getRegBit (uint8_t reg, uint8_t bit) |
| int | updateBits (uint8_t reg, uint8_t mask, uint8_t value_shifted) |
| void | setAddress (uint8_t address) |
| void | setAck (bool enable) |
Public Member Functions inherited from SensorCommInterface | |
| virtual | ~SensorCommInterface ()=default |
Public Member Functions inherited from ImuBase | |
| virtual | ~ImuBase ()=default |
| bool | powerOn () |
| Compatibility wrapper: switch IMU to NORMAL mode. | |
| bool | powerDown () |
| Compatibility wrapper: switch IMU to SUSPEND mode. | |
Public Member Functions inherited from ComplexStaticDeviceWithHal | |
| bool | begin (CommInterface interface, SensorCommCustom::CustomCallback callback, SensorCommCustomHal::CustomHalCallback hal_callback, uint8_t addr=0) |
| Initialize the sensor using custom callback interface. | |
Protected Member Functions | |
| bool | initImpl (uint8_t param) override |
| int | writeCommand (uint8_t cmd, uint32_t timeout_ms=1000) |
| uint8_t | mgToBytes (float mg) |
| uint8_t | getAccelRangeRegValue (AccelFullScaleRange range) |
| uint8_t | getGyroRangeRegValue (GyroFullScaleRange range) |
| float | getAccelScaleFromRange (AccelFullScaleRange range) |
| float | getGyroScaleFromRange (GyroFullScaleRange range) |
| bool | applyMotionConfig () |
| float | odrToFloat (float odr) |
| uint8_t | findClosestAccelOdr (float hz) |
| uint8_t | findClosestGyroOdr (float hz) |
| uint8_t | findClosestAccelLpOdr (float hz) |
| bool | initImpl (uint8_t param) override |
Protected Member Functions inherited from ComplexDeviceWithHal | |
| bool | ensureValid () const override |
| Ensure the communication interface is valid. | |
Protected Member Functions inherited from DeviceBeginCommon | |
| DeviceBeginCommon ()=default | |
| virtual SensorCommBase * | getComm () const override |
| virtual void | beforeBegin () |
| virtual void | afterCommReady () |
| virtual void | afterInitSuccess (uint8_t param) |
| virtual void | onBeginFail () |
| bool | fail () |
| void | clearCommState () |
| template<typename CreateComm > | |
| bool | beginLifecycle (uint8_t addr, uint8_t iface, uint8_t initParam, CreateComm createComm) |
Protected Member Functions inherited from ComplexStaticDeviceWithHal | |
| bool | ensureValid () const override |
| Ensure the communication interface is valid. | |
Static Protected Attributes | |
| static constexpr uint8_t | STATUS_TAP_EVENT = sensorlib::_bv(1) |
| static constexpr uint8_t | STATUS_WOM_EVENT = sensorlib::_bv(2) |
| static constexpr uint8_t | STATUS_PEDOMETER_EVENT = sensorlib::_bv(4) |
| static constexpr uint8_t | STATUS_ANY_MOTION_EVENT = sensorlib::_bv(5) |
| static constexpr uint8_t | STATUS_NO_MOTION_EVENT = sensorlib::_bv(6) |
| static constexpr uint8_t | STATUS_SIGNIFICANT_MOTION = sensorlib::_bv(7) |
| static constexpr uint16_t | MAX_STATIC_CALI_SAMPLES = 100 |
| static constexpr uint8_t | DYN_CAL_BUFFER_SIZE = 10 |
| static constexpr uint8_t | DYN_CAL_STATIC_COUNT = 12 |
| static constexpr float | HW_ST_ACCEL_THRESHOLD_MG = 200.0f |
| static constexpr float | HW_ST_GYRO_THRESHOLD_DPS = 300.0f |
| static constexpr uint8_t | QMI8658_REG_WHOAMI_DEFAULT = 0x05 |
| static constexpr uint8_t | QMI8658_REG_STATUS_DEFAULT = 0x03 |
| static constexpr uint8_t | QMI8658_REG_RESET_DEFAULT = 0xB0 |
| static constexpr uint8_t | QMI8658_REG_WHOAMI = 0x00 |
| static constexpr uint8_t | QMI8658_REG_REVISION = 0x01 |
| static constexpr uint8_t | QMI8658_REG_CTRL1 = 0x02 |
| static constexpr uint8_t | QMI8658_REG_CTRL2 = 0x03 |
| static constexpr uint8_t | QMI8658_REG_CTRL3 = 0x04 |
| static constexpr uint8_t | QMI8658_REG_CTRL5 = 0x06 |
| static constexpr uint8_t | QMI8658_REG_CTRL7 = 0x08 |
| static constexpr uint8_t | QMI8658_REG_CTRL8 = 0x09 |
| static constexpr uint8_t | QMI8658_REG_CTRL9 = 0x0A |
| static constexpr uint8_t | QMI8658_REG_CAL1_L = 0x0B |
| static constexpr uint8_t | QMI8658_REG_CAL1_H = 0x0C |
| static constexpr uint8_t | QMI8658_REG_CAL2_L = 0x0D |
| static constexpr uint8_t | QMI8658_REG_CAL2_H = 0x0E |
| static constexpr uint8_t | QMI8658_REG_CAL3_L = 0x0F |
| static constexpr uint8_t | QMI8658_REG_CAL3_H = 0x10 |
| static constexpr uint8_t | QMI8658_REG_CAL4_L = 0x11 |
| static constexpr uint8_t | QMI8658_REG_CAL4_H = 0x12 |
| static constexpr uint8_t | QMI8658_REG_FIFO_WTM_TH = 0x13 |
| static constexpr uint8_t | QMI8658_REG_FIFO_CTRL = 0x14 |
| static constexpr uint8_t | QMI8658_REG_FIFO_COUNT = 0x15 |
| static constexpr uint8_t | QMI8658_REG_FIFO_STATUS = 0x16 |
| static constexpr uint8_t | QMI8658_REG_FIFO_DATA = 0x17 |
| static constexpr uint8_t | QMI8658_REG_STATUS_INT = 0x2D |
| static constexpr uint8_t | QMI8658_REG_STATUS0 = 0x2E |
| static constexpr uint8_t | QMI8658_REG_STATUS1 = 0x2F |
| static constexpr uint8_t | QMI8658_REG_TIMESTAMP_L = 0x30 |
| static constexpr uint8_t | QMI8658_REG_TIMESTAMP_M = 0x31 |
| static constexpr uint8_t | QMI8658_REG_TIMESTAMP_H = 0x32 |
| static constexpr uint8_t | QMI8658_REG_TEMPERATURE_L = 0x33 |
| static constexpr uint8_t | QMI8658_REG_TEMPERATURE_H = 0x34 |
| static constexpr uint8_t | QMI8658_REG_AX_L = 0x35 |
| static constexpr uint8_t | QMI8658_REG_AX_H = 0x36 |
| static constexpr uint8_t | QMI8658_REG_AY_L = 0x37 |
| static constexpr uint8_t | QMI8658_REG_AY_H = 0x38 |
| static constexpr uint8_t | QMI8658_REG_AZ_L = 0x39 |
| static constexpr uint8_t | QMI8658_REG_AZ_H = 0x3A |
| static constexpr uint8_t | QMI8658_REG_GX_L = 0x3B |
| static constexpr uint8_t | QMI8658_REG_GX_H = 0x3C |
| static constexpr uint8_t | QMI8658_REG_GY_L = 0x3D |
| static constexpr uint8_t | QMI8658_REG_GY_H = 0x3E |
| static constexpr uint8_t | QMI8658_REG_GZ_L = 0x3F |
| static constexpr uint8_t | QMI8658_REG_GZ_H = 0x40 |
| static constexpr uint8_t | QMI8658_REG_COD_STATUS = 0x46 |
| static constexpr uint8_t | QMI8658_REG_DQW_L = 0x49 |
| static constexpr uint8_t | QMI8658_REG_DQW_H = 0x4A |
| static constexpr uint8_t | QMI8658_REG_DQX_L = 0x4B |
| static constexpr uint8_t | QMI8658_REG_DQX_H = 0x4C |
| static constexpr uint8_t | QMI8658_REG_DQY_L = 0x4D |
| static constexpr uint8_t | QMI8658_REG_DQY_H = 0x4E |
| static constexpr uint8_t | QMI8658_REG_DQZ_L = 0x4F |
| static constexpr uint8_t | QMI8658_REG_DQZ_H = 0x50 |
| static constexpr uint8_t | QMI8658_REG_DVX_L = 0x51 |
| static constexpr uint8_t | QMI8658_REG_DVX_H = 0x52 |
| static constexpr uint8_t | QMI8658_REG_DVY_L = 0x53 |
| static constexpr uint8_t | QMI8658_REG_DVY_H = 0x54 |
| static constexpr uint8_t | QMI8658_REG_DVZ_L = 0x55 |
| static constexpr uint8_t | QMI8658_REG_DVZ_H = 0x56 |
| static constexpr uint8_t | QMI8658_REG_TAP_STATUS = 0x59 |
| static constexpr uint8_t | QMI8658_REG_STEP_CNT_LOW = 0x5A |
| static constexpr uint8_t | QMI8658_REG_STEP_CNT_MID = 0x5B |
| static constexpr uint8_t | QMI8658_REG_STEP_CNT_HIGH = 0x5C |
| static constexpr uint8_t | QMI8658_REG_RESET = 0x60 |
| static constexpr uint8_t | QMI8658_REG_RST_RESULT = 0x4D |
| static constexpr uint8_t | QMI8658_REG_RST_RESULT_VAL = 0x80 |
| static constexpr uint8_t | STATUS0_ACCEL_AVAIL = 0x01 |
| static constexpr uint8_t | STATUS0_GYRO_AVAIL = 0x02 |
| static constexpr uint8_t | QMI8658_ACCEL_LPF_MASK = 0xF9 |
| static constexpr uint8_t | QMI8658_GYRO_LPF_MASK = 0x9F |
| static constexpr uint8_t | QMI8658_ACCEL_EN_MASK = 0x01 |
| static constexpr uint8_t | QMI8658_GYRO_EN_MASK = 0x02 |
| static constexpr uint8_t | QMI8658_ACCEL_GYRO_EN_MASK = 0x03 |
| static constexpr uint8_t | QMI8658_FIFO_MAP_INT1 = 0x04 |
QMI8658 IMU sensor driver class.
Definition at line 45 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
| using SensorQMI8658::DataReadyCallback = std::function<void()> |
Callback function type for data ready events.
Definition at line 199 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
| typedef void(* SensorQMI8658::EventCallBack_t) (void) |
Definition at line 52 of file SensorQMI8658.hpp.
| using SensorQMI8658::IntPin = InterruptPinMap |
Definition at line 141 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
| using SensorQMI8658::MotionCallback = std::function<void()> |
Callback function type for motion events.
Definition at line 189 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
| using SensorQMI8658::TapCallback = std::function<void(TapEvent event)> |
Callback function type for tap events.
Definition at line 194 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
| using SensorQMI8658::TapEvent = ::TapEvent |
Definition at line 142 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
|
strong |
Accelerometer output data rate enumeration.
Definition at line 62 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Definition at line 73 of file SensorQMI8658.hpp.
|
strong |
Accelerometer full-scale range enumeration.
| Enumerator | |
|---|---|
| FS_2G | ±2g range |
| FS_4G | ±4g range |
| FS_8G | ±8g range |
| FS_16G | ±16g range |
| ACC_RANGE_2G | |
| ACC_RANGE_4G | |
| ACC_RANGE_8G | |
| ACC_RANGE_16G | |
Definition at line 52 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
| Enumerator | |
|---|---|
| FS_2G | ±2g range |
| FS_4G | ±4g range |
| FS_8G | ±8g range |
| FS_16G | ±16g range |
Definition at line 54 of file SensorQMI8658.hpp.
Definition at line 151 of file SensorQMI8658.hpp.
| Enumerator | |
|---|---|
| FIFO_MODE_BYPASS | |
| FIFO_MODE_FIFO | |
| FIFO_MODE_STREAM | |
Definition at line 134 of file SensorQMI8658.hpp.
| Enumerator | |
|---|---|
| FIFO_SAMPLES_16 | |
| FIFO_SAMPLES_32 | |
| FIFO_SAMPLES_64 | |
| FIFO_SAMPLES_128 | |
Definition at line 127 of file SensorQMI8658.hpp.
|
strong |
FIFO mode enumeration.
| Enumerator | |
|---|---|
| BYPASS | Bypass mode (FIFO disabled) |
| FIFO | FIFO mode (stops when full) |
| STREAM | Stream mode (overwrites oldest) |
Definition at line 125 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
|
strong |
FIFO sample count enumeration.
| Enumerator | |
|---|---|
| SAMPLES_16 | 16 samples |
| SAMPLES_32 | 32 samples |
| SAMPLES_64 | 64 samples |
| SAMPLES_128 | 128 samples |
Definition at line 134 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
|
strong |
Gyroscope output data rate enumeration.
Definition at line 97 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
| Enumerator | |
|---|---|
| ODR_7Hz | 7 Hz |
| ODR_14Hz | 14 Hz |
| ODR_28Hz | 28 Hz |
| ODR_56Hz | 56 Hz |
| ODR_112Hz | 112 Hz |
| ODR_224Hz | 224 Hz |
| ODR_448Hz | 448 Hz |
| ODR_896Hz | 896 Hz |
| ODR_1792Hz | 1792 Hz |
| ODR_3584Hz | 3584 Hz |
| ODR_7168Hz | 7168 Hz |
Definition at line 86 of file SensorQMI8658.hpp.
|
strong |
Gyroscope full-scale range enumeration.
Definition at line 83 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Definition at line 61 of file SensorQMI8658.hpp.
| Enumerator | |
|---|---|
| INTERRUPT_PIN_1 | |
| INTERRUPT_PIN_2 | |
| INTERRUPT_PIN_DISABLE | |
Definition at line 121 of file SensorQMI8658.hpp.
|
strong |
Sensor axis layout enumeration for coordinate transformation.
Different mounting orientations require different axis mappings. Layout values 0-3: Z-axis pointing up Layout values 4-7: Z-axis pointing down Even layouts (0,2,4,6): X-Y axis not swapped Odd layouts (1,3,5,7): X-Y axis swapped Second group (2,3,6,7): X-axis inverted Third group (1,3,5,7): Y-axis inverted
Definition at line 175 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
|
strong |
Low-pass filter mode enumeration.
Definition at line 114 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
| Enumerator | |
|---|---|
| MODE_0 | 2.66% of output data rate |
| MODE_1 | 3.63% of output data rate |
| MODE_2 | 5.39% of output data rate |
| MODE_3 | 13.37% of output data rate |
| OFF | Disable low-pass filter. |
Definition at line 105 of file SensorQMI8658.hpp.
| Enumerator | |
|---|---|
| ANY_MOTION_EN_X | |
| ANY_MOTION_EN_Y | |
| ANY_MOTION_EN_Z | |
| ANY_MOTION_LOGIC_AND | |
| NO_MOTION_EN_X | |
| NO_MOTION_EN_Y | |
| NO_MOTION_EN_Z | |
| NO_MOTION_LOGIC_OR | |
Definition at line 201 of file SensorQMI8658.hpp.
| Enumerator | |
|---|---|
| MOTION_TAP | |
| MOTION_ANT_MOTION | |
| MOTION_NO_MOTION | |
| MOTION_SIGNIFICANT | |
| MOTION_PEDOMETER | |
Definition at line 113 of file SensorQMI8658.hpp.
|
strong |
Motion detection type enumeration.
| Enumerator | |
|---|---|
| ANY_MOTION | Any motion detection. |
| NO_MOTION | No motion detection. |
| SIGNIFICANT | Significant motion detection. |
Definition at line 159 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
| Enumerator | |
|---|---|
| SYNC_MODE | |
| ASYNC_MODE | |
Definition at line 146 of file SensorQMI8658.hpp.
Definition at line 178 of file SensorQMI8658.hpp.
| Enumerator | |
|---|---|
| EVENT_SIGNIFICANT_MOTION | |
| EVENT_NO_MOTION | |
| EVENT_ANY_MOTION | |
| EVENT_PEDOMETER_MOTION | |
| EVENT_WOM_MOTION | |
| EVENT_TAP_MOTION | |
Definition at line 169 of file SensorQMI8658.hpp.
| Enumerator | |
|---|---|
| PRIORITY0 | |
| PRIORITY1 | |
| PRIORITY2 | |
| PRIORITY3 | |
| PRIORITY4 | |
| PRIORITY5 | |
Definition at line 192 of file SensorQMI8658.hpp.
| Enumerator | |
|---|---|
| INVALID_TAP | |
| SINGLE_TAP | |
| DOUBLE_TAP | |
Definition at line 98 of file SensorQMI8658.hpp.
|
strong |
Tap detection axis priority enumeration.
| Enumerator | |
|---|---|
| X_GT_Y_GT_Z | X > Y > Z. |
| X_GT_Z_GT_Y | X > Z > Y. |
| Y_GT_X_GT_Z | Y > X > Z. |
| Y_GT_Z_GT_X | Y > Z > X. |
| Z_GT_X_GT_Y | Z > X > Y. |
| Z_GT_Y_GT_X | Z > Y > X. |
Definition at line 147 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
| SensorQMI8658::SensorQMI8658 | ( | ) |
Construct a new SensorQMI8658 object.
Definition at line 198 of file SensorQMI8658.cpp.
References _accel_cali_offset, _accel_cali_sum, _accel_speed_buffer, _dyn_gyro_offset, _dyn_gyro_sum, _gyro_cali_offset, _gyro_cali_sum, _gyro_speed_buffer, _hw_st_accel_result, _hw_st_gyro_result, and _usid.
|
override |
Destroy the SensorQMI8658 object.
Definition at line 256 of file SensorQMI8658.cpp.
References _fifo_buffer, and _fifo_buffer_size.
|
default |
Constructor for SensorQMI8658.
| None |
|
inline |
Destructor for SensorQMI8658.
| None |
Definition at line 230 of file SensorQMI8658.hpp.
|
protected |
Definition at line 1360 of file SensorQMI8658.cpp.
References _accel_enabled, _gyro_enabled, _motion_any_configured, _motion_any_thr, _motion_any_window, _motion_no_configured, _motion_no_thr, _motion_no_window, _motion_sig_configured, _motion_sig_confirm_window, _motion_sig_wait_window, CTRL_CMD_CONFIGURE_MOTION, disableAccel(), disableGyro(), disableSyncMode(), enableAccel(), enableGyro(), mgToBytes(), writeCommand(), and SensorCommWrapper::writeReg().
Referenced by configMotionDetect().
| void SensorQMI8658::axisConvert | ( | int16_t | accel_data[3], |
| int16_t | gyro_data[3] | ||
| ) |
Apply axis conversion to raw sensor data.
| [in,out] | accel_accel | Accel data array [x, y, z]. |
| [in,out] | gyro_data | Gyro data array [x, y, z]. |
Definition at line 2088 of file SensorQMI8658.cpp.
References _axis_layout.
Referenced by readGyro().
| bool SensorQMI8658::calibrate | ( | uint16_t * | gyro_x_gain = nullptr, |
| uint16_t * | gyro_y_gain = nullptr, |
||
| uint16_t * | gyro_z_gain = nullptr |
||
| ) |
Perform on-demand calibration.
| [out] | gyro_x_gain | Optional output for X-axis gyro gain. |
| [out] | gyro_y_gain | Optional output for Y-axis gyro gain. |
| [out] | gyro_z_gain | Optional output for Z-axis gyro gain. |
Definition at line 1111 of file SensorQMI8658.cpp.
References _accel_enabled, _gyro_enabled, CTRL_CMD_ON_DEMAND_CALIBRATION, disableAccel(), disableGyro(), DeviceBeginCommon::hal, SensorCommWrapper::readReg(), SensorCommWrapper::readRegBuff(), SENSORLIB_LOG_E, and writeCommand().
Referenced by setup().
|
inline |
Set Gyroscope calibration gains.
| *gX_gain | Pointer to the gain value for the X axis |
| *gY_gain | Pointer to the gain value for the Y axis |
| *gZ_gain | Pointer to the gain value for the Z axis |
| True | if successful, false otherwise |
Definition at line 1718 of file SensorQMI8658.hpp.
References sensorlib::_bv(), DeviceBeginCommon::comm, CTRL_CMD_ON_DEMAND_CALIBRATION, DeviceBeginCommon::hal, QMI8658_REG_COD_STATUS, QMI8658_REG_CTRL7, QMI8658_REG_DVX_L, SENSORLIB_LOG_D, SENSORLIB_LOG_E, and writeCommand().
Referenced by setup().
|
inline |
Clear the Pedometer counter.
| True | on success, false on failure |
Definition at line 1119 of file SensorQMI8658.hpp.
References CTRL_CMD_RESET_PEDOMETER, and writeCommand().
| bool SensorQMI8658::configAccel | ( | AccelFullScaleRange | range, |
| float | data_rate_hz, | ||
| LpfMode | lpf = LpfMode::MODE_0 |
||
| ) |
Configure the accelerometer with specified parameters.
| range | Full-scale range. |
| odr | Output data rate. |
| lpf | Low-pass filter mode (default: MODE_0). |
Definition at line 636 of file SensorQMI8658.cpp.
References _accel_enabled, _accel_odr, _accel_range, _accel_scale, SensorCommWrapper::clrRegBit(), disableAccel(), enableAccel(), findClosestAccelOdr(), getAccelRangeRegValue(), getAccelScaleFromRange(), OFF, SensorCommWrapper::setRegBit(), SensorCommWrapper::updateBits(), and SensorCommWrapper::writeReg().
Referenced by configAccel(), configAccel(), and setup().
| bool SensorQMI8658::configAccel | ( | AccelRange | range, |
| AccelODR | odr, | ||
| LpfMode | lpf = LpfMode::MODE_0 |
||
| ) |
| bool SensorQMI8658::configAccel | ( | AccelRange | range, |
| float | data_rate_hz, | ||
| LpfMode | lpf = LpfMode::MODE_0 |
||
| ) |
|
inline |
Configure the accelerometer.
| range | Accelerometer range setting |
| odr | Accelerometer output data rate setting |
| lpfOdr | Accelerometer low-pass filter setting |
| true | on success, false on failure |
Definition at line 385 of file SensorQMI8658.hpp.
References ACC_RANGE_16G, ACC_RANGE_2G, ACC_RANGE_4G, ACC_RANGE_8G, DeviceBeginCommon::comm, disableAccelerometer(), enableAccelerometer(), isEnableAccelerometer(), LPF_OFF, QMI8658_ACCEL_LPF_MASK, QMI8658_REG_CTRL2, and QMI8658_REG_CTRL5.
Referenced by setup().
|
inline |
Config activity interrupt pin mapping.
| pin | Interrupt pin to map activity interrupt, see IntPin enum |
| true | on success, false on failure |
Definition at line 1016 of file SensorQMI8658.hpp.
References DeviceBeginCommon::comm, INTERRUPT_PIN_1, and QMI8658_REG_CTRL8.
Referenced by enableMotionDetect(), enablePedometer(), and enableTap().
|
inline |
Configure the FIFO.
| mode | FIFO mode setting |
| samples | Number of samples to store in FIFO |
| pin | Interrupt pin to output FIFO watermark interrupt, see IntPin enum |
| trigger_samples | Number of samples to trigger FIFO watermark interrupt |
| true | on success, false on failure |
Definition at line 530 of file SensorQMI8658.hpp.
References _fifo_mode, DeviceBeginCommon::comm, CTRL_CMD_RST_FIFO, disableAccelerometer(), disableGyroscope(), enableAccelerometer(), enableGyroscope(), INTERRUPT_PIN_1, INTERRUPT_PIN_2, INTERRUPT_PIN_DISABLE, isEnableAccelerometer(), isEnableGyroscope(), QMI8658_REG_CTRL1, QMI8658_REG_FIFO_CTRL, QMI8658_REG_FIFO_WTM_TH, SENSORLIB_LOG_D, SENSORLIB_LOG_E, and writeCommand().
| bool SensorQMI8658::configFifo | ( | FifoMode | mode, |
| FifoSamples | samples = FifoSamples::SAMPLES_16, |
||
| uint8_t | watermark_samples = 16 |
||
| ) |
Configure FIFO with specified mode.
| mode | FIFO mode. |
| samples | FIFO sample count. |
| watermark_samples | Watermark threshold. |
Definition at line 867 of file SensorQMI8658.cpp.
References _accel_enabled, _fifo_enabled, _fifo_mode, _fifo_watermark, _gyro_enabled, BYPASS, CTRL_CMD_RST_FIFO, disableAccel(), disableGyro(), enableAccel(), enableGyro(), resetFifo(), SAMPLES_128, SAMPLES_16, SAMPLES_32, SAMPLES_64, writeCommand(), and SensorCommWrapper::writeReg().
Referenced by setup().
| bool SensorQMI8658::configGyro | ( | GyroFullScaleRange | range, |
| float | data_rate_hz, | ||
| LpfMode | lpf = LpfMode::MODE_0 |
||
| ) |
Configure the gyroscope with specified parameters.
| range | Full-scale range. |
| odr | Output data rate. |
| lpf | Low-pass filter mode (default: MODE_0). |
Definition at line 668 of file SensorQMI8658.cpp.
References _gyro_enabled, _gyro_odr, _gyro_range, _gyro_scale, SensorCommWrapper::clrRegBit(), disableGyro(), enableGyro(), findClosestGyroOdr(), getGyroRangeRegValue(), getGyroScaleFromRange(), OFF, SensorCommWrapper::setRegBit(), SensorCommWrapper::updateBits(), and SensorCommWrapper::writeReg().
Referenced by configGyro(), configGyro(), and setup().
| bool SensorQMI8658::configGyro | ( | GyroRange | range, |
| float | data_rate_hz, | ||
| LpfMode | lpf = LpfMode::MODE_0 |
||
| ) |
Definition at line 1602 of file SensorQMI8658.cpp.
References configGyro(), FS_1000_DPS, FS_1024DPS, FS_125_DPS, FS_128DPS, FS_2000_DPS, FS_2048DPS, FS_250_DPS, FS_256DPS, FS_500_DPS, and FS_512DPS.
| bool SensorQMI8658::configGyro | ( | GyroRange | range, |
| GyroODR | odr, | ||
| LpfMode | lpf = LpfMode::MODE_0 |
||
| ) |
Definition at line 1576 of file SensorQMI8658.cpp.
References configGyro(), FS_1000_DPS, FS_1024DPS, FS_125_DPS, FS_128DPS, FS_2000_DPS, FS_2048DPS, FS_250_DPS, FS_256DPS, FS_500_DPS, and FS_512DPS.
|
inline |
Configure the gyroscope.
| range | Gyroscope range setting |
| odr | Gyroscope output data rate setting |
| lpfOdr | Gyroscope low-pass filter setting |
| true | on success, false on failure |
Definition at line 453 of file SensorQMI8658.hpp.
References DeviceBeginCommon::comm, disableGyroscope(), enableGyroscope(), GYR_RANGE_1024DPS, GYR_RANGE_128DPS, GYR_RANGE_16DPS, GYR_RANGE_256DPS, GYR_RANGE_32DPS, GYR_RANGE_512DPS, GYR_RANGE_64DPS, isEnableGyroscope(), LPF_OFF, QMI8658_GYRO_LPF_MASK, QMI8658_REG_CTRL3, and QMI8658_REG_CTRL5.
Referenced by setup().
|
inline |
Definition at line 1333 of file SensorQMI8658.hpp.
References sensorlib::_highByte(), sensorlib::_lowByte(), DeviceBeginCommon::comm, CTRL_CMD_CONFIGURE_MOTION, disableAccelerometer(), disableGyroscope(), disableSyncSampleMode(), enableAccelerometer(), enableGyroscope(), isEnableAccelerometer(), isEnableGyroscope(), mgToBytes(), QMI8658_REG_CAL1_H, QMI8658_REG_CAL1_L, QMI8658_REG_CAL2_H, QMI8658_REG_CAL2_L, QMI8658_REG_CAL3_H, QMI8658_REG_CAL3_L, QMI8658_REG_CAL4_H, QMI8658_REG_CAL4_L, and writeCommand().
Referenced by setup().
| bool SensorQMI8658::configMotionDetect | ( | MotionType | type, |
| float | threshold_x, | ||
| float | threshold_y, | ||
| float | threshold_z, | ||
| uint8_t | duration | ||
| ) |
Configure motion detection parameters.
| type | Motion detection type. |
| threshold_x | X-axis threshold in mg. |
| threshold_y | Y-axis threshold in mg. |
| threshold_z | Z-axis threshold in mg. |
| duration | Number of consecutive samples above/below threshold. |
Definition at line 1310 of file SensorQMI8658.cpp.
References _motion_any_configured, _motion_any_thr, _motion_any_window, _motion_no_configured, _motion_no_thr, _motion_no_window, _motion_sig_configured, _motion_sig_confirm_window, ANY_MOTION, applyMotionConfig(), mgToBytes(), NO_MOTION, and SIGNIFICANT.
Referenced by configMotionDetectDefault(), and setup().
| bool SensorQMI8658::configMotionDetectDefault | ( | MotionType | type | ) |
Configure motion detection with default parameters.
Provides sensible defaults for motion detection based on type:
| type | Motion detection type. |
Definition at line 1421 of file SensorQMI8658.cpp.
References ANY_MOTION, configMotionDetect(), NO_MOTION, and SIGNIFICANT.
Referenced by setup().
|
inline |
configPedometer
| ped_sample_cnt | Indicates the count of sample batch/window for calculation |
| ped_fix_peak2peak:Indicates | the threshold of the valid peak-to-peak detection E.g., 0x00CC means 200mg |
| ped_fix_peak:Indicates | the threshold of the peak detection comparing to average E.g., 0x0066 means 100mg |
| ped_time_up:Indicates | the maximum duration (timeout window) for a step. Reset counting calculation if no peaks detected within this duration. E.g., 80 means 1.6s @ ODR = 50Hz |
| ped_time_low:Indicates | the minimum duration for a step. The peaks detected within this duration (quiet time) is ignored. E.g., 12 means 0.25s @ ODR = 50Hz |
| ped_time_cnt_entry:Indicates | the minimum continuous steps to start the valid step counting. If the continuously detected steps is lower than this count and timeout, the steps will not be take into account; if yes, the detected steps will all be taken into account and counting is started to count every following step before timeout. This is useful to screen out the fake steps detected by non-step vibrations The timeout duration is defined by ped_time_up. E.g., 10 means 10 steps entry count |
| ped_fix_precision:0 | is recommended |
| ped_sig_count | The amount of steps when to update the pedometer output registers. E.g., ped_sig_count = 4, every 4 valid steps is detected, update the registers once (added by 4). |
Definition at line 1050 of file SensorQMI8658.hpp.
References DeviceBeginCommon::comm, CTRL_CMD_CONFIGURE_PEDOMETER, disableAccelerometer(), disableGyroscope(), disableSyncSampleMode(), enableAccelerometer(), enableGyroscope(), isEnableAccelerometer(), isEnableGyroscope(), QMI8658_REG_CAL1_H, QMI8658_REG_CAL1_L, QMI8658_REG_CAL2_H, QMI8658_REG_CAL2_L, QMI8658_REG_CAL3_H, QMI8658_REG_CAL3_L, QMI8658_REG_CAL4_H, QMI8658_REG_CAL4_L, and writeCommand().
| bool SensorQMI8658::configPedometer | ( | uint16_t | sample_count, |
| uint16_t | peak_to_peak, | ||
| uint16_t | peak_threshold, | ||
| uint16_t | time_up, | ||
| uint8_t | time_low = 20, |
||
| uint8_t | entry_count = 10, |
||
| uint8_t | fix_precision = 0, |
||
| uint8_t | sig_count = 4 |
||
| ) |
Configure pedometer parameters.
| sample_count | Number of samples per calculation window. |
| peak_to_peak | Peak-to-peak threshold in mg. |
| peak_threshold | Peak threshold in mg. |
| time_up | Maximum step duration in samples. |
| time_low | Minimum step duration in samples. |
| entry_count | Minimum steps to start counting. |
| fix_precision | Pedometer precision parameter (recommended 0). |
| sig_count | Steps per output update. |
Definition at line 1760 of file SensorQMI8658.cpp.
References _accel_enabled, _gyro_enabled, CTRL_CMD_CONFIGURE_PEDOMETER, disableAccel(), disableGyro(), disableSyncMode(), enableAccel(), enableGyro(), writeCommand(), SensorCommWrapper::writeReg(), and SensorCommWrapper::writeRegBuff().
Referenced by configPedometerDefault(), and setup().
| bool SensorQMI8658::configPedometerDefault | ( | float | odr = 125.0f | ) |
Configure pedometer with default parameters.
Provides sensible defaults for step counting. Works well for normal walking.
| odr | Current accelerometer ODR in Hz (for time calculation). |
Definition at line 1816 of file SensorQMI8658.cpp.
References configPedometer().
Referenced by setup().
| bool SensorQMI8658::configTap | ( | TapPriority | priority, |
| uint8_t | peak_window, | ||
| uint16_t | tap_window, | ||
| uint16_t | double_tap_window, | ||
| float | peak_mag_threshold, | ||
| float | quiet_threshold | ||
| ) |
Configure tap detection parameters.
| priority | Axis priority for tap detection. |
| peak_window | Maximum peak duration in samples. |
| tap_window | Minimum quiet time between taps. |
| double_tap_window | Maximum time for double tap. |
| peak_mag_threshold | Peak magnitude threshold in g^2. |
| quiet_threshold | Undefined motion threshold in g^2. |
Definition at line 1668 of file SensorQMI8658.cpp.
References _accel_enabled, _gyro_enabled, CTRL_CMD_CONFIGURE_TAP, disableAccel(), disableGyro(), disableSyncMode(), enableAccel(), enableGyro(), writeCommand(), and SensorCommWrapper::writeReg().
Referenced by applyTapConfig(), configTapDefault(), and setup().
|
inline |
configTap
| priority | Priority definition between the x, y, z axes of acceleration. Only Priority[2:0] bits are used. The axis that output the first peak of Linear Acceleration in a valid Tap detection, will be consider as the Tap axis. However, there is possibility that two or three of the axes shows same Linear Acceleration at exactly same time when reach (or be higher than) the PeakMagThr. In this case, the defined priority is used to judge and select the axis as Tap axis. |
| peakWindow:Defines | the maximum duration (in sample) for a valid peak. In a valid peak, the linear acceleration should reach or be higher than the PeakMagThr and should return to quiet (no significant movement) within UDMThr, at the end of PeakWindow. E.g., 20 @500Hz ODR |
| tapWindow:Defines | the minimum quiet time before the second Tap happen. After the first Tap is detected, there should be no significant movement (defined by UDMThr) during the TapWindow. The valid second tap should be detected after TapWindow and before DTapWindow. E.g., 50 @500Hz ODR |
| dTapWindow:Defines | the maximum time for a valid second Tap for Double Tap, count start from the first peak of the valid first Tap. E.g., 250 @500Hz ODR |
| alpha:Defines | the ratio for calculation the average of the acceleration. The bigger of Alpha, the bigger weight of the latest data. E.g., 0.0625 |
| gamma:Defines | the ratio for calculating the average of the movement magnitude. The bigger of Gamma, the bigger weight of the latest data. E.g., 0.25 |
| peakMagThr:Threshold | for peak detection. E.g, 0.8g2 |
| UDMThr:Undefined | Motion threshold. This defines the threshold of the Linear Acceleration for quiet status. E.g., 0.4g2 |
Definition at line 1185 of file SensorQMI8658.hpp.
References sensorlib::_highByte(), sensorlib::_lowByte(), DeviceBeginCommon::comm, CTRL_CMD_CONFIGURE_TAP, disableAccelerometer(), disableGyroscope(), disableSyncSampleMode(), enableAccelerometer(), enableGyroscope(), isEnableAccelerometer(), isEnableGyroscope(), peakWindow, QMI8658_REG_CAL1_H, QMI8658_REG_CAL1_L, QMI8658_REG_CAL2_H, QMI8658_REG_CAL2_L, QMI8658_REG_CAL3_H, QMI8658_REG_CAL3_L, QMI8658_REG_CAL4_H, tapWindow, and writeCommand().
| bool SensorQMI8658::configTapDefault | ( | TapPriority | priority = TapPriority::X_GT_Y_GT_Z | ) |
Configure tap detection with default parameters.
Provides sensible defaults for tap detection. Uses X>Y>Z axis priority.
| priority | Axis priority for tap detection. |
Definition at line 1715 of file SensorQMI8658.cpp.
References configTap().
Referenced by setup().
|
overridevirtual |
Configure the FIFO buffer.
| enable | true to enable FIFO, false to disable. |
| watermark_samples | Number of samples for watermark interrupt. |
Implements ImuBase.
Definition at line 828 of file SensorQMI8658.cpp.
References _accel_enabled, _fifo_enabled, _fifo_mode, _fifo_watermark, _gyro_enabled, CTRL_CMD_RST_FIFO, disableAccel(), disableGyro(), enableAccel(), enableGyro(), FIFO_MODE_STREAM, FIFO_SAMPLES_16, resetFifo(), SENSORLIB_LOG_E, writeCommand(), and SensorCommWrapper::writeReg().
Definition at line 1628 of file SensorQMI8658.cpp.
References configWakeOnMotion().
| bool SensorQMI8658::configWakeOnMotion | ( | uint8_t | threshold, |
| AccelODR | odr, | ||
| IntPin | pin, | ||
| uint8_t | default_pin_value, | ||
| uint8_t | blanking_time, | ||
| AccelRange | acc_range | ||
| ) |
| bool SensorQMI8658::configWakeOnMotion | ( | uint8_t | threshold = 200, |
| float | odr_hz = 128.0f, |
||
| IntPin | pin = IntPin::PIN2 |
||
| ) |
Configure wake-on-motion (WoM) feature.
| threshold | WoM threshold in mg (default: 200mg). |
| odr | Accelerometer ODR for WoM (default: LP_128Hz). |
| pin | Interrupt pin. |
Definition at line 1484 of file SensorQMI8658.cpp.
References configWakeOnMotionAdvanced(), and FS_8G.
Referenced by configWakeOnMotion(), and setup().
|
inline |
configWakeOnMotion
| WoMThreshold | Resolution = 1mg ,default 200mg |
| odr | Accelerometer output data rate ,default low power 128Hz |
| pin | Interrupt Pin( 1 or 2 ) ,default use pin2 |
| defaultPinValue | WoM Interrupt Initial Value select: ,default pin high 01 – INT2 (with initial value 0) 11 – INT2 (with initial value 1) 00 – INT1 (with initial value 0) 10 – INT1 (with initial value 1) |
| blankingTime | Interrupt Blanking Time (in number of accelerometer samples), the number of consecutive samples that will be ignored after enabling the WoM, to screen out unwanted fake detection |
| accRange | Accelerometer Range ,default ±8g |
| True | if successful, false otherwise |
Definition at line 1465 of file SensorQMI8658.hpp.
References DeviceBeginCommon::comm, CTRL_CMD_WRITE_WOM_SETTING, enableAccelerometer(), enableINT(), INTERRUPT_PIN_1, INTERRUPT_PIN_2, QMI8658_REG_CAL1_H, QMI8658_REG_CAL1_L, QMI8658_REG_CTRL2, QMI8658_REG_CTRL7, reset(), and writeCommand().
| bool SensorQMI8658::configWakeOnMotionAdvanced | ( | uint8_t | threshold, |
| float | odr_hz, | ||
| IntPin | pin, | ||
| uint8_t | default_pin_value, | ||
| uint8_t | blanking_time, | ||
| AccelFullScaleRange | acc_range | ||
| ) |
Configure wake-on-motion (WoM) with full vendor parameters.
| threshold | WoM threshold register value. |
| odr_hz | Accelerometer ODR in Hz. |
| pin | Interrupt pin routing. |
| default_pin_value | Initial interrupt pin level (0 or 1). |
| blanking_time | Interrupt blanking time (accelerometer samples). |
| acc_range | Accelerometer range used in WoM mode. |
Definition at line 1489 of file SensorQMI8658.cpp.
References SensorCommWrapper::clrRegBit(), CTRL_CMD_WRITE_WOM_SETTING, enableAccel(), enableInterrupt(), findClosestAccelLpOdr(), getAccelRangeRegValue(), DeviceBeginCommon::hal, reset(), SensorCommWrapper::updateBits(), writeCommand(), and SensorCommWrapper::writeReg().
Referenced by applyWomConfig(), configWakeOnMotion(), and configWakeOnMotion().
|
overridevirtual |
Disable the accelerometer.
Implements ImuBase.
Definition at line 419 of file SensorQMI8658.cpp.
References _accel_enabled, and SensorCommWrapper::clrRegBit().
Referenced by applyMotionConfig(), calibrate(), configAccel(), configFifo(), configPedometer(), configTap(), configureFifo(), hardwareSelfTest(), selfTestAccel(), selfTestGyro(), setOperationMode(), and writeCalibration().
|
inline |
Disable the accelerometer.
| true | on success, false on failure |
Definition at line 713 of file SensorQMI8658.hpp.
References _accel_enabled, DeviceBeginCommon::comm, and QMI8658_REG_CTRL7.
Referenced by configAccelerometer(), configFIFO(), configMotion(), configPedometer(), configTap(), and powerDown().
|
overridevirtual |
Disable the gyroscope.
Implements ImuBase.
Definition at line 558 of file SensorQMI8658.cpp.
References _gyro_enabled, and SensorCommWrapper::clrRegBit().
Referenced by applyMotionConfig(), calibrate(), configFifo(), configGyro(), configPedometer(), configTap(), configureFifo(), hardwareSelfTest(), selfTestAccel(), selfTestGyro(), setOperationMode(), and writeCalibration().
|
inline |
Disable the gyroscope.
| true | on success, false on failure |
Definition at line 760 of file SensorQMI8658.hpp.
References _gyro_enabled, DeviceBeginCommon::comm, and QMI8658_REG_CTRL7.
Referenced by configFIFO(), configGyroscope(), configMotion(), configPedometer(), configTap(), and powerDown().
| bool SensorQMI8658::disableInterrupt | ( | IntPin | pin | ) |
Disable interrupt on specified pin.
| pin | Interrupt pin. |
Definition at line 754 of file SensorQMI8658.cpp.
References _int_enabled, _int_pin_mask, and SensorCommWrapper::clrRegBit().
| bool SensorQMI8658::disableLockingMechanism | ( | ) |
Disable the data locking mechanism.
Definition at line 1102 of file SensorQMI8658.cpp.
References CTRL_CMD_AHB_CLOCK_GATING, disableSyncMode(), writeCommand(), and SensorCommWrapper::writeReg().
|
inline |
Disable the locking mechanism.
| true | on success, false on failure |
Definition at line 952 of file SensorQMI8658.hpp.
References DeviceBeginCommon::comm, CTRL_CMD_AHB_CLOCK_GATING, disableSyncSampleMode(), QMI8658_REG_CAL1_L, and writeCommand().
| bool SensorQMI8658::disableMotionDetect | ( | ) |
Disable motion detection.
Definition at line 1475 of file SensorQMI8658.cpp.
References SensorCommWrapper::clrRegBit().
|
inline |
Disable motion detection.
| True | if successful, false otherwise |
Definition at line 1438 of file SensorQMI8658.hpp.
References DeviceBeginCommon::comm, and QMI8658_REG_CTRL8.
| bool SensorQMI8658::disablePedometer | ( | ) |
Disable pedometer.
Definition at line 1862 of file SensorQMI8658.cpp.
References SensorCommWrapper::clrRegBit().
|
inline |
Definition at line 1146 of file SensorQMI8658.hpp.
References _accel_enabled, DeviceBeginCommon::comm, and QMI8658_REG_CTRL8.
|
overridevirtual |
Disable synchronous sampling mode.
Implements ImuBase.
Definition at line 627 of file SensorQMI8658.cpp.
References _sync_mode, and SensorCommWrapper::clrRegBit().
Referenced by applyMotionConfig(), configPedometer(), configTap(), disableLockingMechanism(), and enablePedometer().
|
inline |
Disable the synchronous sample mode.
| true | on success, false on failure |
Definition at line 927 of file SensorQMI8658.hpp.
References ASYNC_MODE, DeviceBeginCommon::comm, and QMI8658_REG_CTRL7.
Referenced by configMotion(), configPedometer(), configTap(), and disableLockingMechanism().
| bool SensorQMI8658::disableTap | ( | ) |
Disable tap detection.
Definition at line 1740 of file SensorQMI8658.cpp.
References SensorCommWrapper::clrRegBit().
Referenced by applyTapConfig().
|
inline |
Disable tap detection.
| True | if successful, false otherwise |
Definition at line 1279 of file SensorQMI8658.hpp.
References DeviceBeginCommon::comm, and QMI8658_REG_CTRL8.
|
inline |
Dump the control register values.
| None |
Definition at line 966 of file SensorQMI8658.hpp.
References DeviceBeginCommon::comm, i, QMI8658_REG_CTRL1, QMI8658_REG_FIFO_CTRL, and SENSORLIB_LOG_D.
Referenced by setup().
| void SensorQMI8658::dumpRegisters | ( | ) |
Dump control registers for debugging.
Definition at line 2045 of file SensorQMI8658.cpp.
References i, SensorCommWrapper::readReg(), SensorCommWrapper::readRegBuff(), and SENSORLIB_LOG_I.
Referenced by setup().
|
overridevirtual |
Enable the accelerometer.
Implements ImuBase.
Definition at line 410 of file SensorQMI8658.cpp.
References _accel_enabled, and SensorCommWrapper::setRegBit().
Referenced by applyMotionConfig(), configAccel(), configFifo(), configPedometer(), configTap(), configureFifo(), configWakeOnMotionAdvanced(), enablePedometer(), hardwareSelfTest(), and setup().
|
inline |
Enable the accelerometer.
| true | on success, false on failure |
Definition at line 700 of file SensorQMI8658.hpp.
References _accel_enabled, DeviceBeginCommon::comm, and QMI8658_REG_CTRL7.
Referenced by configAccelerometer(), configFIFO(), configMotion(), configPedometer(), configTap(), configWakeOnMotion(), and setup().
|
inline |
Enable or disable the Data Ready interrupt.
| enable | True to enable, false to disable |
Definition at line 372 of file SensorQMI8658.hpp.
References DeviceBeginCommon::comm, and QMI8658_REG_CTRL7.
Referenced by setup().
| bool SensorQMI8658::enableDataReadyInterrupt | ( | IntPin | pin = IntPin::PIN2 | ) |
Enable data ready interrupt.
| pin | Interrupt pin for data ready signal. |
Definition at line 771 of file SensorQMI8658.cpp.
References SensorCommWrapper::clrRegBit(), and enableInterrupt().
Referenced by setup().
| void SensorQMI8658::enableDynamicGyroCalibration | ( | bool | enable | ) |
Enable dynamic gyroscope calibration.
Dynamic calibration continuously updates gyro offsets when the sensor detects static periods. It uses accelerometer data to determine when the device is stationary.
| enable | True to enable, false to disable. |
Definition at line 2202 of file SensorQMI8658.cpp.
References _accel_static_deviation, _dyn_cal_enabled, _dyn_cali_sample_count, _dyn_gyro_offset, _dyn_offset_applied, _dyn_static_delay, _dyn_static_flag, and _gyro_static_deviation.
Referenced by setup().
|
overridevirtual |
Enable the gyroscope.
Implements ImuBase.
Definition at line 549 of file SensorQMI8658.cpp.
References _gyro_enabled, and SensorCommWrapper::setRegBit().
Referenced by applyMotionConfig(), configFifo(), configGyro(), configPedometer(), configTap(), configureFifo(), enablePedometer(), hardwareSelfTest(), loop(), and setup().
|
inline |
Enable the gyroscope.
| true | on success, false on failure |
Definition at line 747 of file SensorQMI8658.hpp.
References _gyro_enabled, DeviceBeginCommon::comm, and QMI8658_REG_CTRL7.
Referenced by configFIFO(), configGyroscope(), configMotion(), configPedometer(), configTap(), and setup().
|
inline |
Enable or disable the interrupt.
| pin | Interrupt pin to enable/disable,see IntPin enum |
| enable | True to enable, false to disable |
Definition at line 342 of file SensorQMI8658.hpp.
References DeviceBeginCommon::comm, INTERRUPT_PIN_1, INTERRUPT_PIN_2, and QMI8658_REG_CTRL1.
Referenced by configWakeOnMotion(), enableMotionDetect(), enablePedometer(), enableTap(), and setup().
| bool SensorQMI8658::enableInterrupt | ( | IntPin | pin | ) |
Enable interrupt on specified pin.
| pin | Interrupt pin. |
Definition at line 739 of file SensorQMI8658.cpp.
References _int_enabled, _int_pin_mask, and SensorCommWrapper::setRegBit().
Referenced by configWakeOnMotionAdvanced(), enableDataReadyInterrupt(), enableMotionDetect(), enablePedometer(), and enableTap().
| bool SensorQMI8658::enableLockingMechanism | ( | ) |
Enable the data locking mechanism.
Definition at line 1093 of file SensorQMI8658.cpp.
References CTRL_CMD_AHB_CLOCK_GATING, enableSyncMode(), writeCommand(), and SensorCommWrapper::writeReg().
Referenced by setup().
|
inline |
Enable the locking mechanism.
| true | on success, false on failure |
Definition at line 938 of file SensorQMI8658.hpp.
References DeviceBeginCommon::comm, CTRL_CMD_AHB_CLOCK_GATING, enableSyncSampleMode(), QMI8658_REG_CAL1_L, and writeCommand().
|
inline |
Enable motion detection.
| pin | Interrupt Pin( 1 or 2 ) ,default use pin1 |
| True | if successful, false otherwise |
Definition at line 1415 of file SensorQMI8658.hpp.
References _accel_enabled, DeviceBeginCommon::comm, configActivityInterruptMap(), enableINT(), INTERRUPT_PIN_1, INTERRUPT_PIN_2, and QMI8658_REG_CTRL8.
| bool SensorQMI8658::enableMotionDetect | ( | IntPin | pin = IntPin::PIN1 | ) |
Enable motion detection on specified pin.
| pin | Interrupt pin for motion events. |
Definition at line 1436 of file SensorQMI8658.cpp.
References _accel_enabled, _motion_any_configured, _motion_no_configured, _motion_sig_configured, SensorCommWrapper::clrRegBit(), enableInterrupt(), and SensorCommWrapper::setRegBit().
Referenced by setup().
|
inline |
enablePedometer
| pin | Interrupt pin to output Pedometer interrupt, see IntPin enum |
| true | on success, false on failure |
Definition at line 1130 of file SensorQMI8658.hpp.
References _accel_enabled, DeviceBeginCommon::comm, configActivityInterruptMap(), enableINT(), INTERRUPT_PIN_1, INTERRUPT_PIN_2, and QMI8658_REG_CTRL8.
| bool SensorQMI8658::enablePedometer | ( | IntPin | pin = IntPin::DISABLE | ) |
Enable pedometer.
| pin | Interrupt pin for pedometer events. |
Definition at line 1831 of file SensorQMI8658.cpp.
References _accel_enabled, _gyro_enabled, _last_step_count, SensorCommWrapper::clrRegBit(), disableSyncMode(), enableAccel(), enableGyro(), enableInterrupt(), getStepCount(), and SensorCommWrapper::setRegBit().
Referenced by setup().
| void SensorQMI8658::enableStaticCalibration | ( | bool | enable | ) |
Start static calibration.
Static calibration calculates accelerometer and gyroscope offsets when the sensor is stationary. Place the sensor in a stable position and call processCalibration() periodically until it returns true.
| enable | True to enable static calibration, false to disable. |
Definition at line 2128 of file SensorQMI8658.cpp.
References _static_cali_enabled, and resetStaticCalibration().
Referenced by setup().
|
overridevirtual |
Enable synchronous sampling mode.
Implements ImuBase.
Definition at line 618 of file SensorQMI8658.cpp.
References _sync_mode, and SensorCommWrapper::setRegBit().
Referenced by enableLockingMechanism(), and setup().
|
inline |
Enable the synchronous sample mode.
| true | on success, false on failure |
Definition at line 916 of file SensorQMI8658.hpp.
References DeviceBeginCommon::comm, QMI8658_REG_CTRL7, and SYNC_MODE.
Referenced by enableLockingMechanism().
|
inline |
Enable tap detection.
| pin | Interrupt Pin( 1 or 2 ) ,default is INTERRUPT_PIN_1 |
| True | if successful, false otherwise |
Definition at line 1259 of file SensorQMI8658.hpp.
References _accel_enabled, DeviceBeginCommon::comm, configActivityInterruptMap(), enableINT(), INTERRUPT_PIN_1, INTERRUPT_PIN_2, and QMI8658_REG_CTRL8.
| bool SensorQMI8658::enableTap | ( | IntPin | pin = IntPin::PIN1 | ) |
Enable tap detection.
| pin | Interrupt pin for tap events. |
Definition at line 1725 of file SensorQMI8658.cpp.
References _accel_enabled, enableInterrupt(), and SensorCommWrapper::setRegBit().
Referenced by applyTapConfig(), and setup().
|
protected |
Definition at line 731 of file SensorQMI8658.cpp.
Referenced by configWakeOnMotionAdvanced().
|
protected |
Definition at line 705 of file SensorQMI8658.cpp.
Referenced by configAccel(), and setAccelOutputDataRate().
|
protected |
Definition at line 718 of file SensorQMI8658.cpp.
Referenced by configGyro(), and setGyroOutputDataRate().
|
inline |
Get the accelerometer data.
| &x | accelerometer X-axis data |
| &y | accelerometer Y-axis data |
| &z | accelerometer Z-axis data |
| true | on success, false on failure |
Definition at line 799 of file SensorQMI8658.hpp.
References _accel_enabled, getAccelRaw(), x, and y.
Referenced by lockingMechanismHandler(), loop(), and readSensorData().
|
inline |
Get the accelerometer scales.
| The | current accelerometer scales |
Definition at line 819 of file SensorQMI8658.hpp.
|
protected |
Definition at line 455 of file SensorQMI8658.cpp.
References FS_16G, FS_2G, FS_4G, and FS_8G.
Referenced by configAccel(), configWakeOnMotionAdvanced(), and setAccelFullScaleRange().
|
inline |
Get the raw accelerometer data.
| *rawBuffer | Pointer to the buffer to store the raw data |
| true | on success, false on failure |
Definition at line 775 of file SensorQMI8658.hpp.
References _accel_enabled, DeviceBeginCommon::comm, and QMI8658_REG_AX_L.
Referenced by getAccelerometer().
| float SensorQMI8658::getAccelScale | ( | ) |
Get the accelerometer scale factor.
Definition at line 2068 of file SensorQMI8658.cpp.
References _accel_scale.
|
protected |
Definition at line 466 of file SensorQMI8658.cpp.
References FS_16G, FS_2G, FS_4G, and FS_8G.
Referenced by configAccel(), and setAccelFullScaleRange().
| SensorQMI8658::Layout SensorQMI8658::getAxisLayout | ( | ) | const |
Get the current axis layout setting.
Definition at line 2083 of file SensorQMI8658.cpp.
References _axis_layout.
Referenced by setup().
| SensorQMI8658::EventCallbacks & SensorQMI8658::getCallbacks | ( | ) |
| const SensorQMI8658::EventCallbacks & SensorQMI8658::getCallbacks | ( | ) | const |
Get current callbacks (const).
Definition at line 1936 of file SensorQMI8658.cpp.
References callbacks.
|
inline |
Get Sensor chip firmware version.
| Firmware | version number |
Definition at line 1542 of file SensorQMI8658.hpp.
|
inlinevirtual |
Get the chip ID.
| Chip | ID |
Implements ImuBase.
Definition at line 288 of file SensorQMI8658.hpp.
References DeviceBeginCommon::comm, and QMI8658_REG_REVISION.
|
overridevirtual |
Get the chip ID / WHO_AM_I value.
Implements ImuBase.
Definition at line 328 of file SensorQMI8658.cpp.
References SensorCommWrapper::readReg().
Referenced by initImpl(), isPresent(), and setup().
| void SensorQMI8658::getChipUsid | ( | uint8_t * | buffer, |
| uint8_t | length | ||
| ) |
Get sensor USID (unique chip ID).
| [out] | buffer | Buffer to store USID (must be at least 6 bytes). |
| length | Number of bytes to read. |
Definition at line 2060 of file SensorQMI8658.cpp.
References _usid.
|
inline |
Get Sensor chip USID.
| *buffer | Input buffer to store the USID , must be uint8_t[6] |
| length | Length of the buffer , must be less than or equal to 6 |
| None |
Definition at line 1528 of file SensorQMI8658.hpp.
|
inline |
Check if new data is available.
| true | if new data is available, false otherwise |
Definition at line 884 of file SensorQMI8658.hpp.
References _accel_enabled, _gyro_enabled, ASYNC_MODE, DeviceBeginCommon::comm, DeviceBeginCommon::hal, QMI8658_REG_STATUS0, QMI8658_REG_STATUS_INT, and SYNC_MODE.
Referenced by loop().
| void SensorQMI8658::getDynamicGyroCalibrationOffsets | ( | int16_t | gyro_offset[3] | ) |
Get dynamic gyroscope calibration offsets.
| [out] | gyro_offset | Gyro offsets [x, y, z] in raw units. |
Definition at line 2222 of file SensorQMI8658.cpp.
References _dyn_gyro_offset.
Referenced by loop().
| uint8_t SensorQMI8658::getFifoStatus | ( | ) |
Get FIFO status.
Definition at line 928 of file SensorQMI8658.cpp.
References SensorCommWrapper::readReg().
Referenced by readFromFifo().
|
overridevirtual |
Get the firmware version.
Implements ImuBase.
Definition at line 333 of file SensorQMI8658.cpp.
References _firmware_version.
Referenced by setup().
|
protected |
Definition at line 594 of file SensorQMI8658.cpp.
References FS_1000_DPS, FS_125_DPS, FS_2000_DPS, FS_250_DPS, and FS_500_DPS.
Referenced by configGyro(), and setGyroFullScaleRange().
|
inline |
Get the raw gyroscope data.
| *rawBuffer | Pointer to the buffer to store the raw data |
| true | on success, false on failure |
Definition at line 840 of file SensorQMI8658.hpp.
References _gyro_enabled, DeviceBeginCommon::comm, and QMI8658_REG_GX_L.
Referenced by getGyroscope().
| float SensorQMI8658::getGyroScale | ( | ) |
Get the gyroscope scale factor.
Definition at line 2073 of file SensorQMI8658.cpp.
References _gyro_scale.
|
protected |
Definition at line 606 of file SensorQMI8658.cpp.
References FS_1000_DPS, FS_125_DPS, FS_2000_DPS, FS_250_DPS, and FS_500_DPS.
Referenced by configGyro(), and setGyroFullScaleRange().
|
inline |
Get the raw gyroscope data.
| &x | Reference to the variable to store the X-axis data |
| &y | Reference to the variable to store the Y-axis data |
| &z | Reference to the variable to store the Z-axis data |
| true | on success, false on failure |
Definition at line 864 of file SensorQMI8658.hpp.
References _gyro_enabled, getGyroRaw(), x, and y.
Referenced by lockingMechanismHandler(), loop(), and readSensorData().
|
inline |
Get the gyroscope scales.
| The | current gyroscope scales |
Definition at line 829 of file SensorQMI8658.hpp.
| void SensorQMI8658::getHardwareSelfTestResults | ( | float | accel_result[3], |
| float | gyro_result[3] | ||
| ) |
Get hardware self-test results.
| [out] | accel_result | Accel self-test results [x, y, z] in mg. |
| [out] | gyro_result | Gyro self-test results [x, y, z] in dps. |
Definition at line 2429 of file SensorQMI8658.cpp.
References _hw_st_accel_result, and _hw_st_gyro_result.
Referenced by setup().
| uint8_t SensorQMI8658::getInterruptStatus | ( | ) |
Get interrupt status.
Definition at line 780 of file SensorQMI8658.cpp.
References SensorCommWrapper::readReg().
|
inline |
Get the IRQ status.
| IRQ | status register value |
Definition at line 363 of file SensorQMI8658.hpp.
References DeviceBeginCommon::comm, and QMI8658_REG_STATUS_INT.
Referenced by readSensorData().
|
inline |
Get the Pedometer counter.
| Pedometer | step count |
Definition at line 1105 of file SensorQMI8658.hpp.
References DeviceBeginCommon::comm, and QMI8658_REG_STEP_CNT_LOW.
Referenced by pedometerEvent().
| void SensorQMI8658::getStaticCalibrationOffsets | ( | int16_t | accel_offset[3], |
| int16_t | gyro_offset[3] | ||
| ) |
Get static calibration offsets.
| [out] | accel_offset | Accel offsets [x, y, z] in raw units. |
| [out] | gyro_offset | Gyro offsets [x, y, z] in raw units. |
Definition at line 2182 of file SensorQMI8658.cpp.
References _accel_cali_offset, and _gyro_cali_offset.
|
inline |
Get the Pedometer counter.
| Pedometer | step count |
Definition at line 1006 of file SensorQMI8658.hpp.
References DeviceBeginCommon::comm, and QMI8658_REG_STATUS1.
Referenced by loop().
| uint32_t SensorQMI8658::getStepCount | ( | ) |
Get pedometer step count.
Definition at line 1867 of file SensorQMI8658.cpp.
References SensorCommWrapper::readRegBuff().
Referenced by enablePedometer(), pedometerCallback(), and update().
| SensorQMI8658::TapEvent SensorQMI8658::getTapStatus | ( | ) |
Get tap status.
Definition at line 1745 of file SensorQMI8658.cpp.
References DOUBLE, INVALID, SensorCommWrapper::readReg(), and SINGLE.
Referenced by tapEventCallback(), and update().
|
inline |
Get the current tap status.
| The | current tap event |
Definition at line 1289 of file SensorQMI8658.hpp.
References sensorlib::_bv(), DeviceBeginCommon::comm, DOUBLE_TAP, INVALID_TAP, QMI8658_REG_TAP_STATUS, SENSORLIB_LOG_I, and SINGLE_TAP.
|
overridevirtual |
Get the temperature reading from the sensor.
Implements ImuBase.
Definition at line 352 of file SensorQMI8658.cpp.
References SensorCommWrapper::readRegBuff().
Referenced by readAccel(), and readGyro().
|
inline |
Get the temperature in degree Celsius.
| Temperature | value in degree Celsius |
Definition at line 328 of file SensorQMI8658.hpp.
References DeviceBeginCommon::comm, and QMI8658_REG_TEMPERATURE_L.
Referenced by lockingMechanismHandler(), and readSensorData().
|
inlinevirtual |
Get the timestamp.
| Timestamp | value |
Implements ImuBase.
Definition at line 308 of file SensorQMI8658.hpp.
References DeviceBeginCommon::comm, QMI8658_REG_TIMESTAMP_L, and timestamp.
|
overridevirtual |
Get the timestamp from the sensor.
Implements ImuBase.
Definition at line 361 of file SensorQMI8658.cpp.
References _last_timestamp, and SensorCommWrapper::readRegBuff().
Referenced by lockingMechanismHandler(), loop(), and readSensorData().
| bool SensorQMI8658::hardwareSelfTest | ( | bool | includeAccel = true, |
| bool | includeGyro = true |
||
| ) |
Perform hardware self-test on both sensors.
| includeAccel | True to include accelerometer self-test. |
| includeGyro | True to include gyroscope self-test. |
Definition at line 2314 of file SensorQMI8658.cpp.
References _accel_enabled, _gyro_enabled, _hw_st_accel_result, _hw_st_gyro_result, disableAccel(), disableGyro(), enableAccel(), enableGyro(), DeviceBeginCommon::hal, HW_ST_ACCEL_THRESHOLD_MG, HW_ST_GYRO_THRESHOLD_DPS, SensorCommWrapper::readReg(), SensorCommWrapper::readRegBuff(), SENSORLIB_LOG_E, and SensorCommWrapper::writeReg().
Referenced by setup().
|
overrideprotectedvirtual |
Implements DeviceBeginCommon.
Definition at line 2440 of file SensorQMI8658.cpp.
References _firmware_version, _int_pin, _usid, CTRL_CMD_COPY_USID, getChipID(), DeviceBeginCommon::hal, SensorCommWrapper::readRegBuff(), reset(), SENSORLIB_LOG_E, writeCommand(), and SensorCommWrapper::writeReg().
|
inlineoverrideprotectedvirtual |
Implements DeviceBeginCommon.
Definition at line 2246 of file SensorQMI8658.hpp.
References DeviceBeginCommon::comm, CTRL_CMD_COPY_USID, DeviceBeginCommon::hal, QMI8658_REG_CTRL8, QMI8658_REG_DQW_L, QMI8658_REG_DVX_L, QMI8658_REG_WHOAMI_DEFAULT, reset(), SENSORLIB_LOG_D, SENSORLIB_LOG_E, whoAmI(), and writeCommand().
|
overridevirtual |
Check if accelerometer is enabled.
Implements ImuBase.
Definition at line 428 of file SensorQMI8658.cpp.
References _accel_enabled.
|
overridevirtual |
Check if requested IMU data is available.
| mask | Data-ready target mask (ACCEL / GYRO / BOTH). |
Implements ImuBase.
Definition at line 785 of file SensorQMI8658.cpp.
References _accel_enabled, _gyro_enabled, _int_enabled, _int_pin, _sync_mode, SensorCommWrapper::getRegBit(), DeviceBeginCommon::hal, and SensorCommWrapper::readReg().
| bool SensorQMI8658::isDynamicGyroCalibrationEnabled | ( | ) | const |
Check if dynamic gyro calibration is enabled.
Definition at line 2217 of file SensorQMI8658.cpp.
References _dyn_cal_enabled.
Referenced by loop().
|
inline |
Check if the accelerometer is enabled.
| true | if enabled, false otherwise |
Definition at line 727 of file SensorQMI8658.hpp.
References _accel_enabled.
Referenced by configAccelerometer(), configFIFO(), configMotion(), configPedometer(), configTap(), and loop().
|
inline |
Check if the gyroscope is enabled.
| true | if enabled, false otherwise |
Definition at line 737 of file SensorQMI8658.hpp.
References _gyro_enabled.
Referenced by configFIFO(), configGyroscope(), configMotion(), configPedometer(), configTap(), and loop().
|
overridevirtual |
Check if gyroscope is enabled.
Implements ImuBase.
Definition at line 567 of file SensorQMI8658.cpp.
References _gyro_enabled.
|
overridevirtual |
Check if the IMU sensor is responding.
Implements ImuBase.
Definition at line 323 of file SensorQMI8658.cpp.
References getChipID().
| bool SensorQMI8658::isStaticCalibrationComplete | ( | ) | const |
Get the current static calibration status.
Definition at line 2141 of file SensorQMI8658.cpp.
References _static_cali_complete.
| bool SensorQMI8658::isStaticCalibrationEnabled | ( | ) | const |
Check if static calibration is enabled.
Definition at line 2136 of file SensorQMI8658.cpp.
References _static_cali_enabled.
|
protected |
Definition at line 1656 of file SensorQMI8658.cpp.
Referenced by applyMotionConfig(), configMotion(), and configMotionDetect().
|
protected |
Definition at line 700 of file SensorQMI8658.cpp.
|
inline |
Power down the sensor.
| None |
Definition at line 983 of file SensorQMI8658.hpp.
References DeviceBeginCommon::comm, disableAccelerometer(), disableGyroscope(), and QMI8658_REG_CTRL1.
|
inline |
Power on the sensor.
| None |
Definition at line 996 of file SensorQMI8658.hpp.
References DeviceBeginCommon::comm, and QMI8658_REG_CTRL1.
| void SensorQMI8658::processDynamicCalibration | ( | int16_t | accel_data[3], |
| int16_t | gyro_data[3] | ||
| ) |
Process dynamic calibration with current sensor data.
| accel_data | Raw accelerometer data [x, y, z]. |
| gyro_data | Raw gyroscope data [x, y, z]. |
Definition at line 2229 of file SensorQMI8658.cpp.
References _accel_speed_buffer, _accel_static_deviation, _dyn_cal_enabled, _dyn_cali_sample_count, _dyn_gyro_offset, _dyn_gyro_sum, _dyn_offset_applied, _dyn_static_delay, _dyn_static_flag, _gyro_speed_buffer, _gyro_static_deviation, DYN_CAL_BUFFER_SIZE, DYN_CAL_STATIC_COUNT, and i.
Referenced by readGyro().
| bool SensorQMI8658::processStaticCalibration | ( | int16_t | accel_data[3], |
| int16_t | gyro_data[3] | ||
| ) |
Process static calibration with current sensor data.
| accel_data | Raw accelerometer data [x, y, z]. |
| gyro_data | Raw gyroscope data [x, y, z]. |
Definition at line 2146 of file SensorQMI8658.cpp.
References _accel_cali_offset, _accel_cali_sum, _gyro_cali_offset, _gyro_cali_sum, _static_cali_complete, _static_cali_enabled, _static_cali_sample_count, i, and MAX_STATIC_CALI_SAMPLES.
Referenced by readGyro().
|
overridevirtual |
Read accelerometer data.
| [out] | out | Reference to store the read data. |
Implements ImuBase.
Definition at line 376 of file SensorQMI8658.cpp.
References _accel_scale, getTemperature(), AccelerometerUtils::gToMps2(), AccelerometerData::mps2, AccelerometerData::raw, readAccelRaw(), AccelerometerData::temperature, x, SensorVector::x, RawVector::x, y, SensorVector::y, RawVector::y, SensorVector::z, and RawVector::z.
|
overridevirtual |
Read raw accelerometer data without scaling.
| [out] | x | X-axis raw value. |
| [out] | y | Y-axis raw value. |
| [out] | z | Z-axis raw value. |
Implements ImuBase.
Definition at line 394 of file SensorQMI8658.cpp.
References _accel_enabled, SensorCommWrapper::readRegBuff(), x, and y.
Referenced by readAccel().
|
overridevirtual |
Read data from FIFO buffer.
| [out] | accel_data | Array to store accelerometer samples. |
| accel_count | Maximum number of accelerometer samples. | |
| [out] | gyro_data | Array to store gyroscope samples. |
| gyro_count | Maximum number of gyroscope samples. |
Implements ImuBase.
Definition at line 933 of file SensorQMI8658.cpp.
References _accel_enabled, _accel_scale, _dyn_cal_enabled, _dyn_gyro_offset, _dyn_offset_applied, _fifo_buffer, _fifo_buffer_size, _fifo_enabled, _fifo_mode, _gyro_cali_offset, _gyro_enabled, _gyro_scale, _static_cali_complete, buffer_size, CTRL_CMD_REQ_FIFO, GyroscopeData::dps, getFifoStatus(), AccelerometerUtils::gToMps2(), DeviceBeginCommon::hal, i, AccelerometerData::mps2, AccelerometerData::raw, GyroscopeData::raw, readFromFifo(), SensorCommWrapper::readRegBuff(), SENSORLIB_LOG_D, SENSORLIB_LOG_E, writeCommand(), SensorCommWrapper::writeReg(), x, SensorVector::x, RawVector::x, y, SensorVector::y, RawVector::y, SensorVector::z, and RawVector::z.
Referenced by loop(), readFromFifo(), and readFromFifo().
|
inline |
readFromFifo
| acc | Pointer to store accelerometer data |
| accLength | Length of the accelerometer data array |
| gyro | Pointer to store gyroscope data |
| gyrLength | Length of the gyroscope data array |
| Number | of samples read per sensor |
Definition at line 621 of file SensorQMI8658.hpp.
References _accel_enabled, _fifo_mode, _gyro_enabled, acc, FIFO_MODE_BYPASS, gyro, i, readFromFifo(), SENSORLIB_LOG_D, SENSORLIB_LOG_E, x, IMUdata::x, y, IMUdata::y, and IMUdata::z.
|
overridevirtual |
Read gyroscope data.
| [out] | out | Reference to store the read data. |
Implements ImuBase.
Definition at line 477 of file SensorQMI8658.cpp.
References _dyn_cal_enabled, _dyn_gyro_offset, _dyn_offset_applied, _gyro_cali_offset, _gyro_scale, _static_cali_complete, _static_cali_enabled, axisConvert(), GyroscopeData::dps, getTemperature(), processDynamicCalibration(), processStaticCalibration(), GyroscopeData::raw, readGyroRaw(), SensorCommWrapper::readRegBuff(), GyroscopeData::temperature, x, SensorVector::x, RawVector::x, y, SensorVector::y, RawVector::y, SensorVector::z, and RawVector::z.
|
overridevirtual |
Read raw gyroscope data without scaling.
| [out] | x | X-axis raw value. |
| [out] | y | Y-axis raw value. |
| [out] | z | Z-axis raw value. |
Implements ImuBase.
Definition at line 533 of file SensorQMI8658.cpp.
References _gyro_enabled, SensorCommWrapper::readRegBuff(), x, and y.
Referenced by readGyro().
|
overridevirtual |
Reset the IMU sensor to its default state.
Implements ImuBase.
Definition at line 298 of file SensorQMI8658.cpp.
References DeviceBeginCommon::hal, SensorCommWrapper::readReg(), SENSORLIB_LOG_E, SensorCommWrapper::setRegBit(), and SensorCommWrapper::writeReg().
Referenced by configWakeOnMotion(), configWakeOnMotionAdvanced(), initImpl(), and setup().
|
inline |
Reset the sensor.
| waitResult | True to wait for the reset result, false to return immediately |
| timeout | Timeout duration in milliseconds |
| true | on success, false on failure |
Definition at line 256 of file SensorQMI8658.hpp.
References DeviceBeginCommon::comm, DeviceBeginCommon::hal, QMI8658_REG_CTRL1, QMI8658_REG_RESET, QMI8658_REG_RESET_DEFAULT, QMI8658_REG_RST_RESULT, QMI8658_REG_RST_RESULT_VAL, and SENSORLIB_LOG_E.
| bool SensorQMI8658::resetFifo | ( | ) |
Reset the FIFO.
Definition at line 923 of file SensorQMI8658.cpp.
References CTRL_CMD_RST_FIFO, and writeCommand().
Referenced by configFifo(), and configureFifo().
| void SensorQMI8658::resetStaticCalibration | ( | ) |
Reset static calibration.
Definition at line 2192 of file SensorQMI8658.cpp.
References _accel_cali_offset, _accel_cali_sum, _gyro_cali_offset, _gyro_cali_sum, _static_cali_complete, and _static_cali_sample_count.
Referenced by enableStaticCalibration().
| bool SensorQMI8658::resetStepCount | ( | ) |
Reset pedometer counter.
Definition at line 1876 of file SensorQMI8658.cpp.
References CTRL_CMD_RESET_PEDOMETER, and writeCommand().
Referenced by setup().
|
overridevirtual |
Perform self-test on the IMU sensor.
Implements ImuBase.
Definition at line 318 of file SensorQMI8658.cpp.
References selfTestAccel(), and selfTestGyro().
Referenced by setup().
| bool SensorQMI8658::selfTestAccel | ( | ) |
Perform accelerometer self-test.
Definition at line 1208 of file SensorQMI8658.cpp.
References SensorCommWrapper::clrRegBit(), disableAccel(), disableGyro(), DeviceBeginCommon::hal, SensorCommWrapper::readReg(), SensorCommWrapper::readRegBuff(), SENSORLIB_LOG_E, SensorCommWrapper::updateBits(), and SensorCommWrapper::writeReg().
Referenced by selfTest(), and setup().
|
inline |
Perform self-test on the accelerometer.
| True | if self-test passed, false otherwise |
Definition at line 1830 of file SensorQMI8658.hpp.
References ACC_ODR_1000Hz, DeviceBeginCommon::comm, DeviceBeginCommon::hal, QMI8658_REG_CTRL2, QMI8658_REG_CTRL7, QMI8658_REG_DVX_L, QMI8658_REG_STATUS_INT, SENSORLIB_LOG_D, SENSORLIB_LOG_E, and SENSORLIB_LOG_I.
| bool SensorQMI8658::selfTestGyro | ( | ) |
Perform gyroscope self-test.
Definition at line 1260 of file SensorQMI8658.cpp.
References SensorCommWrapper::clrRegBit(), disableAccel(), disableGyro(), DeviceBeginCommon::hal, SensorCommWrapper::readReg(), SensorCommWrapper::readRegBuff(), SENSORLIB_LOG_E, SensorCommWrapper::setRegBit(), and SensorCommWrapper::writeReg().
Referenced by selfTest(), and setup().
|
inline |
Perform self-test on the gyroscope.
| True | if self-test passed, false otherwise |
Definition at line 1916 of file SensorQMI8658.hpp.
References DeviceBeginCommon::comm, DeviceBeginCommon::hal, QMI8658_REG_CTRL3, QMI8658_REG_CTRL7, QMI8658_REG_DVX_L, QMI8658_REG_STATUS_INT, SENSORLIB_LOG_D, SENSORLIB_LOG_E, and SENSORLIB_LOG_I.
| void SensorQMI8658::setAccelDataReadyCallback | ( | DataReadyCallback | callback | ) |
Set callback for accelerometer data ready.
| callback | Callback function. |
Definition at line 1911 of file SensorQMI8658.cpp.
References callbacks, and SensorQMI8658::EventCallbacks::onAccelDataReady.
|
inline |
Definition at line 1699 of file SensorQMI8658.hpp.
|
overridevirtual |
Set accelerometer full scale range.
| range | Full scale range setting. |
Implements ImuBase.
Definition at line 433 of file SensorQMI8658.cpp.
References _accel_range, _accel_scale, getAccelRangeRegValue(), getAccelScaleFromRange(), and SensorCommWrapper::updateBits().
|
inline |
Write accelerometer calibration offsets.
| offset_x | Offset value for the X axis |
| offset_y | Offset value for the Y axis |
| offset_z | Offset value for the Z axis |
| None |
Definition at line 2001 of file SensorQMI8658.hpp.
References sensorlib::_highByte(), sensorlib::_lowByte(), DeviceBeginCommon::comm, CTRL_CMD_ACCEL_HOST_DELTA_OFFSET, QMI8658_REG_CAL1_L, QMI8658_REG_CAL2_L, QMI8658_REG_CAL3_L, and writeCommand().
| void SensorQMI8658::setAccelOffset | ( | int16_t | x, |
| int16_t | y, | ||
| int16_t | z | ||
| ) |
Set accelerometer host delta offsets.
| x | X-axis offset. |
| y | Y-axis offset. |
| z | Z-axis offset. |
Definition at line 1178 of file SensorQMI8658.cpp.
References CTRL_CMD_ACCEL_HOST_DELTA_OFFSET, writeCommand(), SensorCommWrapper::writeRegBuff(), x, and y.
|
overridevirtual |
Set accelerometer output data rate.
| data_rate_hz | Output data rate in Hz. |
Implements ImuBase.
Definition at line 445 of file SensorQMI8658.cpp.
References _accel_odr, findClosestAccelOdr(), and SensorCommWrapper::updateBits().
| void SensorQMI8658::setAnyMotionCallback | ( | MotionCallback | callback | ) |
Set callback for any-motion event.
| callback | Callback function. |
Definition at line 1881 of file SensorQMI8658.cpp.
References callbacks, and SensorQMI8658::EventCallbacks::onAnyMotion.
Referenced by setup().
|
inline |
Definition at line 1684 of file SensorQMI8658.hpp.
| void SensorQMI8658::setAxisLayout | ( | Layout | layout | ) |
Set the sensor axis layout for coordinate transformation.
| layout | The axis layout to apply. |
Definition at line 2078 of file SensorQMI8658.cpp.
References _axis_layout.
Referenced by setup().
| void SensorQMI8658::setCallbacks | ( | const EventCallbacks & | cbs | ) |
Set all event callbacks at once.
Definition at line 1926 of file SensorQMI8658.cpp.
References callbacks.
| void SensorQMI8658::setDataLockingCallback | ( | DataReadyCallback | callback | ) |
Set callback for data locking.
| callback | Callback function. |
Definition at line 1921 of file SensorQMI8658.cpp.
References callbacks, and SensorQMI8658::EventCallbacks::onDataLocking.
Referenced by setup().
|
inline |
Definition at line 1704 of file SensorQMI8658.hpp.
Referenced by setup().
| void SensorQMI8658::setGyroDataReadyCallback | ( | DataReadyCallback | callback | ) |
Set callback for gyroscope data ready.
| callback | Callback function. |
Definition at line 1916 of file SensorQMI8658.cpp.
References callbacks, and SensorQMI8658::EventCallbacks::onGyroDataReady.
|
inline |
Definition at line 1694 of file SensorQMI8658.hpp.
|
overridevirtual |
Set gyroscope full scale range.
| range | Full scale range setting. |
Implements ImuBase.
Definition at line 572 of file SensorQMI8658.cpp.
References _gyro_range, _gyro_scale, getGyroRangeRegValue(), getGyroScaleFromRange(), and SensorCommWrapper::updateBits().
|
inline |
Write gyroscope calibration offsets.
| offset_x | Offset value for the X axis |
| offset_y | Offset value for the Y axis |
| offset_z | Offset value for the Z axis |
| None |
Definition at line 2025 of file SensorQMI8658.hpp.
References sensorlib::_highByte(), sensorlib::_lowByte(), DeviceBeginCommon::comm, CTRL_CMD_GYRO_HOST_DELTA_OFFSET, QMI8658_REG_CAL1_L, QMI8658_REG_CAL2_L, QMI8658_REG_CAL3_L, and writeCommand().
| void SensorQMI8658::setGyroOffset | ( | int16_t | x, |
| int16_t | y, | ||
| int16_t | z | ||
| ) |
Set gyroscope host delta offsets.
| x | X-axis offset. |
| y | Y-axis offset. |
| z | Z-axis offset. |
Definition at line 1193 of file SensorQMI8658.cpp.
References CTRL_CMD_GYRO_HOST_DELTA_OFFSET, writeCommand(), SensorCommWrapper::writeRegBuff(), x, and y.
|
overridevirtual |
Set gyroscope output data rate.
| data_rate_hz | Output data rate in Hz. |
Implements ImuBase.
Definition at line 584 of file SensorQMI8658.cpp.
References _gyro_odr, findClosestGyroOdr(), and SensorCommWrapper::updateBits().
| void SensorQMI8658::setIntPin | ( | int | pin | ) |
Backward-compatible alias of setPins.
| pin | GPIO pin number. |
Definition at line 823 of file SensorQMI8658.cpp.
References setPins().
| void SensorQMI8658::setNoMotionCallback | ( | MotionCallback | callback | ) |
Set callback for no-motion event.
| callback | Callback function. |
Definition at line 1886 of file SensorQMI8658.cpp.
References callbacks, and SensorQMI8658::EventCallbacks::onNoMotion.
Referenced by setup().
|
inline |
Definition at line 1679 of file SensorQMI8658.hpp.
|
overridevirtual |
Set IMU operation mode.
| mode | Target operation mode. |
Implements ImuBase.
Definition at line 338 of file SensorQMI8658.cpp.
References SensorCommWrapper::clrRegBit(), disableAccel(), disableGyro(), NORMAL, SensorCommWrapper::setRegBit(), and SUSPEND.
| void SensorQMI8658::setPedometerCallback | ( | MotionCallback | callback | ) |
Set callback for pedometer event.
| callback | Callback function. |
Definition at line 1906 of file SensorQMI8658.cpp.
References callbacks, and SensorQMI8658::EventCallbacks::onPedometer.
Referenced by setup().
|
inline |
Definition at line 1674 of file SensorQMI8658.hpp.
Referenced by setup().
|
inline |
Set sensor interrupt pins.
| _irq | Interrupt pin number |
| None |
Definition at line 244 of file SensorQMI8658.hpp.
| void SensorQMI8658::setPins | ( | int | pin | ) |
Set interrupt pin.
| pin | GPIO pin number. |
Definition at line 815 of file SensorQMI8658.cpp.
References _int_pin, and DeviceBeginCommon::hal.
Referenced by setIntPin(), and setup().
| void SensorQMI8658::setSignificantMotionCallback | ( | MotionCallback | callback | ) |
Set callback for significant motion event.
| callback | Callback function. |
Definition at line 1891 of file SensorQMI8658.cpp.
References callbacks, and SensorQMI8658::EventCallbacks::onSignificantMotion.
|
inline |
Definition at line 1689 of file SensorQMI8658.hpp.
| void SensorQMI8658::setTapCallback | ( | TapCallback | callback | ) |
Set callback for tap event.
| callback | Callback function. |
Definition at line 1901 of file SensorQMI8658.cpp.
References callbacks, and SensorQMI8658::EventCallbacks::onTap.
Referenced by setup().
|
inline |
Definition at line 1669 of file SensorQMI8658.hpp.
Referenced by setup().
| void SensorQMI8658::setWakeOnMotionCallback | ( | MotionCallback | callback | ) |
Set callback for wake-on-motion event.
| callback | Callback function. |
Definition at line 1896 of file SensorQMI8658.cpp.
References callbacks, and SensorQMI8658::EventCallbacks::onWakeOnMotion.
Referenced by setup().
|
inline |
Definition at line 1664 of file SensorQMI8658.hpp.
Referenced by setup().
| uint16_t SensorQMI8658::update | ( | ) |
Update sensor status and process events.
Definition at line 1941 of file SensorQMI8658.cpp.
References _last_step_count, _last_tap_event, _last_tap_event_ms, _sync_mode, _tap_event_active, callbacks, getStepCount(), getTapStatus(), DeviceBeginCommon::hal, INVALID, SensorQMI8658::EventCallbacks::onAccelDataReady, SensorQMI8658::EventCallbacks::onAnyMotion, SensorQMI8658::EventCallbacks::onDataLocking, SensorQMI8658::EventCallbacks::onGyroDataReady, SensorQMI8658::EventCallbacks::onNoMotion, SensorQMI8658::EventCallbacks::onPedometer, SensorQMI8658::EventCallbacks::onSignificantMotion, SensorQMI8658::EventCallbacks::onTap, SensorQMI8658::EventCallbacks::onWakeOnMotion, SensorCommWrapper::readRegBuff(), STATUS_ANY_MOTION_EVENT, STATUS_NO_MOTION_EVENT, STATUS_PEDOMETER_EVENT, STATUS_SIGNIFICANT_MOTION, STATUS_TAP_EVENT, and STATUS_WOM_EVENT.
Referenced by loop().
|
inline |
Update sensor status.
| Updated | sensor status |
Definition at line 1552 of file SensorQMI8658.hpp.
References ASYNC_MODE, DeviceBeginCommon::comm, QMI8658_REG_STATUS_INT, STATUS0_ACCEL_DATA_READY, STATUS0_GYRO_DATA_READY, STATUS1_ANY_MOTION, STATUS1_NO_MOTION, STATUS1_PEDOMETER_MOTION, STATUS1_SIGNIFICANT_MOTION, STATUS1_TAP_MOTION, STATUS1_WOM_MOTION, STATUS_INT_AVAIL, STATUS_INT_CTRL9_CMD_DONE, and STATUS_INT_LOCKED.
|
inline |
Get the WHO_AM_I register value.
| WHO_AM_I | register value |
Definition at line 298 of file SensorQMI8658.hpp.
References DeviceBeginCommon::comm, and QMI8658_REG_WHOAMI.
Referenced by initImpl().
|
inline |
Write Gyroscope calibration gains.
| gX_gain | Gain value for the X axis |
| gY_gain | Gain value for the Y axis |
| gZ_gain | Gain value for the Z axis |
| True | if successful, false otherwise |
Definition at line 1796 of file SensorQMI8658.hpp.
References sensorlib::_highByte(), sensorlib::_lowByte(), DeviceBeginCommon::comm, CTRL_CMD_APPLY_GYRO_GAINS, QMI8658_REG_CAL1_L, QMI8658_REG_CTRL7, and writeCommand().
| bool SensorQMI8658::writeCalibration | ( | uint16_t | gyro_x_gain, |
| uint16_t | gyro_y_gain, | ||
| uint16_t | gyro_z_gain | ||
| ) |
Write previously saved gyro calibration gains.
| gyro_x_gain | X-axis gyro gain. |
| gyro_y_gain | Y-axis gyro gain. |
| gyro_z_gain | Z-axis gyro gain. |
Definition at line 1155 of file SensorQMI8658.cpp.
References _accel_enabled, _gyro_enabled, CTRL_CMD_APPLY_GYRO_GAINS, disableAccel(), disableGyro(), writeCommand(), and SensorCommWrapper::writeRegBuff().
Referenced by setup().
|
protected |
Definition at line 265 of file SensorQMI8658.cpp.
References cmd, CTRL_CMD_ACK, DeviceBeginCommon::hal, SensorCommWrapper::readReg(), and SensorCommWrapper::writeReg().
Referenced by applyMotionConfig(), calibrate(), calibration(), clearPedometerCounter(), configFIFO(), configFifo(), configMotion(), configPedometer(), configPedometer(), configTap(), configTap(), configureFifo(), configWakeOnMotion(), configWakeOnMotionAdvanced(), disableLockingMechanism(), enableLockingMechanism(), initImpl(), readFromFifo(), resetFifo(), resetStepCount(), setAccelOffset(), setAccelOffset(), setGyroOffset(), setGyroOffset(), writeCalibration(), and writeCalibration().
|
protected |
Definition at line 1025 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by getStaticCalibrationOffsets(), processStaticCalibration(), resetStaticCalibration(), and SensorQMI8658().
|
protected |
Definition at line 1023 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by processStaticCalibration(), resetStaticCalibration(), and SensorQMI8658().
|
protected |
Definition at line 992 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by applyMotionConfig(), calibrate(), configAccel(), configFifo(), configPedometer(), configTap(), configureFifo(), disableAccel(), disableAccelerometer(), disablePedometer(), enableAccel(), enableAccelerometer(), enableMotionDetect(), enableMotionDetect(), enablePedometer(), enablePedometer(), enableTap(), enableTap(), getAccelerometer(), getAccelRaw(), getDataReady(), hardwareSelfTest(), isAccelEnabled(), isDataReady(), isEnableAccelerometer(), readAccelRaw(), readFromFifo(), readFromFifo(), and writeCalibration().
|
protected |
Definition at line 979 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by configAccel(), and setAccelOutputDataRate().
|
protected |
Definition at line 975 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by configAccel(), and setAccelFullScaleRange().
|
protected |
Definition at line 977 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by configAccel(), getAccelScale(), readAccel(), readFromFifo(), and setAccelFullScaleRange().
|
protected |
Definition at line 1032 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by processDynamicCalibration(), and SensorQMI8658().
|
protected |
Definition at line 1039 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by enableDynamicGyroCalibration(), and processDynamicCalibration().
|
protected |
Definition at line 1017 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by axisConvert(), getAxisLayout(), and setAxisLayout().
|
protected |
Definition at line 1030 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by enableDynamicGyroCalibration(), isDynamicGyroCalibrationEnabled(), processDynamicCalibration(), readFromFifo(), and readGyro().
|
protected |
Definition at line 1036 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by enableDynamicGyroCalibration(), and processDynamicCalibration().
|
protected |
Definition at line 1033 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by enableDynamicGyroCalibration(), getDynamicGyroCalibrationOffsets(), processDynamicCalibration(), readFromFifo(), readGyro(), and SensorQMI8658().
|
protected |
Definition at line 1037 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by processDynamicCalibration(), and SensorQMI8658().
|
protected |
Definition at line 1040 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by enableDynamicGyroCalibration(), processDynamicCalibration(), readFromFifo(), and readGyro().
|
protected |
Definition at line 1034 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by enableDynamicGyroCalibration(), and processDynamicCalibration().
|
protected |
Definition at line 1035 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by enableDynamicGyroCalibration(), and processDynamicCalibration().
|
protected |
Definition at line 1014 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by readFromFifo(), and ~SensorQMI8658().
|
protected |
Definition at line 1015 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by readFromFifo(), and ~SensorQMI8658().
|
protected |
Definition at line 995 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by configFifo(), configureFifo(), and readFromFifo().
|
protected |
Definition at line 996 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by configFIFO(), configFifo(), configureFifo(), readFromFifo(), and readFromFifo().
|
protected |
Definition at line 997 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by configFifo(), and configureFifo().
|
protected |
Definition at line 1009 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by getFirmwareVersion(), and initImpl().
|
protected |
Definition at line 1026 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by getStaticCalibrationOffsets(), processStaticCalibration(), readFromFifo(), readGyro(), resetStaticCalibration(), and SensorQMI8658().
|
protected |
Definition at line 1024 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by processStaticCalibration(), resetStaticCalibration(), and SensorQMI8658().
|
protected |
Definition at line 993 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by applyMotionConfig(), calibrate(), configFifo(), configGyro(), configPedometer(), configTap(), configureFifo(), disableGyro(), disableGyroscope(), enableGyro(), enableGyroscope(), enablePedometer(), getDataReady(), getGyroRaw(), getGyroscope(), hardwareSelfTest(), isDataReady(), isEnableGyroscope(), isGyroEnabled(), readFromFifo(), readFromFifo(), readGyroRaw(), and writeCalibration().
|
protected |
Definition at line 980 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by configGyro(), and setGyroOutputDataRate().
|
protected |
Definition at line 976 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by configGyro(), and setGyroFullScaleRange().
|
protected |
Definition at line 978 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by configGyro(), getGyroScale(), readFromFifo(), readGyro(), and setGyroFullScaleRange().
|
protected |
Definition at line 1031 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by processDynamicCalibration(), and SensorQMI8658().
|
protected |
Definition at line 1038 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by enableDynamicGyroCalibration(), and processDynamicCalibration().
|
protected |
Definition at line 1044 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by getHardwareSelfTestResults(), hardwareSelfTest(), and SensorQMI8658().
|
protected |
Definition at line 1045 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by getHardwareSelfTestResults(), hardwareSelfTest(), and SensorQMI8658().
|
protected |
Definition at line 1001 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by disableInterrupt(), enableInterrupt(), and isDataReady().
|
protected |
Definition at line 999 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by initImpl(), isDataReady(), and setPins().
|
protected |
Definition at line 1000 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by disableInterrupt(), and enableInterrupt().
|
protected |
Definition at line 1002 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by enablePedometer(), and update().
|
protected |
Definition at line 1004 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by update().
|
protected |
Definition at line 1005 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by update().
|
protected |
Definition at line 1007 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by getTimestamp().
|
protected |
Definition at line 982 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by applyMotionConfig(), configMotionDetect(), and enableMotionDetect().
|
protected |
Definition at line 985 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by applyMotionConfig(), and configMotionDetect().
|
protected |
Definition at line 987 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by applyMotionConfig(), and configMotionDetect().
|
protected |
Definition at line 983 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by applyMotionConfig(), configMotionDetect(), and enableMotionDetect().
|
protected |
Definition at line 986 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by applyMotionConfig(), and configMotionDetect().
|
protected |
Definition at line 988 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by applyMotionConfig(), and configMotionDetect().
|
protected |
Definition at line 984 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by applyMotionConfig(), configMotionDetect(), and enableMotionDetect().
|
protected |
Definition at line 990 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by applyMotionConfig(), and configMotionDetect().
|
protected |
Definition at line 989 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by applyMotionConfig().
|
protected |
Definition at line 1022 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by isStaticCalibrationComplete(), processStaticCalibration(), readFromFifo(), readGyro(), and resetStaticCalibration().
|
protected |
Definition at line 1021 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by enableStaticCalibration(), isStaticCalibrationEnabled(), processStaticCalibration(), and readGyro().
|
protected |
Definition at line 1020 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by processStaticCalibration(), and resetStaticCalibration().
|
protected |
Definition at line 994 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by disableSyncMode(), enableSyncMode(), isDataReady(), and update().
|
protected |
Definition at line 1003 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by update().
|
protected |
Definition at line 1010 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by getChipUsid(), initImpl(), and SensorQMI8658().
|
protected |
Definition at line 1012 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by getCallbacks(), getCallbacks(), setAccelDataReadyCallback(), setAnyMotionCallback(), setCallbacks(), setDataLockingCallback(), setGyroDataReadyCallback(), setNoMotionCallback(), setPedometerCallback(), setSignificantMotionCallback(), setTapCallback(), setWakeOnMotionCallback(), and update().
|
staticconstexprprotected |
Definition at line 1028 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by processDynamicCalibration().
|
staticconstexprprotected |
Definition at line 1029 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by processDynamicCalibration().
|
staticconstexprprotected |
Definition at line 1042 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by hardwareSelfTest().
|
staticconstexprprotected |
Definition at line 1043 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by hardwareSelfTest().
|
staticconstexprprotected |
Definition at line 1019 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by processStaticCalibration().
|
staticconstexprprotected |
Definition at line 2396 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2398 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2393 of file SensorQMI8658.hpp.
Referenced by configAccelerometer().
|
staticconstexprprotected |
Definition at line 2401 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2397 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2394 of file SensorQMI8658.hpp.
Referenced by configGyroscope().
|
staticconstexprprotected |
Definition at line 2347 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2346 of file SensorQMI8658.hpp.
Referenced by getAccelRaw().
|
staticconstexprprotected |
Definition at line 2349 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2348 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2351 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2350 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2318 of file SensorQMI8658.hpp.
Referenced by configMotion(), configPedometer(), configTap(), and configWakeOnMotion().
|
staticconstexprprotected |
Definition at line 2317 of file SensorQMI8658.hpp.
Referenced by configMotion(), configPedometer(), configTap(), configWakeOnMotion(), disableLockingMechanism(), enableLockingMechanism(), setAccelOffset(), setGyroOffset(), and writeCalibration().
|
staticconstexprprotected |
Definition at line 2320 of file SensorQMI8658.hpp.
Referenced by configMotion(), configPedometer(), and configTap().
|
staticconstexprprotected |
Definition at line 2319 of file SensorQMI8658.hpp.
Referenced by configMotion(), configPedometer(), configTap(), setAccelOffset(), and setGyroOffset().
|
staticconstexprprotected |
Definition at line 2322 of file SensorQMI8658.hpp.
Referenced by configMotion(), configPedometer(), and configTap().
|
staticconstexprprotected |
Definition at line 2321 of file SensorQMI8658.hpp.
Referenced by configMotion(), configPedometer(), configTap(), setAccelOffset(), and setGyroOffset().
|
staticconstexprprotected |
Definition at line 2324 of file SensorQMI8658.hpp.
Referenced by configMotion(), configPedometer(), and configTap().
|
staticconstexprprotected |
Definition at line 2323 of file SensorQMI8658.hpp.
Referenced by configMotion(), and configPedometer().
|
staticconstexprprotected |
Definition at line 2362 of file SensorQMI8658.hpp.
Referenced by calibration().
|
staticconstexprprotected |
Definition at line 2306 of file SensorQMI8658.hpp.
Referenced by configFIFO(), dumpCtrlRegister(), enableINT(), powerDown(), powerOn(), and reset().
|
staticconstexprprotected |
Definition at line 2307 of file SensorQMI8658.hpp.
Referenced by configAccelerometer(), configWakeOnMotion(), and selfTestAccel().
|
staticconstexprprotected |
Definition at line 2308 of file SensorQMI8658.hpp.
Referenced by configGyroscope(), and selfTestGyro().
|
staticconstexprprotected |
Definition at line 2310 of file SensorQMI8658.hpp.
Referenced by configAccelerometer(), and configGyroscope().
|
staticconstexprprotected |
Definition at line 2312 of file SensorQMI8658.hpp.
Referenced by calibration(), configWakeOnMotion(), disableAccelerometer(), disableGyroscope(), disableSyncSampleMode(), enableAccelerometer(), enableDataReadyINT(), enableGyroscope(), enableSyncSampleMode(), selfTestAccel(), selfTestGyro(), and writeCalibration().
|
staticconstexprprotected |
Definition at line 2313 of file SensorQMI8658.hpp.
Referenced by configActivityInterruptMap(), disableMotionDetect(), disablePedometer(), disableTap(), enableMotionDetect(), enablePedometer(), enableTap(), and initImpl().
|
staticconstexprprotected |
Definition at line 2314 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2364 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2363 of file SensorQMI8658.hpp.
Referenced by initImpl().
|
staticconstexprprotected |
Definition at line 2366 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2365 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2369 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2368 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2371 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2370 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2374 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2373 of file SensorQMI8658.hpp.
Referenced by calibration(), initImpl(), selfTestAccel(), and selfTestGyro().
|
staticconstexprprotected |
Definition at line 2376 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2375 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2378 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2377 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2329 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2328 of file SensorQMI8658.hpp.
Referenced by configFIFO(), and dumpCtrlRegister().
|
staticconstexprprotected |
Definition at line 2331 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2330 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2327 of file SensorQMI8658.hpp.
Referenced by configFIFO().
|
staticconstexprprotected |
Definition at line 2353 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2352 of file SensorQMI8658.hpp.
Referenced by getGyroRaw().
|
staticconstexprprotected |
Definition at line 2355 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2354 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2357 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2356 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2385 of file SensorQMI8658.hpp.
Referenced by reset().
|
staticconstexprprotected |
Definition at line 2297 of file SensorQMI8658.hpp.
Referenced by reset().
|
staticconstexprprotected |
Definition at line 2302 of file SensorQMI8658.hpp.
Referenced by getChipID().
|
staticconstexprprotected |
Definition at line 2388 of file SensorQMI8658.hpp.
Referenced by reset().
|
staticconstexprprotected |
Definition at line 2389 of file SensorQMI8658.hpp.
Referenced by reset().
|
staticconstexprprotected |
Definition at line 2335 of file SensorQMI8658.hpp.
Referenced by getDataReady().
|
staticconstexprprotected |
Definition at line 2336 of file SensorQMI8658.hpp.
Referenced by getStatusRegister().
|
staticconstexprprotected |
Definition at line 2296 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2334 of file SensorQMI8658.hpp.
Referenced by getDataReady(), getIrqStatus(), selfTestAccel(), selfTestGyro(), and update().
|
staticconstexprprotected |
Definition at line 2384 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2382 of file SensorQMI8658.hpp.
Referenced by getPedometerCounter().
|
staticconstexprprotected |
Definition at line 2383 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2381 of file SensorQMI8658.hpp.
Referenced by getTapStatus().
|
staticconstexprprotected |
Definition at line 2345 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2344 of file SensorQMI8658.hpp.
Referenced by getTemperature_C().
|
staticconstexprprotected |
Definition at line 2341 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2339 of file SensorQMI8658.hpp.
Referenced by getTimestamp().
|
staticconstexprprotected |
Definition at line 2340 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2301 of file SensorQMI8658.hpp.
Referenced by whoAmI().
|
staticconstexprprotected |
Definition at line 2295 of file SensorQMI8658.hpp.
Referenced by initImpl().
|
staticconstexprprotected |
Definition at line 2391 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 2392 of file SensorQMI8658.hpp.
|
staticconstexprprotected |
Definition at line 971 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by update().
|
staticconstexprprotected |
Definition at line 972 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by update().
|
staticconstexprprotected |
Definition at line 970 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by update().
|
staticconstexprprotected |
Definition at line 973 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by update().
|
staticconstexprprotected |
Definition at line 968 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by update().
|
staticconstexprprotected |
Definition at line 969 of file sensor/imu/qmi8658/SensorQMI8658.hpp.
Referenced by update().