PX4 Firmware
PX4 Autopilot Software http://px4.io
bmi160.hpp File Reference
#include <drivers/device/spi.h>
#include <ecl/geo/geo.h>
#include <lib/conversion/rotation.h>
#include <lib/drivers/accelerometer/PX4Accelerometer.hpp>
#include <lib/drivers/gyroscope/PX4Gyroscope.hpp>
#include <perf/perf_counter.h>
#include <px4_platform_common/getopt.h>
#include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp>
#include <systemlib/conversions.h>
Include dependency graph for bmi160.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  BMI160
 
struct  BMI160::BMIReport
 Report conversation within the BMI160, including command byte and interrupt status. More...
 

Macros

#define DIR_READ   0x80
 
#define DIR_WRITE   0x00
 
#define BMIREG_CHIP_ID   0x00
 
#define BMIREG_ERR_REG   0x02
 
#define BMIREG_PMU_STATUS   0x03
 
#define BMIREG_DATA_0   0x04
 
#define BMIREG_DATA_1   0x05
 
#define BMIREG_DATA_2   0x06
 
#define BMIREG_DATA_3   0x07
 
#define BMIREG_DATA_4   0x08
 
#define BMIREG_DATA_5   0x09
 
#define BMIREG_DATA_6   0x0A
 
#define BMIREG_DATA_7   0x0B
 
#define BMIREG_GYR_X_L   0x0C
 
#define BMIREG_GYR_X_H   0x0D
 
#define BMIREG_GYR_Y_L   0x0E
 
#define BMIREG_GYR_Y_H   0x0F
 
#define BMIREG_GYR_Z_L   0x10
 
#define BMIREG_GYR_Z_H   0x11
 
#define BMIREG_ACC_X_L   0x12
 
#define BMIREG_ACC_X_H   0x13
 
#define BMIREG_ACC_Y_L   0x14
 
#define BMIREG_ACC_Y_H   0x15
 
#define BMIREG_ACC_Z_L   0x16
 
#define BMIREG_ACC_Z_H   0x17
 
#define BMIREG_SENSORTIME0   0x18
 
#define BMIREG_SENSORTIME1   0x19
 
#define BMIREG_SENSORTIME2   0x1A
 
#define BMIREG_STATUS   0x1B
 
#define BMIREG_INT_STATUS_0   0x1C
 
#define BMIREG_INT_STATUS_1   0x1D
 
#define BMIREG_INT_STATUS_2   0x1E
 
#define BMIREG_INT_STATUS_3   0x1F
 
#define BMIREG_TEMP_0   0x20
 
#define BMIREG_TEMP_1   0x21
 
#define BMIREG_FIFO_LEN_0   0x22
 
#define BMIREG_FIFO_LEN_1   0x23
 
#define BMIREG_FIFO_DATA   0x24
 
#define BMIREG_ACC_CONF   0x40
 
#define BMIREG_ACC_RANGE   0x41
 
#define BMIREG_GYR_CONF   0x42
 
#define BMIREG_GYR_RANGE   0x43
 
#define BMIREG_MAG_CONF   0x44
 
#define BMIREG_FIFO_DOWNS   0x45
 
#define BMIREG_FIFO_CONFIG_0   0x46
 
#define BMIREG_FIFO_CONFIG_1   0x47
 
#define BMIREG_MAG_IF_0   0x4B
 
#define BMIREG_MAG_IF_1   0x4C
 
#define BMIREG_MAG_IF_2   0x4D
 
#define BMIREG_MAG_IF_3   0x4E
 
#define BMIREG_MAG_IF_4   0x4F
 
#define BMIREG_INT_EN_0   0x50
 
#define BMIREG_INT_EN_1   0x51
 
#define BMIREG_INT_EN_2   0x52
 
#define BMIREG_INT_OUT_CTRL   0x53
 
#define BMIREG_INT_LANTCH   0x54
 
#define BMIREG_INT_MAP_0   0x55
 
#define BMIREG_INT_MAP_1   0x56
 
#define BMIREG_INT_MAP_2   0x57
 
#define BMIREG_INT_DATA_0   0x58
 
#define BMIREG_INT_DATA_1   0x59
 
#define BMIREG_INT_LH_0   0x5A
 
#define BMIREG_INT_LH_1   0x5B
 
#define BMIREG_INT_LH_2   0x5C
 
#define BMIREG_INT_LH_3   0x5D
 
#define BMIREG_INT_LH_4   0x5E
 
#define BMIREG_INT_MOT_0   0x5F
 
#define BMIREG_INT_MOT_1   0x60
 
#define BMIREG_INT_MOT_2   0x61
 
#define BMIREG_INT_MOT_3   0x62
 
#define BMIREG_INT_TAP_0   0x63
 
#define BMIREG_INT_TAP_1   0x64
 
#define BMIREG_INT_ORIE_0   0x65
 
#define BMIREG_INT_ORIE_1   0x66
 
#define BMIREG_INT_FLAT_0   0x67
 
#define BMIREG_INT_FLAT_1   0x68
 
#define BMIREG_FOC_CONF   0x69
 
#define BMIREG_CONF   0x6A
 
#define BMIREG_IF_CONF   0x6B
 
#define BMIREG_PMU_TRIGGER   0x6C
 
#define BMIREG_SELF_TEST   0x6D
 
#define BMIREG_NV_CONF   0x70
 
#define BMIREG_OFFSET_ACC_X   0x71
 
#define BMIREG_OFFSET_ACC_Y   0x72
 
#define BMIREG_OFFSET_ACC_Z   0x73
 
#define BMIREG_OFFSET_GYR_X   0x74
 
#define BMIREG_OFFSET_GYR_Y   0x75
 
#define BMIREG_OFFSET_GYR_Z   0x76
 
#define BMIREG_OFFSET_EN   0x77
 
#define BMIREG_STEP_CONT_0   0x78
 
#define BMIREG_STEP_CONT_1   0x79
 
#define BMIREG_STEP_CONF_0   0x7A
 
#define BMIREG_STEP_CONF_1   0x7B
 
#define BMIREG_CMD   0x7E
 
#define BMI160_WHO_AM_I   0xD1
 
#define BMI_DRDY_ACCEL   (1<<7)
 
#define BMI_DRDY_GYRO   (1<<6)
 
#define BMI_DRDY_MAG   (1<<5)
 
#define BMI_GYRO_SELF_TEST_OK   (1<<1)
 
#define BMI_DRDY_INT   (1<<4)
 
#define BMI_ACCEL_RATE_25_32   (0<<3) | (0<<2) | (0<<1) | (1<<0)
 
#define BMI_ACCEL_RATE_25_16   (0<<3) | (0<<2) | (1<<1) | (0<<0)
 
#define BMI_ACCEL_RATE_25_8   (0<<3) | (0<<2) | (1<<1) | (1<<0)
 
#define BMI_ACCEL_RATE_25_4   (0<<3) | (1<<2) | (0<<1) | (0<<0)
 
#define BMI_ACCEL_RATE_25_2   (0<<3) | (1<<2) | (0<<1) | (1<<0)
 
#define BMI_ACCEL_RATE_25   (0<<3) | (1<<2) | (1<<1) | (0<<0)
 
#define BMI_ACCEL_RATE_50   (0<<3) | (1<<2) | (1<<1) | (1<<0)
 
#define BMI_ACCEL_RATE_100   (1<<3) | (0<<2) | (0<<1) | (0<<0)
 
#define BMI_ACCEL_RATE_200   (1<<3) | (0<<2) | (0<<1) | (1<<0)
 
#define BMI_ACCEL_RATE_400   (1<<3) | (0<<2) | (1<<1) | (0<<0)
 
#define BMI_ACCEL_RATE_800   (1<<3) | (0<<2) | (1<<1) | (1<<0)
 
#define BMI_ACCEL_RATE_1600   (1<<3) | (1<<2) | (0<<1) | (0<<0)
 
#define BMI_ACCEL_US   (0<<7)
 
#define BMI_ACCEL_BWP_NORMAL   (0<<6) | (1<<5) | (0<<4)
 
#define BMI_ACCEL_BWP_OSR2   (0<<6) | (0<<5) | (1<<4)
 
#define BMI_ACCEL_BWP_OSR4   (0<<6) | (0<<5) | (0<<4)
 
#define BMI_ACCEL_RANGE_2_G   (0<<3) | (0<<2) | (1<<1) | (1<<0)
 
#define BMI_ACCEL_RANGE_4_G   (0<<3) | (1<<2) | (0<<1) | (1<<0)
 
#define BMI_ACCEL_RANGE_8_G   (1<<3) | (0<<2) | (0<<1) | (0<<0)
 
#define BMI_ACCEL_RANGE_16_G   (1<<3) | (1<<2) | (0<<1) | (0<<0)
 
#define BMI_GYRO_RATE_25   (0<<3) | (1<<2) | (1<<1) | (0<<0)
 
#define BMI_GYRO_RATE_50   (0<<3) | (1<<2) | (1<<1) | (1<<0)
 
#define BMI_GYRO_RATE_100   (1<<3) | (0<<2) | (0<<1) | (0<<0)
 
#define BMI_GYRO_RATE_200   (1<<3) | (0<<2) | (0<<1) | (1<<0)
 
#define BMI_GYRO_RATE_400   (1<<3) | (0<<2) | (1<<1) | (0<<0)
 
#define BMI_GYRO_RATE_800   (1<<3) | (0<<2) | (1<<1) | (1<<0)
 
#define BMI_GYRO_RATE_1600   (1<<3) | (1<<2) | (0<<1) | (0<<0)
 
#define BMI_GYRO_RATE_3200   (1<<3) | (1<<2) | (0<<1) | (1<<0)
 
#define BMI_GYRO_BWP_NORMAL   (1<<5) | (0<<4)
 
#define BMI_GYRO_BWP_OSR2   (0<<5) | (1<<4)
 
#define BMI_GYRO_BWP_OSR4   (0<<5) | (0<<4)
 
#define BMI_GYRO_RANGE_2000_DPS   (0<<2) | (0<<1) | (0<<0)
 
#define BMI_GYRO_RANGE_1000_DPS   (0<<2) | (0<<1) | (1<<0)
 
#define BMI_GYRO_RANGE_500_DPS   (0<<2) | (1<<1) | (0<<0)
 
#define BMI_GYRO_RANGE_250_DPS   (0<<2) | (1<<1) | (1<<0)
 
#define BMI_GYRO_RANGE_125_DPS   (1<<2) | (0<<1) | (0<<0)
 
#define BMI_DRDY_INT_EN   (1<<4)
 
#define BMI_INT1_EN   (1<<3) | (0<<2) | (1<<1)
 
#define BMI_DRDY_INT1   (1<<7)
 
#define BMI_SPI_3_WIRE   (1<<0)
 
#define BMI_SPI_4_WIRE   (0<<0)
 
#define BMI_AUTO_DIS_SEC   (0<<5) | (0<<4)
 
#define BMI_I2C_OIS_SEC   (0<<5) | (1<<4)
 
#define BMI_AUTO_MAG_SEC   (1<<5) | (0<<4)
 
#define BMI_SPI   (1<<0)
 
#define BMI_ACCEL_NORMAL_MODE   0x11
 
#define BMI_GYRO_NORMAL_MODE   0x15
 
#define BMI160_SOFT_RESET   0xB6
 
#define BMI160_ACCEL_DEFAULT_RANGE_G   16
 
#define BMI160_GYRO_DEFAULT_RANGE_DPS   2000
 
#define BMI160_ACCEL_DEFAULT_RATE   800
 
#define BMI160_ACCEL_MAX_RATE   1600
 
#define BMI160_ACCEL_MAX_PUBLISH_RATE   280
 
#define BMI160_GYRO_DEFAULT_RATE   800
 
#define BMI160_GYRO_MAX_RATE   3200
 
#define BMI160_GYRO_MAX_PUBLISH_RATE   BMI160_ACCEL_MAX_PUBLISH_RATE
 
#define BMI160_ACCEL_DEFAULT_ONCHIP_FILTER_FREQ   324
 
#define BMI160_ACCEL_DEFAULT_DRIVER_FILTER_FREQ   50
 
#define BMI160_GYRO_DEFAULT_ONCHIP_FILTER_FREQ   254.6f
 
#define BMI160_GYRO_DEFAULT_DRIVER_FILTER_FREQ   50
 
#define BMI160_BUS_SPEED   10*1000*1000
 
#define BMI160_TIMER_REDUCTION   200
 

Macro Definition Documentation

◆ BMI160_ACCEL_DEFAULT_DRIVER_FILTER_FREQ

#define BMI160_ACCEL_DEFAULT_DRIVER_FILTER_FREQ   50

Definition at line 235 of file bmi160.hpp.

◆ BMI160_ACCEL_DEFAULT_ONCHIP_FILTER_FREQ

#define BMI160_ACCEL_DEFAULT_ONCHIP_FILTER_FREQ   324

Definition at line 234 of file bmi160.hpp.

◆ BMI160_ACCEL_DEFAULT_RANGE_G

#define BMI160_ACCEL_DEFAULT_RANGE_G   16

Definition at line 225 of file bmi160.hpp.

Referenced by BMI160::reset().

◆ BMI160_ACCEL_DEFAULT_RATE

#define BMI160_ACCEL_DEFAULT_RATE   800

Definition at line 227 of file bmi160.hpp.

Referenced by BMI160::BMI160(), and BMI160::reset().

◆ BMI160_ACCEL_MAX_PUBLISH_RATE

#define BMI160_ACCEL_MAX_PUBLISH_RATE   280

Definition at line 229 of file bmi160.hpp.

◆ BMI160_ACCEL_MAX_RATE

#define BMI160_ACCEL_MAX_RATE   1600

Definition at line 228 of file bmi160.hpp.

◆ BMI160_BUS_SPEED

#define BMI160_BUS_SPEED   10*1000*1000

Definition at line 240 of file bmi160.hpp.

◆ BMI160_GYRO_DEFAULT_DRIVER_FILTER_FREQ

#define BMI160_GYRO_DEFAULT_DRIVER_FILTER_FREQ   50

Definition at line 238 of file bmi160.hpp.

◆ BMI160_GYRO_DEFAULT_ONCHIP_FILTER_FREQ

#define BMI160_GYRO_DEFAULT_ONCHIP_FILTER_FREQ   254.6f

Definition at line 237 of file bmi160.hpp.

◆ BMI160_GYRO_DEFAULT_RANGE_DPS

#define BMI160_GYRO_DEFAULT_RANGE_DPS   2000

Definition at line 226 of file bmi160.hpp.

Referenced by BMI160::reset().

◆ BMI160_GYRO_DEFAULT_RATE

#define BMI160_GYRO_DEFAULT_RATE   800

Definition at line 230 of file bmi160.hpp.

Referenced by BMI160::BMI160(), BMI160::reset(), and BMI160::start().

◆ BMI160_GYRO_MAX_PUBLISH_RATE

#define BMI160_GYRO_MAX_PUBLISH_RATE   BMI160_ACCEL_MAX_PUBLISH_RATE

Definition at line 232 of file bmi160.hpp.

◆ BMI160_GYRO_MAX_RATE

#define BMI160_GYRO_MAX_RATE   3200

Definition at line 231 of file bmi160.hpp.

◆ BMI160_SOFT_RESET

#define BMI160_SOFT_RESET   0xB6

Definition at line 223 of file bmi160.hpp.

Referenced by BMI160::check_registers(), and BMI160::test_error().

◆ BMI160_TIMER_REDUCTION

#define BMI160_TIMER_REDUCTION   200

Definition at line 242 of file bmi160.hpp.

Referenced by BMI160::start().

◆ BMI160_WHO_AM_I

#define BMI160_WHO_AM_I   0xD1

Definition at line 146 of file bmi160.hpp.

Referenced by BMI160::probe().

◆ BMI_ACCEL_BWP_NORMAL

#define BMI_ACCEL_BWP_NORMAL   (0<<6) | (1<<5) | (0<<4)

Definition at line 171 of file bmi160.hpp.

Referenced by BMI160::reset().

◆ BMI_ACCEL_BWP_OSR2

#define BMI_ACCEL_BWP_OSR2   (0<<6) | (0<<5) | (1<<4)

Definition at line 172 of file bmi160.hpp.

◆ BMI_ACCEL_BWP_OSR4

#define BMI_ACCEL_BWP_OSR4   (0<<6) | (0<<5) | (0<<4)

Definition at line 173 of file bmi160.hpp.

◆ BMI_ACCEL_NORMAL_MODE

#define BMI_ACCEL_NORMAL_MODE   0x11

Definition at line 221 of file bmi160.hpp.

Referenced by BMI160::reset().

◆ BMI_ACCEL_RANGE_16_G

#define BMI_ACCEL_RANGE_16_G   (1<<3) | (1<<2) | (0<<1) | (0<<0)

Definition at line 179 of file bmi160.hpp.

Referenced by BMI160::set_accel_range().

◆ BMI_ACCEL_RANGE_2_G

#define BMI_ACCEL_RANGE_2_G   (0<<3) | (0<<2) | (1<<1) | (1<<0)

Definition at line 176 of file bmi160.hpp.

Referenced by BMI160::set_accel_range().

◆ BMI_ACCEL_RANGE_4_G

#define BMI_ACCEL_RANGE_4_G   (0<<3) | (1<<2) | (0<<1) | (1<<0)

Definition at line 177 of file bmi160.hpp.

Referenced by BMI160::set_accel_range().

◆ BMI_ACCEL_RANGE_8_G

#define BMI_ACCEL_RANGE_8_G   (1<<3) | (0<<2) | (0<<1) | (0<<0)

Definition at line 178 of file bmi160.hpp.

Referenced by BMI160::set_accel_range().

◆ BMI_ACCEL_RATE_100

#define BMI_ACCEL_RATE_100   (1<<3) | (0<<2) | (0<<1) | (0<<0)

Definition at line 165 of file bmi160.hpp.

Referenced by BMI160::accel_set_sample_rate().

◆ BMI_ACCEL_RATE_1600

#define BMI_ACCEL_RATE_1600   (1<<3) | (1<<2) | (0<<1) | (0<<0)

Definition at line 169 of file bmi160.hpp.

Referenced by BMI160::accel_set_sample_rate().

◆ BMI_ACCEL_RATE_200

#define BMI_ACCEL_RATE_200   (1<<3) | (0<<2) | (0<<1) | (1<<0)

Definition at line 166 of file bmi160.hpp.

Referenced by BMI160::accel_set_sample_rate().

◆ BMI_ACCEL_RATE_25

#define BMI_ACCEL_RATE_25   (0<<3) | (1<<2) | (1<<1) | (0<<0)

Definition at line 163 of file bmi160.hpp.

Referenced by BMI160::accel_set_sample_rate().

◆ BMI_ACCEL_RATE_25_16

#define BMI_ACCEL_RATE_25_16   (0<<3) | (0<<2) | (1<<1) | (0<<0)

Definition at line 159 of file bmi160.hpp.

Referenced by BMI160::accel_set_sample_rate().

◆ BMI_ACCEL_RATE_25_2

#define BMI_ACCEL_RATE_25_2   (0<<3) | (1<<2) | (0<<1) | (1<<0)

Definition at line 162 of file bmi160.hpp.

Referenced by BMI160::accel_set_sample_rate().

◆ BMI_ACCEL_RATE_25_32

#define BMI_ACCEL_RATE_25_32   (0<<3) | (0<<2) | (0<<1) | (1<<0)

Definition at line 158 of file bmi160.hpp.

Referenced by BMI160::accel_set_sample_rate().

◆ BMI_ACCEL_RATE_25_4

#define BMI_ACCEL_RATE_25_4   (0<<3) | (1<<2) | (0<<1) | (0<<0)

Definition at line 161 of file bmi160.hpp.

Referenced by BMI160::accel_set_sample_rate().

◆ BMI_ACCEL_RATE_25_8

#define BMI_ACCEL_RATE_25_8   (0<<3) | (0<<2) | (1<<1) | (1<<0)

Definition at line 160 of file bmi160.hpp.

Referenced by BMI160::accel_set_sample_rate().

◆ BMI_ACCEL_RATE_400

#define BMI_ACCEL_RATE_400   (1<<3) | (0<<2) | (1<<1) | (0<<0)

Definition at line 167 of file bmi160.hpp.

Referenced by BMI160::accel_set_sample_rate().

◆ BMI_ACCEL_RATE_50

#define BMI_ACCEL_RATE_50   (0<<3) | (1<<2) | (1<<1) | (1<<0)

Definition at line 164 of file bmi160.hpp.

Referenced by BMI160::accel_set_sample_rate().

◆ BMI_ACCEL_RATE_800

#define BMI_ACCEL_RATE_800   (1<<3) | (0<<2) | (1<<1) | (1<<0)

Definition at line 168 of file bmi160.hpp.

Referenced by BMI160::accel_set_sample_rate().

◆ BMI_ACCEL_US

#define BMI_ACCEL_US   (0<<7)

Definition at line 170 of file bmi160.hpp.

Referenced by BMI160::reset().

◆ BMI_AUTO_DIS_SEC

#define BMI_AUTO_DIS_SEC   (0<<5) | (0<<4)

Definition at line 213 of file bmi160.hpp.

Referenced by BMI160::reset().

◆ BMI_AUTO_MAG_SEC

#define BMI_AUTO_MAG_SEC   (1<<5) | (0<<4)

Definition at line 215 of file bmi160.hpp.

◆ BMI_DRDY_ACCEL

#define BMI_DRDY_ACCEL   (1<<7)

Definition at line 149 of file bmi160.hpp.

◆ BMI_DRDY_GYRO

#define BMI_DRDY_GYRO   (1<<6)

Definition at line 150 of file bmi160.hpp.

◆ BMI_DRDY_INT

#define BMI_DRDY_INT   (1<<4)

Definition at line 155 of file bmi160.hpp.

◆ BMI_DRDY_INT1

#define BMI_DRDY_INT1   (1<<7)

Definition at line 208 of file bmi160.hpp.

Referenced by BMI160::reset().

◆ BMI_DRDY_INT_EN

#define BMI_DRDY_INT_EN   (1<<4)

Definition at line 202 of file bmi160.hpp.

Referenced by BMI160::reset().

◆ BMI_DRDY_MAG

#define BMI_DRDY_MAG   (1<<5)

Definition at line 151 of file bmi160.hpp.

◆ BMI_GYRO_BWP_NORMAL

#define BMI_GYRO_BWP_NORMAL   (1<<5) | (0<<4)

Definition at line 190 of file bmi160.hpp.

Referenced by BMI160::reset().

◆ BMI_GYRO_BWP_OSR2

#define BMI_GYRO_BWP_OSR2   (0<<5) | (1<<4)

Definition at line 191 of file bmi160.hpp.

◆ BMI_GYRO_BWP_OSR4

#define BMI_GYRO_BWP_OSR4   (0<<5) | (0<<4)

Definition at line 192 of file bmi160.hpp.

◆ BMI_GYRO_NORMAL_MODE

#define BMI_GYRO_NORMAL_MODE   0x15

Definition at line 222 of file bmi160.hpp.

Referenced by BMI160::reset().

◆ BMI_GYRO_RANGE_1000_DPS

#define BMI_GYRO_RANGE_1000_DPS   (0<<2) | (0<<1) | (1<<0)

Definition at line 196 of file bmi160.hpp.

Referenced by BMI160::set_gyro_range().

◆ BMI_GYRO_RANGE_125_DPS

#define BMI_GYRO_RANGE_125_DPS   (1<<2) | (0<<1) | (0<<0)

Definition at line 199 of file bmi160.hpp.

Referenced by BMI160::set_gyro_range().

◆ BMI_GYRO_RANGE_2000_DPS

#define BMI_GYRO_RANGE_2000_DPS   (0<<2) | (0<<1) | (0<<0)

Definition at line 195 of file bmi160.hpp.

Referenced by BMI160::set_gyro_range().

◆ BMI_GYRO_RANGE_250_DPS

#define BMI_GYRO_RANGE_250_DPS   (0<<2) | (1<<1) | (1<<0)

Definition at line 198 of file bmi160.hpp.

Referenced by BMI160::set_gyro_range().

◆ BMI_GYRO_RANGE_500_DPS

#define BMI_GYRO_RANGE_500_DPS   (0<<2) | (1<<1) | (0<<0)

Definition at line 197 of file bmi160.hpp.

Referenced by BMI160::set_gyro_range().

◆ BMI_GYRO_RATE_100

#define BMI_GYRO_RATE_100   (1<<3) | (0<<2) | (0<<1) | (0<<0)

Definition at line 184 of file bmi160.hpp.

Referenced by BMI160::gyro_set_sample_rate().

◆ BMI_GYRO_RATE_1600

#define BMI_GYRO_RATE_1600   (1<<3) | (1<<2) | (0<<1) | (0<<0)

Definition at line 188 of file bmi160.hpp.

Referenced by BMI160::gyro_set_sample_rate().

◆ BMI_GYRO_RATE_200

#define BMI_GYRO_RATE_200   (1<<3) | (0<<2) | (0<<1) | (1<<0)

Definition at line 185 of file bmi160.hpp.

Referenced by BMI160::gyro_set_sample_rate().

◆ BMI_GYRO_RATE_25

#define BMI_GYRO_RATE_25   (0<<3) | (1<<2) | (1<<1) | (0<<0)

Definition at line 182 of file bmi160.hpp.

Referenced by BMI160::gyro_set_sample_rate().

◆ BMI_GYRO_RATE_3200

#define BMI_GYRO_RATE_3200   (1<<3) | (1<<2) | (0<<1) | (1<<0)

Definition at line 189 of file bmi160.hpp.

Referenced by BMI160::gyro_set_sample_rate().

◆ BMI_GYRO_RATE_400

#define BMI_GYRO_RATE_400   (1<<3) | (0<<2) | (1<<1) | (0<<0)

Definition at line 186 of file bmi160.hpp.

Referenced by BMI160::gyro_set_sample_rate().

◆ BMI_GYRO_RATE_50

#define BMI_GYRO_RATE_50   (0<<3) | (1<<2) | (1<<1) | (1<<0)

Definition at line 183 of file bmi160.hpp.

Referenced by BMI160::gyro_set_sample_rate().

◆ BMI_GYRO_RATE_800

#define BMI_GYRO_RATE_800   (1<<3) | (0<<2) | (1<<1) | (1<<0)

Definition at line 187 of file bmi160.hpp.

Referenced by BMI160::gyro_set_sample_rate().

◆ BMI_GYRO_SELF_TEST_OK

#define BMI_GYRO_SELF_TEST_OK   (1<<1)

Definition at line 152 of file bmi160.hpp.

◆ BMI_I2C_OIS_SEC

#define BMI_I2C_OIS_SEC   (0<<5) | (1<<4)

Definition at line 214 of file bmi160.hpp.

◆ BMI_INT1_EN

#define BMI_INT1_EN   (1<<3) | (0<<2) | (1<<1)

Definition at line 205 of file bmi160.hpp.

Referenced by BMI160::reset().

◆ BMI_SPI

#define BMI_SPI   (1<<0)

Definition at line 218 of file bmi160.hpp.

Referenced by BMI160::reset().

◆ BMI_SPI_3_WIRE

#define BMI_SPI_3_WIRE   (1<<0)

Definition at line 211 of file bmi160.hpp.

◆ BMI_SPI_4_WIRE

#define BMI_SPI_4_WIRE   (0<<0)

Definition at line 212 of file bmi160.hpp.

Referenced by BMI160::reset().

◆ BMIREG_ACC_CONF

#define BMIREG_ACC_CONF   0x40

Definition at line 87 of file bmi160.hpp.

Referenced by BMI160::accel_set_sample_rate(), and BMI160::reset().

◆ BMIREG_ACC_RANGE

#define BMIREG_ACC_RANGE   0x41

Definition at line 88 of file bmi160.hpp.

Referenced by BMI160::reset(), and BMI160::set_accel_range().

◆ BMIREG_ACC_X_H

#define BMIREG_ACC_X_H   0x13

Definition at line 69 of file bmi160.hpp.

◆ BMIREG_ACC_X_L

#define BMIREG_ACC_X_L   0x12

Definition at line 68 of file bmi160.hpp.

◆ BMIREG_ACC_Y_H

#define BMIREG_ACC_Y_H   0x15

Definition at line 71 of file bmi160.hpp.

◆ BMIREG_ACC_Y_L

#define BMIREG_ACC_Y_L   0x14

Definition at line 70 of file bmi160.hpp.

◆ BMIREG_ACC_Z_H

#define BMIREG_ACC_Z_H   0x17

Definition at line 73 of file bmi160.hpp.

◆ BMIREG_ACC_Z_L

#define BMIREG_ACC_Z_L   0x16

Definition at line 72 of file bmi160.hpp.

◆ BMIREG_CHIP_ID

#define BMIREG_CHIP_ID   0x00

Definition at line 51 of file bmi160.hpp.

Referenced by BMI160::probe().

◆ BMIREG_CMD

#define BMIREG_CMD   0x7E

Definition at line 142 of file bmi160.hpp.

Referenced by BMI160::check_registers(), BMI160::reset(), and BMI160::test_error().

◆ BMIREG_CONF

#define BMIREG_CONF   0x6A

Definition at line 126 of file bmi160.hpp.

Referenced by BMI160::reset().

◆ BMIREG_DATA_0

#define BMIREG_DATA_0   0x04

Definition at line 54 of file bmi160.hpp.

◆ BMIREG_DATA_1

#define BMIREG_DATA_1   0x05

Definition at line 55 of file bmi160.hpp.

◆ BMIREG_DATA_2

#define BMIREG_DATA_2   0x06

Definition at line 56 of file bmi160.hpp.

◆ BMIREG_DATA_3

#define BMIREG_DATA_3   0x07

Definition at line 57 of file bmi160.hpp.

◆ BMIREG_DATA_4

#define BMIREG_DATA_4   0x08

Definition at line 58 of file bmi160.hpp.

◆ BMIREG_DATA_5

#define BMIREG_DATA_5   0x09

Definition at line 59 of file bmi160.hpp.

◆ BMIREG_DATA_6

#define BMIREG_DATA_6   0x0A

Definition at line 60 of file bmi160.hpp.

◆ BMIREG_DATA_7

#define BMIREG_DATA_7   0x0B

Definition at line 61 of file bmi160.hpp.

◆ BMIREG_ERR_REG

#define BMIREG_ERR_REG   0x02

Definition at line 52 of file bmi160.hpp.

◆ BMIREG_FIFO_CONFIG_0

#define BMIREG_FIFO_CONFIG_0   0x46

Definition at line 93 of file bmi160.hpp.

◆ BMIREG_FIFO_CONFIG_1

#define BMIREG_FIFO_CONFIG_1   0x47

Definition at line 94 of file bmi160.hpp.

◆ BMIREG_FIFO_DATA

#define BMIREG_FIFO_DATA   0x24

Definition at line 86 of file bmi160.hpp.

◆ BMIREG_FIFO_DOWNS

#define BMIREG_FIFO_DOWNS   0x45

Definition at line 92 of file bmi160.hpp.

◆ BMIREG_FIFO_LEN_0

#define BMIREG_FIFO_LEN_0   0x22

Definition at line 84 of file bmi160.hpp.

◆ BMIREG_FIFO_LEN_1

#define BMIREG_FIFO_LEN_1   0x23

Definition at line 85 of file bmi160.hpp.

◆ BMIREG_FOC_CONF

#define BMIREG_FOC_CONF   0x69

Definition at line 125 of file bmi160.hpp.

◆ BMIREG_GYR_CONF

#define BMIREG_GYR_CONF   0x42

Definition at line 89 of file bmi160.hpp.

Referenced by BMI160::gyro_set_sample_rate(), and BMI160::reset().

◆ BMIREG_GYR_RANGE

#define BMIREG_GYR_RANGE   0x43

Definition at line 90 of file bmi160.hpp.

Referenced by BMI160::reset(), and BMI160::set_gyro_range().

◆ BMIREG_GYR_X_H

#define BMIREG_GYR_X_H   0x0D

Definition at line 63 of file bmi160.hpp.

◆ BMIREG_GYR_X_L

#define BMIREG_GYR_X_L   0x0C

Definition at line 62 of file bmi160.hpp.

Referenced by BMI160::measure().

◆ BMIREG_GYR_Y_H

#define BMIREG_GYR_Y_H   0x0F

Definition at line 65 of file bmi160.hpp.

◆ BMIREG_GYR_Y_L

#define BMIREG_GYR_Y_L   0x0E

Definition at line 64 of file bmi160.hpp.

◆ BMIREG_GYR_Z_H

#define BMIREG_GYR_Z_H   0x11

Definition at line 67 of file bmi160.hpp.

◆ BMIREG_GYR_Z_L

#define BMIREG_GYR_Z_L   0x10

Definition at line 66 of file bmi160.hpp.

◆ BMIREG_IF_CONF

#define BMIREG_IF_CONF   0x6B

Definition at line 127 of file bmi160.hpp.

Referenced by BMI160::reset().

◆ BMIREG_INT_DATA_0

#define BMIREG_INT_DATA_0   0x58

Definition at line 108 of file bmi160.hpp.

◆ BMIREG_INT_DATA_1

#define BMIREG_INT_DATA_1   0x59

Definition at line 109 of file bmi160.hpp.

◆ BMIREG_INT_EN_0

#define BMIREG_INT_EN_0   0x50

Definition at line 100 of file bmi160.hpp.

◆ BMIREG_INT_EN_1

#define BMIREG_INT_EN_1   0x51

Definition at line 101 of file bmi160.hpp.

Referenced by BMI160::reset().

◆ BMIREG_INT_EN_2

#define BMIREG_INT_EN_2   0x52

Definition at line 102 of file bmi160.hpp.

◆ BMIREG_INT_FLAT_0

#define BMIREG_INT_FLAT_0   0x67

Definition at line 123 of file bmi160.hpp.

◆ BMIREG_INT_FLAT_1

#define BMIREG_INT_FLAT_1   0x68

Definition at line 124 of file bmi160.hpp.

◆ BMIREG_INT_LANTCH

#define BMIREG_INT_LANTCH   0x54

Definition at line 104 of file bmi160.hpp.

◆ BMIREG_INT_LH_0

#define BMIREG_INT_LH_0   0x5A

Definition at line 110 of file bmi160.hpp.

◆ BMIREG_INT_LH_1

#define BMIREG_INT_LH_1   0x5B

Definition at line 111 of file bmi160.hpp.

◆ BMIREG_INT_LH_2

#define BMIREG_INT_LH_2   0x5C

Definition at line 112 of file bmi160.hpp.

◆ BMIREG_INT_LH_3

#define BMIREG_INT_LH_3   0x5D

Definition at line 113 of file bmi160.hpp.

◆ BMIREG_INT_LH_4

#define BMIREG_INT_LH_4   0x5E

Definition at line 114 of file bmi160.hpp.

◆ BMIREG_INT_MAP_0

#define BMIREG_INT_MAP_0   0x55

Definition at line 105 of file bmi160.hpp.

◆ BMIREG_INT_MAP_1

#define BMIREG_INT_MAP_1   0x56

Definition at line 106 of file bmi160.hpp.

Referenced by BMI160::reset().

◆ BMIREG_INT_MAP_2

#define BMIREG_INT_MAP_2   0x57

Definition at line 107 of file bmi160.hpp.

◆ BMIREG_INT_MOT_0

#define BMIREG_INT_MOT_0   0x5F

Definition at line 115 of file bmi160.hpp.

◆ BMIREG_INT_MOT_1

#define BMIREG_INT_MOT_1   0x60

Definition at line 116 of file bmi160.hpp.

◆ BMIREG_INT_MOT_2

#define BMIREG_INT_MOT_2   0x61

Definition at line 117 of file bmi160.hpp.

◆ BMIREG_INT_MOT_3

#define BMIREG_INT_MOT_3   0x62

Definition at line 118 of file bmi160.hpp.

◆ BMIREG_INT_ORIE_0

#define BMIREG_INT_ORIE_0   0x65

Definition at line 121 of file bmi160.hpp.

◆ BMIREG_INT_ORIE_1

#define BMIREG_INT_ORIE_1   0x66

Definition at line 122 of file bmi160.hpp.

◆ BMIREG_INT_OUT_CTRL

#define BMIREG_INT_OUT_CTRL   0x53

Definition at line 103 of file bmi160.hpp.

Referenced by BMI160::reset().

◆ BMIREG_INT_STATUS_0

#define BMIREG_INT_STATUS_0   0x1C

Definition at line 78 of file bmi160.hpp.

◆ BMIREG_INT_STATUS_1

#define BMIREG_INT_STATUS_1   0x1D

Definition at line 79 of file bmi160.hpp.

◆ BMIREG_INT_STATUS_2

#define BMIREG_INT_STATUS_2   0x1E

Definition at line 80 of file bmi160.hpp.

◆ BMIREG_INT_STATUS_3

#define BMIREG_INT_STATUS_3   0x1F

Definition at line 81 of file bmi160.hpp.

◆ BMIREG_INT_TAP_0

#define BMIREG_INT_TAP_0   0x63

Definition at line 119 of file bmi160.hpp.

◆ BMIREG_INT_TAP_1

#define BMIREG_INT_TAP_1   0x64

Definition at line 120 of file bmi160.hpp.

◆ BMIREG_MAG_CONF

#define BMIREG_MAG_CONF   0x44

Definition at line 91 of file bmi160.hpp.

◆ BMIREG_MAG_IF_0

#define BMIREG_MAG_IF_0   0x4B

Definition at line 95 of file bmi160.hpp.

◆ BMIREG_MAG_IF_1

#define BMIREG_MAG_IF_1   0x4C

Definition at line 96 of file bmi160.hpp.

◆ BMIREG_MAG_IF_2

#define BMIREG_MAG_IF_2   0x4D

Definition at line 97 of file bmi160.hpp.

◆ BMIREG_MAG_IF_3

#define BMIREG_MAG_IF_3   0x4E

Definition at line 98 of file bmi160.hpp.

◆ BMIREG_MAG_IF_4

#define BMIREG_MAG_IF_4   0x4F

Definition at line 99 of file bmi160.hpp.

◆ BMIREG_NV_CONF

#define BMIREG_NV_CONF   0x70

Definition at line 130 of file bmi160.hpp.

Referenced by BMI160::reset().

◆ BMIREG_OFFSET_ACC_X

#define BMIREG_OFFSET_ACC_X   0x71

Definition at line 131 of file bmi160.hpp.

◆ BMIREG_OFFSET_ACC_Y

#define BMIREG_OFFSET_ACC_Y   0x72

Definition at line 132 of file bmi160.hpp.

◆ BMIREG_OFFSET_ACC_Z

#define BMIREG_OFFSET_ACC_Z   0x73

Definition at line 133 of file bmi160.hpp.

◆ BMIREG_OFFSET_EN

#define BMIREG_OFFSET_EN   0x77

Definition at line 137 of file bmi160.hpp.

◆ BMIREG_OFFSET_GYR_X

#define BMIREG_OFFSET_GYR_X   0x74

Definition at line 134 of file bmi160.hpp.

◆ BMIREG_OFFSET_GYR_Y

#define BMIREG_OFFSET_GYR_Y   0x75

Definition at line 135 of file bmi160.hpp.

◆ BMIREG_OFFSET_GYR_Z

#define BMIREG_OFFSET_GYR_Z   0x76

Definition at line 136 of file bmi160.hpp.

◆ BMIREG_PMU_STATUS

#define BMIREG_PMU_STATUS   0x03

Definition at line 53 of file bmi160.hpp.

◆ BMIREG_PMU_TRIGGER

#define BMIREG_PMU_TRIGGER   0x6C

Definition at line 128 of file bmi160.hpp.

◆ BMIREG_SELF_TEST

#define BMIREG_SELF_TEST   0x6D

Definition at line 129 of file bmi160.hpp.

◆ BMIREG_SENSORTIME0

#define BMIREG_SENSORTIME0   0x18

Definition at line 74 of file bmi160.hpp.

◆ BMIREG_SENSORTIME1

#define BMIREG_SENSORTIME1   0x19

Definition at line 75 of file bmi160.hpp.

◆ BMIREG_SENSORTIME2

#define BMIREG_SENSORTIME2   0x1A

Definition at line 76 of file bmi160.hpp.

◆ BMIREG_STATUS

#define BMIREG_STATUS   0x1B

Definition at line 77 of file bmi160.hpp.

Referenced by BMI160::measure().

◆ BMIREG_STEP_CONF_0

#define BMIREG_STEP_CONF_0   0x7A

Definition at line 140 of file bmi160.hpp.

◆ BMIREG_STEP_CONF_1

#define BMIREG_STEP_CONF_1   0x7B

Definition at line 141 of file bmi160.hpp.

◆ BMIREG_STEP_CONT_0

#define BMIREG_STEP_CONT_0   0x78

Definition at line 138 of file bmi160.hpp.

◆ BMIREG_STEP_CONT_1

#define BMIREG_STEP_CONT_1   0x79

Definition at line 139 of file bmi160.hpp.

◆ BMIREG_TEMP_0

#define BMIREG_TEMP_0   0x20

Definition at line 82 of file bmi160.hpp.

Referenced by BMI160::measure().

◆ BMIREG_TEMP_1

#define BMIREG_TEMP_1   0x21

Definition at line 83 of file bmi160.hpp.

Referenced by BMI160::measure().

◆ DIR_READ

#define DIR_READ   0x80

Definition at line 46 of file bmi160.hpp.

◆ DIR_WRITE

#define DIR_WRITE   0x00

Definition at line 47 of file bmi160.hpp.