XDK API  3.6.0
Documentation
Data Structures | Macros | Typedefs
bmi160.h File Reference

BMI160 Sensor Driver Support Header File. More...

+ This graph shows which files directly or indirectly include this file:

Data Structures

struct  bmi160_accel_t
 Structure containing accel xyz data. More...
 
struct  bmi160_fifo_data_header_less_t
 FIFO used to store the FIFO header less data. More...
 
struct  bmi160_fifo_data_header_t
 Struct used to store the FIFO header data. More...
 
struct  bmi160_gyro_t
 Structure containing gyro xyz data. More...
 
struct  bmi160_mag_fifo_data_t
 Struct used to store the FIFO mag data. More...
 
struct  bmi160_mag_t
 Structure containing bmm150 and akm09911 magnetometer values for x,y and z-axis in s16. More...
 
struct  bmi160_mag_xyz_s32_t
 Structure bmm150 mag compensated data with s32 output. More...
 
struct  bmi160_mag_xyzr_t
 Structure containing bmm150 xyz data and temperature. More...
 
struct  bmi160_sensortime_accel_gyro_data
 Structure containing accel gyro data and sensor time. More...
 
struct  bmi160_t
 bmi160 structure This structure holds all relevant information about bmi160 More...
 
struct  bst_yas537_calib_data_t
 YAMAHA-YAS532 struct Calibration YAS532 data struct. More...
 
struct  trim_data_t
 Structure bmm150 mag trim data. More...
 
struct  yas537_t
 YAS537 sensor initialization. More...
 
struct  yas_vector
 Stores the sensor data. More...
 

Macros

#define MACHINE_32_BIT
 The following definition uses for define the data types. More...
 
BUS READ AND WRITE FUNCTION POINTERS
#define BMI160_WR_FUNC_PTR
 Define the calling convention of YOUR bus communication routine. More...
 
#define BMI160_BUS_WRITE_FUNC(dev_addr, reg_addr, reg_data, wr_len)   bus_write(dev_addr, reg_addr, reg_data, wr_len)
 
#define BMI160_SPI_RD_MASK
 
#define BMI160_RD_FUNC_PTR
 
#define BMI160_BRD_FUNC_PTR
 
#define BMI160_BUS_READ_FUNC(dev_addr, reg_addr, reg_data, r_len)   bus_read(dev_addr, reg_addr, reg_data, r_len)
 
#define BMI160_BURST_READ_FUNC(device_addr, register_addr, register_data, rd_len)   burst_read(device_addr, register_addr, register_data, rd_len)
 
#define FIFO_ENABLE
 
#define YAS537
 
#define BMI160_MDELAY_DATA_TYPE   u32
 
#define BMI160_I2C_ADDR1   (0x68)
 
#define BMI160_I2C_ADDR2   (0x69)
 
#define BMI160_AUX_BMM150_I2C_ADDRESS   (0x10)
 
#define BMI160_AUX_YAS532_I2C_ADDRESS   (0x2E)
 
#define BMI160_AUX_AKM09911_I2C_ADDR_1   (0x0C)
 
#define BMI160_AUX_AKM09911_I2C_ADDR_2   (0x0D)
 
#define BMI160_AUX_AKM09912_I2C_ADDR_1   (0x0C)
 
#define BMI160_AUX_AKM09912_I2C_ADDR_2   (0x0D)
 
#define BMI160_AUX_AKM09912_I2C_ADDR_3   (0x0E)
 
#define BMI160_AUX_AKM09912_I2C_ADDR_4   (0x0F)
 
CONSTANTS
#define BMI160_INIT_VALUE   (0)
 
#define BMI160_ASSIGN_DATA   (1)
 
#define BMI160_GEN_READ_WRITE_DATA_LENGTH   (1)
 
#define BMI160_MAXIMUM_TIMEOUT   (10)
 
#define BMI160_OUTPUT_DATA_RATE0   (0)
 
#define BMI160_OUTPUT_DATA_RATE1   (1)
 
#define BMI160_OUTPUT_DATA_RATE2   (2)
 
#define BMI160_OUTPUT_DATA_RATE3   (3)
 
#define BMI160_OUTPUT_DATA_RATE4   (4)
 
#define BMI160_OUTPUT_DATA_RATE5   (5)
 
#define BMI160_OUTPUT_DATA_RATE6   (14)
 
#define BMI160_OUTPUT_DATA_RATE7   (15)
 
#define V_ANY_MOTION_INTR_STAT   (4)
 
#define V_ANY_MOTION_AXIS_STAT   (7)
 
#define BMI160_ACCEL_RANGE0   (3)
 
#define BMI160_ACCEL_RANGE1   (5)
 
#define BMI160_ACCEL_RANGE3   (8)
 
#define BMI160_ACCEL_RANGE4   (12)
 
#define BMI160_FOC_STAT_HIGH   (1)
 
#define BMI160_SIG_MOTION_STAT_HIGH   (1)
 
#define BMI160_STEP_DET_STAT_HIGH   (1)
 
#define BMI160_MAX_VALUE_SIGNIFICANT_MOTION   (1)
 
#define BMI160_MAX_VALUE_FIFO_FILTER   (1)
 
#define BMI160_MAX_VALUE_FIFO_TIME   (1)
 
#define BMI160_MAX_VALUE_FIFO_INTR   (1)
 
#define BMI160_MAX_VALUE_FIFO_HEADER   (1)
 
#define BMI160_MAX_VALUE_FIFO_MAG   (1)
 
#define BMI160_MAX_VALUE_FIFO_ACCEL   (1)
 
#define BMI160_MAX_VALUE_FIFO_GYRO   (1)
 
#define BMI160_MAX_VALUE_SOURCE_INTR   (1)
 
#define BMI160_MAX_VALUE_LOW_G_MODE   (1)
 
#define BMI160_MAX_VALUE_NO_MOTION   (1)
 
#define BMI160_MAX_VALUE_TAP_SHOCK   (1)
 
#define BMI160_MAX_VALUE_TAP_QUIET   (1)
 
#define BMI160_MAX_VALUE_ORIENT_UD   (1)
 
#define BMI160_MAX_VALUE_ORIENT_AXES   (1)
 
#define BMI160_MAX_VALUE_NVM_PROG   (1)
 
#define BMI160_MAX_VALUE_SPI3   (1)
 
#define BMI160_MAX_VALUE_PAGE   (1)
 
#define BMI160_MAX_VALUE_I2C_WDT   (1)
 
#define BMI160_MAX_VALUE_SLEEP_STATE   (1)
 
#define BMI160_MAX_VALUE_WAKEUP_INTR   (1)
 
#define BMI160_MAX_VALUE_SELFTEST_SIGN   (1)
 
#define BMI160_MAX_VALUE_SELFTEST_AMP   (1)
 
#define BMI160_MAX_VALUE_SELFTEST_START   (1)
 
#define BMI160_MAX_GYRO_WAKEUP_TRIGGER   (3)
 
#define BMI160_MAX_ACCEL_SELFTEST_AXIS   (3)
 
#define BMI160_MAX_GYRO_STEP_COUNTER   (1)
 
#define BMI160_MAX_GYRO_BW   (3)
 
#define BMI160_MAX_ACCEL_BW   (7)
 
#define BMI160_MAX_ORIENT_MODE   (3)
 
#define BMI160_MAX_ORIENT_BLOCKING   (3)
 
#define BMI160_MAX_FLAT_HOLD   (3)
 
#define BMI160_MAX_ACCEL_FOC   (3)
 
#define BMI160_MAX_IF_MODE   (3)
 
#define BMI160_MAX_TARGET_PAGE   (3)
 
#define BMI160_MAX_GYRO_RANGE   (4)
 
#define BMI160_MAX_GYRO_SLEEP_TIGGER   (7)
 
#define BMI160_MAX_TAP_TURN   (7)
 
#define BMI160_MAX_UNDER_SAMPLING   (1)
 
#define BMI160_MAX_UNDER_SIG_MOTION   (3)
 
#define BMI160_MAX_ACCEL_OUTPUT_DATA_RATE   (12)
 
#define BMI160_MAX_LATCH_INTR   (15)
 
#define BMI160_MAX_FLAT_HYST   (15)
 
#define BMI160_MAX_ORIENT_THETA   (63)
 
#define BMI160_MAX_FLAT_THETA   (63)
 
#define BMI160_FIFO_X_LSB_DATA   (0)
 
#define BMI160_FIFO_X_MSB_DATA   (1)
 
#define BMI160_FIFO_Y_LSB_DATA   (2)
 
#define BMI160_FIFO_Y_MSB_DATA   (3)
 
#define BMI160_FIFO_Z_LSB_DATA   (4)
 
#define BMI160_FIFO_Z_MSB_DATA   (5)
 
#define BMI160_FIFO_R_LSB_DATA   (6)
 
#define BMI160_FIFO_R_MSB_DATA   (7)
 
#define BMI160_GA_FIFO_G_X_LSB   (0)
 
#define BMI160_GA_FIFO_G_X_MSB   (1)
 
#define BMI160_GA_FIFO_G_Y_LSB   (2)
 
#define BMI160_GA_FIFO_G_Y_MSB   (3)
 
#define BMI160_GA_FIFO_G_Z_LSB   (4)
 
#define BMI160_GA_FIFO_G_Z_MSB   (5)
 
#define BMI160_GA_FIFO_A_X_LSB   (6)
 
#define BMI160_GA_FIFO_A_X_MSB   (7)
 
#define BMI160_GA_FIFO_A_Y_LSB   (8)
 
#define BMI160_GA_FIFO_A_Y_MSB   (9)
 
#define BMI160_GA_FIFO_A_Z_LSB   (10)
 
#define BMI160_GA_FIFO_A_Z_MSB   (11)
 
#define BMI160_MGA_FIFO_M_X_LSB   (0)
 
#define BMI160_MGA_FIFO_M_X_MSB   (1)
 
#define BMI160_MGA_FIFO_M_Y_LSB   (2)
 
#define BMI160_MGA_FIFO_M_Y_MSB   (3)
 
#define BMI160_MGA_FIFO_M_Z_LSB   (4)
 
#define BMI160_MGA_FIFO_M_Z_MSB   (5)
 
#define BMI160_MGA_FIFO_M_R_LSB   (6)
 
#define BMI160_MGA_FIFO_M_R_MSB   (7)
 
#define BMI160_MGA_FIFO_G_X_LSB   (8)
 
#define BMI160_MGA_FIFO_G_X_MSB   (9)
 
#define BMI160_MGA_FIFO_G_Y_LSB   (10)
 
#define BMI160_MGA_FIFO_G_Y_MSB   (11)
 
#define BMI160_MGA_FIFO_G_Z_LSB   (12)
 
#define BMI160_MGA_FIFO_G_Z_MSB   (13)
 
#define BMI160_MGA_FIFO_A_X_LSB   (14)
 
#define BMI160_MGA_FIFO_A_X_MSB   (15)
 
#define BMI160_MGA_FIFO_A_Y_LSB   (16)
 
#define BMI160_MGA_FIFO_A_Y_MSB   (17)
 
#define BMI160_MGA_FIFO_A_Z_LSB   (18)
 
#define BMI160_MGA_FIFO_A_Z_MSB   (19)
 
#define BMI160_MA_FIFO_M_X_LSB   (0)
 
#define BMI160_MA_FIFO_M_X_MSB   (1)
 
#define BMI160_MA_FIFO_M_Y_LSB   (2)
 
#define BMI160_MA_FIFO_M_Y_MSB   (3)
 
#define BMI160_MA_FIFO_M_Z_LSB   (4)
 
#define BMI160_MA_FIFO_M_Z_MSB   (5)
 
#define BMI160_MA_FIFO_M_R_LSB   (6)
 
#define BMI160_MA_FIFO_M_R_MSB   (7)
 
#define BMI160_MA_FIFO_A_X_LSB   (8)
 
#define BMI160_MA_FIFO_A_X_MSB   (9)
 
#define BMI160_MA_FIFO_A_Y_LSB   (10)
 
#define BMI160_MA_FIFO_A_Y_MSB   (11)
 
#define BMI160_MA_FIFO_A_Z_LSB   (12)
 
#define BMI160_MA_FIFO_A_Z_MSB   (13)
 
#define BMI160_MG_FIFO_M_X_LSB   (0)
 
#define BMI160_MG_FIFO_M_X_MSB   (1)
 
#define BMI160_MG_FIFO_M_Y_LSB   (2)
 
#define BMI160_MG_FIFO_M_Y_MSB   (3)
 
#define BMI160_MG_FIFO_M_Z_LSB   (4)
 
#define BMI160_MG_FIFO_M_Z_MSB   (5)
 
#define BMI160_MG_FIFO_M_R_LSB   (6)
 
#define BMI160_MG_FIFO_M_R_MSB   (7)
 
#define BMI160_MG_FIFO_G_X_LSB   (8)
 
#define BMI160_MG_FIFO_G_X_MSB   (9)
 
#define BMI160_MG_FIFO_G_Y_LSB   (10)
 
#define BMI160_MG_FIFO_G_Y_MSB   (11)
 
#define BMI160_MG_FIFO_G_Z_LSB   (12)
 
#define BMI160_MG_FIFO_G_Z_MSB   (13)
 
#define BMI160_FIFO_SENSOR_TIME_LSB   (0)
 
#define BMI160_FIFO_SENSOR_TIME_XLSB   (1)
 
#define BMI160_FIFO_SENSOR_TIME_MSB   (2)
 
#define BMI160_FIFO_SENSOR_TIME_LENGTH   (3)
 
#define BMI160_FIFO_A_LENGTH   (6)
 
#define BMI160_FIFO_G_LENGTH   (6)
 
#define BMI160_FIFO_M_LENGTH   (8)
 
#define BMI160_FIFO_AG_LENGTH   (12)
 
#define BMI160_FIFO_AMG_LENGTH   (20)
 
#define BMI160_FIFO_MA_OR_MG_LENGTH   (14)
 
#define BMI160_FIFO_LENGTH_LSB_BYTE   (0)
 
#define BMI160_FIFO_LENGTH_MSB_BYTE   (1)
 
#define BMI160_MAG_X_DATA_LENGTH   (2)
 
#define BMI160_MAG_Y_DATA_LENGTH   (2)
 
#define BMI160_MAG_Z_DATA_LENGTH   (2)
 
#define BMI160_MAG_R_DATA_LENGTH   (2)
 
#define BMI160_MAG_XYZ_DATA_LENGTH   (6)
 
#define BMI160_MAG_XYZR_DATA_LENGTH   (8)
 
#define BMI160_MAG_YAS_DATA_LENGTH   (8)
 
#define BMI160_GYRO_DATA_LENGTH   (2)
 
#define BMI160_GYRO_XYZ_DATA_LENGTH   (6)
 
#define BMI160_ACCEL_DATA_LENGTH   (2)
 
#define BMI160_ACCEL_XYZ_DATA_LENGTH   (6)
 
#define BMI160_TEMP_DATA_LENGTH   (2)
 
#define BMI160_FIFO_DATA_LENGTH   (2)
 
#define BMI160_STEP_COUNTER_LENGTH   (2)
 
#define BMI160_SENSOR_TIME_LENGTH   (3)
 
#define BMI160_SEC_INTERFACE_GEN_READ_WRITE_DELAY   (5)
 
#define BMI160_BMM150_WAKEUP_DELAY1   (2)
 
#define BMI160_BMM150_WAKEUP_DELAY2   (3)
 
#define BMI160_BMM150_WAKEUP_DELAY3   (1)
 
#define BMI160_YAS532_OFFSET_DELAY   (2)
 
#define BMI160_GEN_READ_WRITE_DELAY   (1)
 
#define BMI160_YAS532_MEASUREMENT_DELAY   (25)
 
#define BMI160_YAS_ACQ_COMMAND_DELAY   (50)
 
#define BMI160_YAS532_SET_INITIAL_VALUE_DELAY   (200)
 
#define BMI160_AKM_INIT_DELAY   (60)
 
ARRAY SIZE DEFINITIONS
#define BMI160_ACCEL_X_DATA_SIZE   (2)
 
#define BMI160_ACCEL_Y_DATA_SIZE   (2)
 
#define BMI160_ACCEL_Z_DATA_SIZE   (2)
 
#define BMI160_ACCEL_XYZ_DATA_SIZE   (6)
 
#define BMI160_GYRO_X_DATA_SIZE   (2)
 
#define BMI160_GYRO_Y_DATA_SIZE   (2)
 
#define BMI160_GYRO_Z_DATA_SIZE   (2)
 
#define BMI160_GYRO_XYZ_DATA_SIZE   (6)
 
#define BMI160_MAG_X_DATA_SIZE   (2)
 
#define BMI160_MAG_Y_DATA_SIZE   (2)
 
#define BMI160_MAG_Z_DATA_SIZE   (2)
 
#define BMI160_MAG_R_DATA_SIZE   (2)
 
#define BMI160_MAG_XYZ_DATA_SIZE   (6)
 
#define BMI160_MAG_XYZR_DATA_SIZE   (8)
 
#define BMI160_MAG_TRIM_DATA_SIZE   (16)
 
#define BMI160_TEMP_DATA_SIZE   (2)
 
#define BMI160_FIFO_DATA_SIZE   (2)
 
#define BMI160_STEP_COUNT_DATA_SIZE   (2)
 
#define BMI160_SENSOR_TIME_DATA_SIZE   (3)
 
#define BMI160_AKM_SENSITIVITY_DATA_SIZE   (3)
 
#define BMI160_HARD_OFFSET_DATA_SIZE   (3)
 
#define BMI160_YAS_XY1Y2_DATA_SIZE   (3)
 
#define BMI160_YAS_FLAG_DATA_SIZE   (3)
 
#define BMI160_YAS_TEMP_DATA_SIZE   (3)
 
#define BMI160_YAS_H_DATA_SIZE   (3)
 
#define BMI160_YAS_S_DATA_SIZE   (3)
 
#define BMI160_YAS_CORRECT_DATA_SIZE   (5)
 
#define BMI160_YAS_XY1Y2T_DATA_SIZE   (8)
 
#define BMI160_YAS537_CALIB_DATA_SIZE   (17)
 
#define BMI160_YAS532_CALIB_DATA_SIZE   (14)
 
#define BMI160_GYRO_ACCEL_SENSORTIME_DATA_SIZE   (15)
 
#define BMI160_ACCEL_SENSORTIME_DATA_SIZE   (9)
 
#define BMI160_GYRO_ACCEL_SENSORTIME_DATA   (1)
 
#define BMI160_ACCEL_SENSORTIME_DATA   (0)
 
ARRAY PARAMETER DEFINITIONS
#define BMI160_SENSOR_TIME_MSB_BYTE   (2)
 
#define BMI160_SENSOR_TIME_XLSB_BYTE   (1)
 
#define BMI160_SENSOR_TIME_LSB_BYTE   (0)
 
#define BMI160_MAG_X_LSB_BYTE   (0)
 
#define BMI160_MAG_X_MSB_BYTE   (1)
 
#define BMI160_MAG_Y_LSB_BYTE   (0)
 
#define BMI160_MAG_Y_MSB_BYTE   (1)
 
#define BMI160_MAG_Z_LSB_BYTE   (0)
 
#define BMI160_MAG_Z_MSB_BYTE   (1)
 
#define BMI160_MAG_R_LSB_BYTE   (0)
 
#define BMI160_MAG_R_MSB_BYTE   (1)
 
#define BMI160_DATA_FRAME_MAG_X_LSB_BYTE   (0)
 
#define BMI160_DATA_FRAME_MAG_X_MSB_BYTE   (1)
 
#define BMI160_DATA_FRAME_MAG_Y_LSB_BYTE   (2)
 
#define BMI160_DATA_FRAME_MAG_Y_MSB_BYTE   (3)
 
#define BMI160_DATA_FRAME_MAG_Z_LSB_BYTE   (4)
 
#define BMI160_DATA_FRAME_MAG_Z_MSB_BYTE   (5)
 
#define BMI160_DATA_FRAME_MAG_R_LSB_BYTE   (6)
 
#define BMI160_DATA_FRAME_MAG_R_MSB_BYTE   (7)
 
#define BMI160_GYRO_X_LSB_BYTE   (0)
 
#define BMI160_GYRO_X_MSB_BYTE   (1)
 
#define BMI160_GYRO_Y_LSB_BYTE   (0)
 
#define BMI160_GYRO_Y_MSB_BYTE   (1)
 
#define BMI160_GYRO_Z_LSB_BYTE   (0)
 
#define BMI160_GYRO_Z_MSB_BYTE   (1)
 
#define BMI160_DATA_FRAME_GYRO_X_LSB_BYTE   (0)
 
#define BMI160_DATA_FRAME_GYRO_X_MSB_BYTE   (1)
 
#define BMI160_DATA_FRAME_GYRO_Y_LSB_BYTE   (2)
 
#define BMI160_DATA_FRAME_GYRO_Y_MSB_BYTE   (3)
 
#define BMI160_DATA_FRAME_GYRO_Z_LSB_BYTE   (4)
 
#define BMI160_DATA_FRAME_GYRO_Z_MSB_BYTE   (5)
 
#define BMI160_ACCEL_X_LSB_BYTE   (0)
 
#define BMI160_ACCEL_X_MSB_BYTE   (1)
 
#define BMI160_ACCEL_Y_LSB_BYTE   (0)
 
#define BMI160_ACCEL_Y_MSB_BYTE   (1)
 
#define BMI160_ACCEL_Z_LSB_BYTE   (0)
 
#define BMI160_ACCEL_Z_MSB_BYTE   (1)
 
#define BMI160_DATA_FRAME_ACCEL_X_LSB_BYTE   (0)
 
#define BMI160_DATA_FRAME_ACCEL_X_MSB_BYTE   (1)
 
#define BMI160_DATA_FRAME_ACCEL_Y_LSB_BYTE   (2)
 
#define BMI160_DATA_FRAME_ACCEL_Y_MSB_BYTE   (3)
 
#define BMI160_DATA_FRAME_ACCEL_Z_LSB_BYTE   (4)
 
#define BMI160_DATA_FRAME_ACCEL_Z_MSB_BYTE   (5)
 
#define BMI160_TEMP_LSB_BYTE   (0)
 
#define BMI160_TEMP_MSB_BYTE   (1)
 
#define BMI160_STEP_COUNT_LSB_BYTE   (0)
 
#define BMI160_STEP_COUNT_MSB_BYTE   (1)
 
ERROR CODES
#define E_BMI160_NULL_PTR   ((s8)-127)
 
#define E_BMI160_COMM_RES   ((s8)-1)
 
#define E_BMI160_OUT_OF_RANGE   ((s8)-2)
 
#define E_BMI160_BUSY   ((s8)-3)
 
#define SUCCESS   ((u8)0)
 
#define ERROR   ((s8)-1)
 
#define BMI160_NULL   (0)
 
#define BMI160_DELAY_SETTLING_TIME   (5)
 
#define BMI160_RETURN_FUNCTION_TYPE   s8
 
CHIP ID
#define BMI160_USER_CHIP_ID_ADDR   (0x00)
 
ERROR STATUS
#define BMI160_USER_ERROR_ADDR   (0X02)
 
POWER MODE STATUS
#define BMI160_USER_PMU_STAT_ADDR   (0X03)
 
MAG DATA REGISTERS
#define BMI160_USER_DATA_0_ADDR   (0X04)
 
#define BMI160_USER_DATA_1_ADDR   (0X05)
 
#define BMI160_USER_DATA_2_ADDR   (0X06)
 
#define BMI160_USER_DATA_3_ADDR   (0X07)
 
#define BMI160_USER_DATA_4_ADDR   (0X08)
 
#define BMI160_USER_DATA_5_ADDR   (0X09)
 
#define BMI160_USER_DATA_6_ADDR   (0X0A)
 
#define BMI160_USER_DATA_7_ADDR   (0X0B)
 
GYRO DATA REGISTERS
#define BMI160_USER_DATA_8_ADDR   (0X0C)
 
#define BMI160_USER_DATA_9_ADDR   (0X0D)
 
#define BMI160_USER_DATA_10_ADDR   (0X0E)
 
#define BMI160_USER_DATA_11_ADDR   (0X0F)
 
#define BMI160_USER_DATA_12_ADDR   (0X10)
 
#define BMI160_USER_DATA_13_ADDR   (0X11)
 
ACCEL DATA REGISTERS
#define BMI160_USER_DATA_14_ADDR   (0X12)
 
#define BMI160_USER_DATA_15_ADDR   (0X13)
 
#define BMI160_USER_DATA_16_ADDR   (0X14)
 
#define BMI160_USER_DATA_17_ADDR   (0X15)
 
#define BMI160_USER_DATA_18_ADDR   (0X16)
 
#define BMI160_USER_DATA_19_ADDR   (0X17)
 
SENSOR TIME REGISTERS
#define BMI160_USER_SENSORTIME_0_ADDR   (0X18)
 
#define BMI160_USER_SENSORTIME_1_ADDR   (0X19)
 
#define BMI160_USER_SENSORTIME_2_ADDR   (0X1A)
 
STATUS REGISTER FOR SENSOR STATUS FLAG
#define BMI160_USER_STAT_ADDR   (0X1B)
 
INTERRUPY STATUS REGISTERS
#define BMI160_USER_INTR_STAT_0_ADDR   (0X1C)
 
#define BMI160_USER_INTR_STAT_1_ADDR   (0X1D)
 
#define BMI160_USER_INTR_STAT_2_ADDR   (0X1E)
 
#define BMI160_USER_INTR_STAT_3_ADDR   (0X1F)
 
TEMPERATURE REGISTERS
#define BMI160_USER_TEMPERATURE_0_ADDR   (0X20)
 
#define BMI160_USER_TEMPERATURE_1_ADDR   (0X21)
 
FIFO REGISTERS
#define BMI160_USER_FIFO_LENGTH_0_ADDR   (0X22)
 
#define BMI160_USER_FIFO_LENGTH_1_ADDR   (0X23)
 
#define BMI160_USER_FIFO_DATA_ADDR   (0X24)
 
ACCEL CONFIG REGISTERS FOR ODR, BANDWIDTH AND UNDERSAMPLING
#define BMI160_USER_ACCEL_CONFIG_ADDR   (0X40)
 
ACCEL RANGE
#define BMI160_USER_ACCEL_RANGE_ADDR   (0X41)
 
#define BMI160_ACCEL_RANGE_2G   (0X03)
 
#define BMI160_ACCEL_RANGE_4G   (0X05)
 
#define BMI160_ACCEL_RANGE_8G   (0X08)
 
#define BMI160_ACCEL_RANGE_16G   (0X0C)
 
GYRO CONFIG REGISTERS FOR ODR AND BANDWIDTH
#define BMI160_USER_GYRO_CONFIG_ADDR   (0X42)
 
GYRO RANGE
#define BMI160_USER_GYRO_RANGE_ADDR   (0X43)
 
MAG CONFIG REGISTERS FOR ODR
#define BMI160_USER_MAG_CONFIG_ADDR   (0X44)
 
REGISTER FOR GYRO AND ACCEL DOWNSAMPLING RATES FOR FIFO
#define BMI160_USER_FIFO_DOWN_ADDR   (0X45)
 
FIFO CONFIG REGISTERS
#define BMI160_USER_FIFO_CONFIG_0_ADDR   (0X46)
 
#define BMI160_USER_FIFO_CONFIG_1_ADDR   (0X47)
 
MAG INTERFACE REGISTERS
#define BMI160_USER_MAG_IF_0_ADDR   (0X4B)
 
#define BMI160_USER_MAG_IF_1_ADDR   (0X4C)
 
#define BMI160_USER_MAG_IF_2_ADDR   (0X4D)
 
#define BMI160_USER_MAG_IF_3_ADDR   (0X4E)
 
#define BMI160_USER_MAG_IF_4_ADDR   (0X4F)
 
INTERRUPT ENABLE REGISTERS
#define BMI160_USER_INTR_ENABLE_0_ADDR   (0X50)
 
#define BMI160_USER_INTR_ENABLE_1_ADDR   (0X51)
 
#define BMI160_USER_INTR_ENABLE_2_ADDR   (0X52)
 
#define BMI160_USER_INTR_OUT_CTRL_ADDR   (0X53)
 
LATCH DURATION REGISTERS
#define BMI160_USER_INTR_LATCH_ADDR   (0X54)
 
MAP INTERRUPT 1 and 2 REGISTERS
#define BMI160_USER_INTR_MAP_0_ADDR   (0X55)
 
#define BMI160_USER_INTR_MAP_1_ADDR   (0X56)
 
#define BMI160_USER_INTR_MAP_2_ADDR   (0X57)
 
DATA SOURCE REGISTERS
#define BMI160_USER_INTR_DATA_0_ADDR   (0X58)
 
#define BMI160_USER_INTR_DATA_1_ADDR   (0X59)
 

INTERRUPT THRESHOLD, HYSTERESIS, DURATION, MODE CONFIGURATION REGISTERS

#define BMI160_USER_INTR_LOWHIGH_0_ADDR   (0X5A)
 
#define BMI160_USER_INTR_LOWHIGH_1_ADDR   (0X5B)
 
#define BMI160_USER_INTR_LOWHIGH_2_ADDR   (0X5C)
 
#define BMI160_USER_INTR_LOWHIGH_3_ADDR   (0X5D)
 
#define BMI160_USER_INTR_LOWHIGH_4_ADDR   (0X5E)
 
#define BMI160_USER_INTR_MOTION_0_ADDR   (0X5F)
 
#define BMI160_USER_INTR_MOTION_1_ADDR   (0X60)
 
#define BMI160_USER_INTR_MOTION_2_ADDR   (0X61)
 
#define BMI160_USER_INTR_MOTION_3_ADDR   (0X62)
 
#define BMI160_USER_INTR_TAP_0_ADDR   (0X63)
 
#define BMI160_USER_INTR_TAP_1_ADDR   (0X64)
 
#define BMI160_USER_INTR_ORIENT_0_ADDR   (0X65)
 
#define BMI160_USER_INTR_ORIENT_1_ADDR   (0X66)
 
#define BMI160_USER_INTR_FLAT_0_ADDR   (0X67)
 
#define BMI160_USER_INTR_FLAT_1_ADDR   (0X68)
 
FAST OFFSET CONFIGURATION REGISTER
#define BMI160_USER_FOC_CONFIG_ADDR   (0X69)
 
MISCELLANEOUS CONFIGURATION REGISTER
#define BMI160_USER_CONFIG_ADDR   (0X6A)
 
SERIAL INTERFACE SETTINGS REGISTER
#define BMI160_USER_IF_CONFIG_ADDR   (0X6B)
 
GYRO POWER MODE TRIGGER REGISTER
#define BMI160_USER_PMU_TRIGGER_ADDR   (0X6C)
 
SELF_TEST REGISTER
#define BMI160_USER_SELF_TEST_ADDR   (0X6D)
 
SPI,I2C SELECTION REGISTER
#define BMI160_USER_NV_CONFIG_ADDR   (0x70)
 
ACCEL AND GYRO OFFSET REGISTERS
#define BMI160_USER_OFFSET_0_ADDR   (0X71)
 
#define BMI160_USER_OFFSET_1_ADDR   (0X72)
 
#define BMI160_USER_OFFSET_2_ADDR   (0X73)
 
#define BMI160_USER_OFFSET_3_ADDR   (0X74)
 
#define BMI160_USER_OFFSET_4_ADDR   (0X75)
 
#define BMI160_USER_OFFSET_5_ADDR   (0X76)
 
#define BMI160_USER_OFFSET_6_ADDR   (0X77)
 
STEP COUNTER INTERRUPT REGISTERS
#define BMI160_USER_STEP_COUNT_0_ADDR   (0X78)
 
#define BMI160_USER_STEP_COUNT_1_ADDR   (0X79)
 
STEP COUNTER CONFIGURATION REGISTERS
#define BMI160_USER_STEP_CONFIG_0_ADDR   (0X7A)
 
#define BMI160_USER_STEP_CONFIG_1_ADDR   (0X7B)
 
COMMAND REGISTER
#define BMI160_CMD_COMMANDS_ADDR   (0X7E)
 
PAGE REGISTERS
#define BMI160_CMD_EXT_MODE_ADDR   (0X7F)
 
#define BMI160_COM_C_TRIM_FIVE_ADDR   (0X05)
 
SHIFT VALUE DEFINITION
#define BMI160_SHIFT_BIT_POSITION_BY_01_BIT   (1)
 
#define BMI160_SHIFT_BIT_POSITION_BY_02_BITS   (2)
 
#define BMI160_SHIFT_BIT_POSITION_BY_03_BITS   (3)
 
#define BMI160_SHIFT_BIT_POSITION_BY_04_BITS   (4)
 
#define BMI160_SHIFT_BIT_POSITION_BY_05_BITS   (5)
 
#define BMI160_SHIFT_BIT_POSITION_BY_06_BITS   (6)
 
#define BMI160_SHIFT_BIT_POSITION_BY_07_BITS   (7)
 
#define BMI160_SHIFT_BIT_POSITION_BY_08_BITS   (8)
 
#define BMI160_SHIFT_BIT_POSITION_BY_09_BITS   (9)
 
#define BMI160_SHIFT_BIT_POSITION_BY_12_BITS   (12)
 
#define BMI160_SHIFT_BIT_POSITION_BY_13_BITS   (13)
 
#define BMI160_SHIFT_BIT_POSITION_BY_14_BITS   (14)
 
#define BMI160_SHIFT_BIT_POSITION_BY_15_BITS   (15)
 
#define BMI160_SHIFT_BIT_POSITION_BY_16_BITS   (16)
 
DEFINITIONS USED FOR YAMAHA-YAS532
#define YAS532_MAG_STATE_NORMAL   (0)
 
#define YAS532_MAG_STATE_INIT_COIL   (1)
 
#define YAS532_MAG_STATE_MEASURE_OFFSET   (2)
 
#define YAS532_MAG_INITCOIL_TIMEOUT   (1000)
 
#define YAS532_MAG_NOTRANS_POSITION   (3)
 
#define YAS532_DEFAULT_SENSOR_DELAY   (50)
 
#define YAS532_DATA_OVERFLOW   (8190)
 
#define YAS532_DATA_UNDERFLOW   (0)
 
#define YAS532_MAG_TEMPERATURE_LOG   (10)
 
#define YAS532_TEMP20DEGREE_TYPICAL   (390)
 
#define YAS532_VERSION_AC_COEF_X   (850)
 
#define YAS532_VERSION_AC_COEF_Y1   (750)
 
#define YAS532_VERSION_AC_COEF_Y2   (750)
 
#define YAS532_DATA_CENTER   (4096)
 
YAS532 CALIB DATA DEFINITIONS
#define BMI160_YAS532_TESTR1   (0x88)
 
#define BMI160_YAS532_TESTR2   (0x89)
 
#define BMI160_YAS532_RCOIL   (0x81)
 
#define BMI160_YAS532_COMMAND_REGISTER   (0x82)
 
#define BMI160_YAS532_DATA_REGISTER   (0xB0)
 
#define BMI160_YAS532_CALIB_CX   (0x90)
 
#define BMI160_YAS532_CALIB_CY1   (0x91)
 
#define BMI160_YAS532_CALIB_CY2   (0x92)
 
#define BMI160_YAS532_CALIB1   (0x93)
 
#define BMI160_YAS532_CALIB2   (0x94)
 
#define BMI160_YAS532_CALIB3   (0x95)
 
#define BMI160_YAS532_CALIB4   (0x96)
 
#define BMI160_YAS532_CALIB5   (0x97)
 
#define BMI160_YAS532_CLAIB6   (0x98)
 
#define BMI160_YAS532_CALIB7   (0x99)
 
#define BMI160_YAS532_CALIB8   (0x9A)
 
#define BMI160_YAS532_CALIIB9   (0x9B)
 
#define BMI160_YAS532_CALIB10   (0x9C)
 
#define BMI160_YAS532_CALIB11   (0x9D)
 
#define BMI160_YAS532_OFFSET_X   (0x85)
 
#define BMI160_YAS532_OFFSET_Y   (0x86)
 
#define BMI160_YAS532_OFFSET_Z   (0x87)
 
#define BMI160_YAS532_WRITE_TESTR1   (0x00)
 
#define BMI160_YAS532_WRITE_TESTR2   (0x00)
 
#define BMI160_YAS532_WRITE_RCOIL   (0x00)
 
YAS537 DEFINITION
#define YAS537_SRSTR_DATA   (0x02)
 
#define YAS537_WRITE_A_D_CONVERTER   (0x03)
 
#define YAS537_WRITE_A_D_CONVERTER2   (0xF8)
 
#define YAS537_WRITE_FILTER   (0x08)
 
#define YAS537_WRITE_CONFR   (0x08)
 
#define YAS537_WRITE_TEMP_CALIB   (0xFF)
 
#define YAS537_SET_COMMAND_REGISTER   (0x01)
 
YAS537 REGISTER DEFINITION
#define YAS537_REG_SRSTR   (0x90)
 
#define YAS537_REG_CALR_C0   (0xC0)
 
#define YAS537_REG_CALR_C1   (0xC1)
 
#define YAS537_REG_CALR_C2   (0xC2)
 
#define YAS537_REG_CALR_C3   (0xC3)
 
#define YAS537_REG_CALR_C4   (0xC4)
 
#define YAS537_REG_CALR_C5   (0xC5)
 
#define YAS537_REG_CALR_C6   (0xC6)
 
#define YAS537_REG_CALR_C7   (0xC7)
 
#define YAS537_REG_CALR_C8   (0xC8)
 
#define YAS537_REG_CALR_C9   (0xC9)
 
#define YAS537_REG_CALR_CA   (0xCA)
 
#define YAS537_REG_CALR_CB   (0xCB)
 
#define YAS537_REG_CALR_CC   (0xCC)
 
#define YAS537_REG_CALR_CD   (0xCD)
 
#define YAS537_REG_CALR_CE   (0xCE)
 
#define YAS537_REG_CALR_CF   (0xCF)
 
#define YAS537_REG_CALR_DO   (0xD0)
 
#define YAS537_REG_MTCR   (0x93)
 
#define YAS537_REG_CONFR   (0x82)
 
#define BMI160_REG_YAS537_CMDR   (0x81)
 
#define YAS537_REG_OXR   (0x84)
 
#define YAS537_REG_AVRR   (0x87)
 
#define YAS537_REG_HCKR   (0x88)
 
#define YAS537_REG_LCKR   (0x89)
 
#define YAS537_REG_ADCCALR   (0x91)
 
#define YAS537_REG_ADCCALR_ONE   (0x92)
 
#define YAS537_REG_OCR   (0x9E)
 
#define YAS537_REG_TRMR   (0x9F)
 
#define YAS537_REG_TEMPERATURE_0   (0xB0)
 
#define YAS537_REG_TEMPERATURE_1   (0xB1)
 
#define YAS537_REG_DATA_X_0   (0xB2)
 
#define YAS537_REG_DATA_X_1   (0xB3)
 
#define YAS537_REG_DATA_Y1_0   (0xB4)
 
#define YAS537_REG_DATA_Y1_1   (0xB5)
 
#define YAS537_REG_DATA_Y2_0   (0xB6)
 
#define YAS537_REG_DATA_Y2_1   (0xB7)
 
#define YAS537_MAG_STATE_NORMAL   (0)
 
#define YAS537_MAG_STATE_INIT_COIL   (1)
 
#define YAS537_MAG_STATE_RECORD_DATA   (2)
 
#define YAS537_DATA_UNDERFLOW   (0)
 
#define YAS537_DATA_OVERFLOW   (16383)
 
YAS537_set vector
#define yas537_set_vector(to, from)   {int _l; for (_l = 0; _l < 3; _l++) (to)[_l] = (from)[_l]; }
 
#define ABS(a)   ((a) > 0 ? (a) : -(a))
 
AKM09911 AND AKM09912 DEFINITION
#define AKM09912_SENSITIVITY_DIV   (256)
 
#define AKM09912_SENSITIVITY   (128)
 
#define AKM09911_SENSITIVITY_DIV   (128)
 
#define AKM_ASAX   (0)
 
#define AKM_ASAY   (1)
 
#define AKM_ASAZ   (2)
 
#define AKM_POWER_DOWN_MODE_DATA   (0x00)
 
#define AKM_FUSE_ROM_MODE   (0x1F)
 
#define AKM_POWER_MODE_REG   (0x31)
 
#define AKM_SINGLE_MEASUREMENT_MODE   (0x01)
 
#define AKM_DATA_REGISTER   (0x11)
 
#define AKM_CHIP_ID_REG   (0x01)
 
BMM150 DEFINITION
#define BMI160_BMM150_SET_POWER_CONTROL   (0x01)
 
#define BMI160_BMM150_MAX_RETRY_WAKEUP   (5)
 
#define BMI160_BMM150_POWER_ON   (0x01)
 
#define BMI160_BMM150_POWER_OFF   (0x00)
 
#define BMI160_BMM150_FORCE_MODE   (0x02)
 
#define BMI160_BMM150_POWER_ON_SUCCESS   (0)
 
#define BMI160_BMM150_POWER_ON_FAIL   ((s8)-1)
 
#define BMI160_BMM150_DIG_X1   (0)
 
#define BMI160_BMM150_DIG_Y1   (1)
 
#define BMI160_BMM150_DIG_X2   (2)
 
#define BMI160_BMM150_DIG_Y3   (3)
 
#define BMI160_BMM150_DIG_XY1   (4)
 
#define BMI160_BMM150_DIG_XY2   (5)
 
#define BMI160_BMM150_DIG_Z1_LSB   (6)
 
#define BMI160_BMM150_DIG_Z1_MSB   (7)
 
#define BMI160_BMM150_DIG_Z2_LSB   (8)
 
#define BMI160_BMM150_DIG_Z2_MSB   (9)
 
#define BMI160_BMM150_DIG_DIG_Z3_LSB   (10)
 
#define BMI160_BMM150_DIG_DIG_Z3_MSB   (11)
 
#define BMI160_BMM150_DIG_DIG_Z4_LSB   (12)
 
#define BMI160_BMM150_DIG_DIG_Z4_MSB   (13)
 
#define BMI160_BMM150_DIG_DIG_XYZ1_LSB   (14)
 
#define BMI160_BMM150_DIG_DIG_XYZ1_MSB   (15)
 
#define BMI160_FIFO_FRAME_CNT   (146)
 
#define BMI160_FRAME_COUNT   (1)
 
CHIP ID LENGTH, POSITION AND MASK
#define BMI160_USER_CHIP_ID__POS   (0)
 
#define BMI160_USER_CHIP_ID__MSK   (0xFF)
 
#define BMI160_USER_CHIP_ID__LEN   (8)
 
#define BMI160_USER_CHIP_ID__REG   (BMI160_USER_CHIP_ID_ADDR)
 
ERROR STATUS LENGTH, POSITION AND MASK
#define BMI160_USER_ERR_STAT__POS   (0)
 
#define BMI160_USER_ERR_STAT__LEN   (8)
 
#define BMI160_USER_ERR_STAT__MSK   (0xFF)
 
#define BMI160_USER_ERR_STAT__REG   (BMI160_USER_ERROR_ADDR)
 
#define BMI160_USER_FATAL_ERR__POS   (0)
 
#define BMI160_USER_FATAL_ERR__LEN   (1)
 
#define BMI160_USER_FATAL_ERR__MSK   (0x01)
 
#define BMI160_USER_FATAL_ERR__REG   (BMI160_USER_ERROR_ADDR)
 
#define BMI160_USER_ERR_CODE__POS   (1)
 
#define BMI160_USER_ERR_CODE__LEN   (4)
 
#define BMI160_USER_ERR_CODE__MSK   (0x1E)
 
#define BMI160_USER_ERR_CODE__REG   (BMI160_USER_ERROR_ADDR)
 
#define BMI160_USER_I2C_FAIL_ERR__POS   (5)
 
#define BMI160_USER_I2C_FAIL_ERR__LEN   (1)
 
#define BMI160_USER_I2C_FAIL_ERR__MSK   (0x20)
 
#define BMI160_USER_I2C_FAIL_ERR__REG   (BMI160_USER_ERROR_ADDR)
 
#define BMI160_USER_DROP_CMD_ERR__POS   (6)
 
#define BMI160_USER_DROP_CMD_ERR__LEN   (1)
 
#define BMI160_USER_DROP_CMD_ERR__MSK   (0x40)
 
#define BMI160_USER_DROP_CMD_ERR__REG   (BMI160_USER_ERROR_ADDR)
 
MAG DATA READY LENGTH, POSITION AND MASK
#define BMI160_USER_MAG_DATA_RDY_ERR__POS   (7)
 
#define BMI160_USER_MAG_DATA_RDY_ERR__LEN   (1)
 
#define BMI160_USER_MAG_DATA_RDY_ERR__MSK   (0x80)
 
#define BMI160_USER_MAG_DATA_RDY_ERR__REG   (BMI160_USER_ERROR_ADDR)
 
MAG POWER MODE LENGTH, POSITION AND MASK
#define BMI160_USER_MAG_POWER_MODE_STAT__POS   (0)
 
#define BMI160_USER_MAG_POWER_MODE_STAT__LEN   (2)
 
#define BMI160_USER_MAG_POWER_MODE_STAT__MSK   (0x03)
 
#define BMI160_USER_MAG_POWER_MODE_STAT__REG   (BMI160_USER_PMU_STAT_ADDR)
 
GYRO POWER MODE LENGTH, POSITION AND MASK
#define BMI160_USER_GYRO_POWER_MODE_STAT__POS   (2)
 
#define BMI160_USER_GYRO_POWER_MODE_STAT__LEN   (2)
 
#define BMI160_USER_GYRO_POWER_MODE_STAT__MSK   (0x0C)
 
#define BMI160_USER_GYRO_POWER_MODE_STAT__REG   (BMI160_USER_PMU_STAT_ADDR)
 
ACCEL POWER MODE LENGTH, POSITION AND MASK
#define BMI160_USER_ACCEL_POWER_MODE_STAT__POS   (4)
 
#define BMI160_USER_ACCEL_POWER_MODE_STAT__LEN   (2)
 
#define BMI160_USER_ACCEL_POWER_MODE_STAT__MSK   (0x30)
 
#define BMI160_USER_ACCEL_POWER_MODE_STAT__REG   (BMI160_USER_PMU_STAT_ADDR)
 
MAG DATA XYZ LENGTH, POSITION AND MASK
#define BMI160_USER_DATA_0_MAG_X_LSB__POS   (0)
 
#define BMI160_USER_DATA_0_MAG_X_LSB__LEN   (8)
 
#define BMI160_USER_DATA_0_MAG_X_LSB__MSK   (0xFF)
 
#define BMI160_USER_DATA_0_MAG_X_LSB__REG   (BMI160_USER_DATA_0_ADDR)
 
#define BMI160_USER_DATA_MAG_X_LSB__POS   (3)
 
#define BMI160_USER_DATA_MAG_X_LSB__LEN   (5)
 
#define BMI160_USER_DATA_MAG_X_LSB__MSK   (0xF8)
 
#define BMI160_USER_DATA_MAG_X_LSB__REG   (BMI160_USER_DATA_0_ADDR)
 
#define BMI160_USER_DATA_1_MAG_X_MSB__POS   (0)
 
#define BMI160_USER_DATA_1_MAG_X_MSB__LEN   (8)
 
#define BMI160_USER_DATA_1_MAG_X_MSB__MSK   (0xFF)
 
#define BMI160_USER_DATA_1_MAG_X_MSB__REG   (BMI160_USER_DATA_1_ADDR)
 
#define BMI160_USER_DATA_2_MAG_Y_LSB__POS   (0)
 
#define BMI160_USER_DATA_2_MAG_Y_LSB__LEN   (8)
 
#define BMI160_USER_DATA_2_MAG_Y_LSB__MSK   (0xFF)
 
#define BMI160_USER_DATA_2_MAG_Y_LSB__REG   (BMI160_USER_DATA_2_ADDR)
 
#define BMI160_USER_DATA_MAG_Y_LSB__POS   (3)
 
#define BMI160_USER_DATA_MAG_Y_LSB__LEN   (5)
 
#define BMI160_USER_DATA_MAG_Y_LSB__MSK   (0xF8)
 
#define BMI160_USER_DATA_MAG_Y_LSB__REG   (BMI160_USER_DATA_2_ADDR)
 
#define BMI160_USER_DATA_3_MAG_Y_MSB__POS   (0)
 
#define BMI160_USER_DATA_3_MAG_Y_MSB__LEN   (8)
 
#define BMI160_USER_DATA_3_MAG_Y_MSB__MSK   (0xFF)
 
#define BMI160_USER_DATA_3_MAG_Y_MSB__REG   (BMI160_USER_DATA_3_ADDR)
 
#define BMI160_USER_DATA_4_MAG_Z_LSB__POS   (0)
 
#define BMI160_USER_DATA_4_MAG_Z_LSB__LEN   (8)
 
#define BMI160_USER_DATA_4_MAG_Z_LSB__MSK   (0xFF)
 
#define BMI160_USER_DATA_4_MAG_Z_LSB__REG   (BMI160_USER_DATA_4_ADDR)
 
#define BMI160_USER_DATA_MAG_Z_LSB__POS   (1)
 
#define BMI160_USER_DATA_MAG_Z_LSB__LEN   (7)
 
#define BMI160_USER_DATA_MAG_Z_LSB__MSK   (0xFE)
 
#define BMI160_USER_DATA_MAG_Z_LSB__REG   (BMI160_USER_DATA_4_ADDR)
 
#define BMI160_USER_DATA_5_MAG_Z_MSB__POS   (0)
 
#define BMI160_USER_DATA_5_MAG_Z_MSB__LEN   (8)
 
#define BMI160_USER_DATA_5_MAG_Z_MSB__MSK   (0xFF)
 
#define BMI160_USER_DATA_5_MAG_Z_MSB__REG   (BMI160_USER_DATA_5_ADDR)
 
#define BMI160_USER_DATA_6_RHALL_LSB__POS   (0)
 
#define BMI160_USER_DATA_6_RHALL_LSB__LEN   (8)
 
#define BMI160_USER_DATA_6_RHALL_LSB__MSK   (0xFF)
 
#define BMI160_USER_DATA_6_RHALL_LSB__REG   (BMI160_USER_DATA_6_ADDR)
 
#define BMI160_USER_DATA_MAG_R_LSB__POS   (2)
 
#define BMI160_USER_DATA_MAG_R_LSB__LEN   (6)
 
#define BMI160_USER_DATA_MAG_R_LSB__MSK   (0xFC)
 
#define BMI160_USER_DATA_MAG_R_LSB__REG   (BMI160_USER_DATA_6_ADDR)
 
#define BMI160_USER_DATA_7_RHALL_MSB__POS   (0)
 
#define BMI160_USER_DATA_7_RHALL_MSB__LEN   (8)
 
#define BMI160_USER_DATA_7_RHALL_MSB__MSK   (0xFF)
 
#define BMI160_USER_DATA_7_RHALL_MSB__REG   (BMI160_USER_DATA_7_ADDR)
 
GYRO DATA XYZ LENGTH, POSITION AND MASK
#define BMI160_USER_DATA_8_GYRO_X_LSB__POS   (0)
 
#define BMI160_USER_DATA_8_GYRO_X_LSB__LEN   (8)
 
#define BMI160_USER_DATA_8_GYRO_X_LSB__MSK   (0xFF)
 
#define BMI160_USER_DATA_8_GYRO_X_LSB__REG   (BMI160_USER_DATA_8_ADDR)
 
#define BMI160_USER_DATA_9_GYRO_X_MSB__POS   (0)
 
#define BMI160_USER_DATA_9_GYRO_X_MSB__LEN   (8)
 
#define BMI160_USER_DATA_9_GYRO_X_MSB__MSK   (0xFF)
 
#define BMI160_USER_DATA_9_GYRO_X_MSB__REG   (BMI160_USER_DATA_9_ADDR)
 
#define BMI160_USER_DATA_10_GYRO_Y_LSB__POS   (0)
 
#define BMI160_USER_DATA_10_GYRO_Y_LSB__LEN   (8)
 
#define BMI160_USER_DATA_10_GYRO_Y_LSB__MSK   (0xFF)
 
#define BMI160_USER_DATA_10_GYRO_Y_LSB__REG   (BMI160_USER_DATA_10_ADDR)
 
#define BMI160_USER_DATA_11_GYRO_Y_MSB__POS   (0)
 
#define BMI160_USER_DATA_11_GYRO_Y_MSB__LEN   (8)
 
#define BMI160_USER_DATA_11_GYRO_Y_MSB__MSK   (0xFF)
 
#define BMI160_USER_DATA_11_GYRO_Y_MSB__REG   (BMI160_USER_DATA_11_ADDR)
 
#define BMI160_USER_DATA_12_GYRO_Z_LSB__POS   (0)
 
#define BMI160_USER_DATA_12_GYRO_Z_LSB__LEN   (8)
 
#define BMI160_USER_DATA_12_GYRO_Z_LSB__MSK   (0xFF)
 
#define BMI160_USER_DATA_12_GYRO_Z_LSB__REG   (BMI160_USER_DATA_12_ADDR)
 
#define BMI160_USER_DATA_13_GYRO_Z_MSB__POS   (0)
 
#define BMI160_USER_DATA_13_GYRO_Z_MSB__LEN   (8)
 
#define BMI160_USER_DATA_13_GYRO_Z_MSB__MSK   (0xFF)
 
#define BMI160_USER_DATA_13_GYRO_Z_MSB__REG   (BMI160_USER_DATA_13_ADDR)
 
ACCEL DATA XYZ LENGTH, POSITION AND MASK
#define BMI160_USER_DATA_14_ACCEL_X_LSB__POS   (0)
 
#define BMI160_USER_DATA_14_ACCEL_X_LSB__LEN   (8)
 
#define BMI160_USER_DATA_14_ACCEL_X_LSB__MSK   (0xFF)
 
#define BMI160_USER_DATA_14_ACCEL_X_LSB__REG   (BMI160_USER_DATA_14_ADDR)
 
#define BMI160_USER_DATA_15_ACCEL_X_MSB__POS   (0)
 
#define BMI160_USER_DATA_15_ACCEL_X_MSB__LEN   (8)
 
#define BMI160_USER_DATA_15_ACCEL_X_MSB__MSK   (0xFF)
 
#define BMI160_USER_DATA_15_ACCEL_X_MSB__REG   (BMI160_USER_DATA_15_ADDR)
 
#define BMI160_USER_DATA_16_ACCEL_Y_LSB__POS   (0)
 
#define BMI160_USER_DATA_16_ACCEL_Y_LSB__LEN   (8)
 
#define BMI160_USER_DATA_16_ACCEL_Y_LSB__MSK   (0xFF)
 
#define BMI160_USER_DATA_16_ACCEL_Y_LSB__REG   (BMI160_USER_DATA_16_ADDR)
 
#define BMI160_USER_DATA_17_ACCEL_Y_MSB__POS   (0)
 
#define BMI160_USER_DATA_17_ACCEL_Y_MSB__LEN   (8)
 
#define BMI160_USER_DATA_17_ACCEL_Y_MSB__MSK   (0xFF)
 
#define BMI160_USER_DATA_17_ACCEL_Y_MSB__REG   (BMI160_USER_DATA_17_ADDR)
 
#define BMI160_USER_DATA_18_ACCEL_Z_LSB__POS   (0)
 
#define BMI160_USER_DATA_18_ACCEL_Z_LSB__LEN   (8)
 
#define BMI160_USER_DATA_18_ACCEL_Z_LSB__MSK   (0xFF)
 
#define BMI160_USER_DATA_18_ACCEL_Z_LSB__REG   (BMI160_USER_DATA_18_ADDR)
 
#define BMI160_USER_DATA_19_ACCEL_Z_MSB__POS   (0)
 
#define BMI160_USER_DATA_19_ACCEL_Z_MSB__LEN   (8)
 
#define BMI160_USER_DATA_19_ACCEL_Z_MSB__MSK   (0xFF)
 
#define BMI160_USER_DATA_19_ACCEL_Z_MSB__REG   (BMI160_USER_DATA_19_ADDR)
 
SENSOR TIME LENGTH, POSITION AND MASK
#define BMI160_USER_SENSORTIME_0_SENSOR_TIME_LSB__POS   (0)
 
#define BMI160_USER_SENSORTIME_0_SENSOR_TIME_LSB__LEN   (8)
 
#define BMI160_USER_SENSORTIME_0_SENSOR_TIME_LSB__MSK   (0xFF)
 
#define BMI160_USER_SENSORTIME_0_SENSOR_TIME_LSB__REG   (BMI160_USER_SENSORTIME_0_ADDR)
 
#define BMI160_USER_SENSORTIME_1_SENSOR_TIME_MSB__POS   (0)
 
#define BMI160_USER_SENSORTIME_1_SENSOR_TIME_MSB__LEN   (8)
 
#define BMI160_USER_SENSORTIME_1_SENSOR_TIME_MSB__MSK   (0xFF)
 
#define BMI160_USER_SENSORTIME_1_SENSOR_TIME_MSB__REG   (BMI160_USER_SENSORTIME_1_ADDR)
 
#define BMI160_USER_SENSORTIME_2_SENSOR_TIME_MSB__POS   (0)
 
#define BMI160_USER_SENSORTIME_2_SENSOR_TIME_MSB__LEN   (8)
 
#define BMI160_USER_SENSORTIME_2_SENSOR_TIME_MSB__MSK   (0xFF)
 
#define BMI160_USER_SENSORTIME_2_SENSOR_TIME_MSB__REG   (BMI160_USER_SENSORTIME_2_ADDR)
 
GYRO SELF TEST LENGTH, POSITION AND MASK
#define BMI160_USER_STAT_GYRO_SELFTEST_OK__POS   (1)
 
#define BMI160_USER_STAT_GYRO_SELFTEST_OK__LEN   (1)
 
#define BMI160_USER_STAT_GYRO_SELFTEST_OK__MSK   (0x02)
 
#define BMI160_USER_STAT_GYRO_SELFTEST_OK__REG   (BMI160_USER_STAT_ADDR)
 
#define BMI160_USER_GYRO_SELFTEST_START__POS   (4)
 
#define BMI160_USER_GYRO_SELFTEST_START__LEN   (1)
 
#define BMI160_USER_GYRO_SELFTEST_START__MSK   (0x10)
 
#define BMI160_USER_GYRO_SELFTEST_START__REG   (BMI160_USER_SELF_TEST_ADDR)
 
MAG MANUAL OPERATION LENGTH, POSITION AND MASK
#define BMI160_USER_STAT_MAG_MANUAL_OPERATION__POS   (2)
 
#define BMI160_USER_STAT_MAG_MANUAL_OPERATION__LEN   (1)
 
#define BMI160_USER_STAT_MAG_MANUAL_OPERATION__MSK   (0x04)
 
#define BMI160_USER_STAT_MAG_MANUAL_OPERATION__REG   (BMI160_USER_STAT_ADDR)
 
FOC STATUS LENGTH, POSITION AND MASK
#define BMI160_USER_STAT_FOC_RDY__POS   (3)
 
#define BMI160_USER_STAT_FOC_RDY__LEN   (1)
 
#define BMI160_USER_STAT_FOC_RDY__MSK   (0x08)
 
#define BMI160_USER_STAT_FOC_RDY__REG   (BMI160_USER_STAT_ADDR)
 
NVM READY LENGTH, POSITION AND MASK
#define BMI160_USER_STAT_NVM_RDY__POS   (4)
 
#define BMI160_USER_STAT_NVM_RDY__LEN   (1)
 
#define BMI160_USER_STAT_NVM_RDY__MSK   (0x10)
 
#define BMI160_USER_STAT_NVM_RDY__REG   (BMI160_USER_STAT_ADDR)
 
DATA READY LENGTH, POSITION AND MASK FOR ACCEL, MAG AND GYRO
#define BMI160_USER_STAT_DATA_RDY_MAG__POS   (5)
 
#define BMI160_USER_STAT_DATA_RDY_MAG__LEN   (1)
 
#define BMI160_USER_STAT_DATA_RDY_MAG__MSK   (0x20)
 
#define BMI160_USER_STAT_DATA_RDY_MAG__REG   (BMI160_USER_STAT_ADDR)
 
#define BMI160_USER_STAT_DATA_RDY_GYRO__POS   (6)
 
#define BMI160_USER_STAT_DATA_RDY_GYRO__LEN   (1)
 
#define BMI160_USER_STAT_DATA_RDY_GYRO__MSK   (0x40)
 
#define BMI160_USER_STAT_DATA_RDY_GYRO__REG   (BMI160_USER_STAT_ADDR)
 
#define BMI160_USER_STAT_DATA_RDY_ACCEL__POS   (7)
 
#define BMI160_USER_STAT_DATA_RDY_ACCEL__LEN   (1)
 
#define BMI160_USER_STAT_DATA_RDY_ACCEL__MSK   (0x80)
 
#define BMI160_USER_STAT_DATA_RDY_ACCEL__REG   (BMI160_USER_STAT_ADDR)
 
INTERRUPT STATUS LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_STAT_0_STEP_INTR__POS   (0)
 
#define BMI160_USER_INTR_STAT_0_STEP_INTR__LEN   (1)
 
#define BMI160_USER_INTR_STAT_0_STEP_INTR__MSK   (0x01)
 
#define BMI160_USER_INTR_STAT_0_STEP_INTR__REG   (BMI160_USER_INTR_STAT_0_ADDR)
 
SIGNIFICANT INTERRUPT STATUS LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_STAT_0_SIGNIFICANT_INTR__POS   (1)
 
#define BMI160_USER_INTR_STAT_0_SIGNIFICANT_INTR__LEN   (1)
 
#define BMI160_USER_INTR_STAT_0_SIGNIFICANT_INTR__MSK   (0x02)
 
#define BMI160_USER_INTR_STAT_0_SIGNIFICANT_INTR__REG   (BMI160_USER_INTR_STAT_0_ADDR)
 
ANY_MOTION INTERRUPT STATUS LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_STAT_0_ANY_MOTION__POS   (2)
 
#define BMI160_USER_INTR_STAT_0_ANY_MOTION__LEN   (1)
 
#define BMI160_USER_INTR_STAT_0_ANY_MOTION__MSK   (0x04)
 
#define BMI160_USER_INTR_STAT_0_ANY_MOTION__REG   (BMI160_USER_INTR_STAT_0_ADDR)
 
PMU TRIGGER INTERRUPT STATUS LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_STAT_0_PMU_TRIGGER__POS   3
 
#define BMI160_USER_INTR_STAT_0_PMU_TRIGGER__LEN   (1)
 
#define BMI160_USER_INTR_STAT_0_PMU_TRIGGER__MSK   (0x08)
 
#define BMI160_USER_INTR_STAT_0_PMU_TRIGGER__REG   (BMI160_USER_INTR_STAT_0_ADDR)
 
DOUBLE TAP INTERRUPT STATUS LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_STAT_0_DOUBLE_TAP_INTR__POS   4
 
#define BMI160_USER_INTR_STAT_0_DOUBLE_TAP_INTR__LEN   (1)
 
#define BMI160_USER_INTR_STAT_0_DOUBLE_TAP_INTR__MSK   (0x10)
 
#define BMI160_USER_INTR_STAT_0_DOUBLE_TAP_INTR__REG   (BMI160_USER_INTR_STAT_0_ADDR)
 
SINGLE TAP INTERRUPT STATUS LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_STAT_0_SINGLE_TAP_INTR__POS   5
 
#define BMI160_USER_INTR_STAT_0_SINGLE_TAP_INTR__LEN   (1)
 
#define BMI160_USER_INTR_STAT_0_SINGLE_TAP_INTR__MSK   (0x20)
 
#define BMI160_USER_INTR_STAT_0_SINGLE_TAP_INTR__REG   (BMI160_USER_INTR_STAT_0_ADDR)
 
ORIENT INTERRUPT STATUS LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_STAT_0_ORIENT__POS   (6)
 
#define BMI160_USER_INTR_STAT_0_ORIENT__LEN   (1)
 
#define BMI160_USER_INTR_STAT_0_ORIENT__MSK   (0x40)
 
#define BMI160_USER_INTR_STAT_0_ORIENT__REG   (BMI160_USER_INTR_STAT_0_ADDR)
 
FLAT INTERRUPT STATUS LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_STAT_0_FLAT__POS   (7)
 
#define BMI160_USER_INTR_STAT_0_FLAT__LEN   (1)
 
#define BMI160_USER_INTR_STAT_0_FLAT__MSK   (0x80)
 
#define BMI160_USER_INTR_STAT_0_FLAT__REG   (BMI160_USER_INTR_STAT_0_ADDR)
 
HIGH_G INTERRUPT STATUS LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_STAT_1_HIGH_G_INTR__POS   (2)
 
#define BMI160_USER_INTR_STAT_1_HIGH_G_INTR__LEN   (1)
 
#define BMI160_USER_INTR_STAT_1_HIGH_G_INTR__MSK   (0x04)
 
#define BMI160_USER_INTR_STAT_1_HIGH_G_INTR__REG   (BMI160_USER_INTR_STAT_1_ADDR)
 
LOW_G INTERRUPT STATUS LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_STAT_1_LOW_G_INTR__POS   (3)
 
#define BMI160_USER_INTR_STAT_1_LOW_G_INTR__LEN   (1)
 
#define BMI160_USER_INTR_STAT_1_LOW_G_INTR__MSK   (0x08)
 
#define BMI160_USER_INTR_STAT_1_LOW_G_INTR__REG   (BMI160_USER_INTR_STAT_1_ADDR)
 
DATA READY INTERRUPT STATUS LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_STAT_1_DATA_RDY_INTR__POS   (4)
 
#define BMI160_USER_INTR_STAT_1_DATA_RDY_INTR__LEN   (1)
 
#define BMI160_USER_INTR_STAT_1_DATA_RDY_INTR__MSK   (0x10)
 
#define BMI160_USER_INTR_STAT_1_DATA_RDY_INTR__REG   (BMI160_USER_INTR_STAT_1_ADDR)
 
FIFO FULL INTERRUPT STATUS LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_STAT_1_FIFO_FULL_INTR__POS   (5)
 
#define BMI160_USER_INTR_STAT_1_FIFO_FULL_INTR__LEN   (1)
 
#define BMI160_USER_INTR_STAT_1_FIFO_FULL_INTR__MSK   (0x20)
 
#define BMI160_USER_INTR_STAT_1_FIFO_FULL_INTR__REG   (BMI160_USER_INTR_STAT_1_ADDR)
 
FIFO WATERMARK INTERRUPT STATUS LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_STAT_1_FIFO_WM_INTR__POS   (6)
 
#define BMI160_USER_INTR_STAT_1_FIFO_WM_INTR__LEN   (1)
 
#define BMI160_USER_INTR_STAT_1_FIFO_WM_INTR__MSK   (0x40)
 
#define BMI160_USER_INTR_STAT_1_FIFO_WM_INTR__REG   (BMI160_USER_INTR_STAT_1_ADDR)
 
NO MOTION INTERRUPT STATUS LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_STAT_1_NOMOTION_INTR__POS   (7)
 
#define BMI160_USER_INTR_STAT_1_NOMOTION_INTR__LEN   (1)
 
#define BMI160_USER_INTR_STAT_1_NOMOTION_INTR__MSK   (0x80)
 
#define BMI160_USER_INTR_STAT_1_NOMOTION_INTR__REG   (BMI160_USER_INTR_STAT_1_ADDR)
 
ANY MOTION-XYZ AXIS INTERRUPT STATUS LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_X__POS   (0)
 
#define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_X__LEN   (1)
 
#define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_X__MSK   (0x01)
 
#define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_X__REG   (BMI160_USER_INTR_STAT_2_ADDR)
 
#define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Y__POS   (1)
 
#define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Y__LEN   (1)
 
#define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Y__MSK   (0x02)
 
#define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Y__REG   (BMI160_USER_INTR_STAT_2_ADDR)
 
#define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Z__POS   (2)
 
#define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Z__LEN   (1)
 
#define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Z__MSK   (0x04)
 
#define BMI160_USER_INTR_STAT_2_ANY_MOTION_FIRST_Z__REG   (BMI160_USER_INTR_STAT_2_ADDR)
 
ANY MOTION SIGN LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_STAT_2_ANY_MOTION_SIGN__POS   (3)
 
#define BMI160_USER_INTR_STAT_2_ANY_MOTION_SIGN__LEN   (1)
 
#define BMI160_USER_INTR_STAT_2_ANY_MOTION_SIGN__MSK   (0x08)
 
#define BMI160_USER_INTR_STAT_2_ANY_MOTION_SIGN__REG   (BMI160_USER_INTR_STAT_2_ADDR)
 
TAP_XYZ AND SIGN LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_STAT_2_TAP_FIRST_X__POS   (4)
 
#define BMI160_USER_INTR_STAT_2_TAP_FIRST_X__LEN   (1)
 
#define BMI160_USER_INTR_STAT_2_TAP_FIRST_X__MSK   (0x10)
 
#define BMI160_USER_INTR_STAT_2_TAP_FIRST_X__REG   (BMI160_USER_INTR_STAT_2_ADDR)
 
#define BMI160_USER_INTR_STAT_2_TAP_FIRST_Y__POS   (5)
 
#define BMI160_USER_INTR_STAT_2_TAP_FIRST_Y__LEN   (1)
 
#define BMI160_USER_INTR_STAT_2_TAP_FIRST_Y__MSK   (0x20)
 
#define BMI160_USER_INTR_STAT_2_TAP_FIRST_Y__REG   (BMI160_USER_INTR_STAT_2_ADDR)
 
#define BMI160_USER_INTR_STAT_2_TAP_FIRST_Z__POS   (6)
 
#define BMI160_USER_INTR_STAT_2_TAP_FIRST_Z__LEN   (1)
 
#define BMI160_USER_INTR_STAT_2_TAP_FIRST_Z__MSK   (0x40)
 
#define BMI160_USER_INTR_STAT_2_TAP_FIRST_Z__REG   (BMI160_USER_INTR_STAT_2_ADDR)
 
#define BMI160_USER_INTR_STAT_2_TAP_SIGN__POS   (7)
 
#define BMI160_USER_INTR_STAT_2_TAP_SIGN__LEN   (1)
 
#define BMI160_USER_INTR_STAT_2_TAP_SIGN__MSK   (0x80)
 
#define BMI160_USER_INTR_STAT_2_TAP_SIGN__REG   (BMI160_USER_INTR_STAT_2_ADDR)
 
INTERRUPT SATAUS FOR WHOLE 0x1E LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_STAT_2__POS   (0)
 
#define BMI160_USER_INTR_STAT_2__LEN   (8)
 
#define BMI160_USER_INTR_STAT_2__MSK   (0xFF)
 
#define BMI160_USER_INTR_STAT_2__REG   (BMI160_USER_INTR_STAT_2_ADDR)
 
HIGH_G-XYZ AND SIGN LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_X__POS   (0)
 
#define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_X__LEN   (1)
 
#define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_X__MSK   (0x01)
 
#define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_X__REG   (BMI160_USER_INTR_STAT_3_ADDR)
 
#define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Y__POS   (1)
 
#define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Y__LEN   (1)
 
#define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Y__MSK   (0x02)
 
#define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Y__REG   (BMI160_USER_INTR_STAT_3_ADDR)
 
#define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Z__POS   (2)
 
#define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Z__LEN   (1)
 
#define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Z__MSK   (0x04)
 
#define BMI160_USER_INTR_STAT_3_HIGH_G_FIRST_Z__REG   (BMI160_USER_INTR_STAT_3_ADDR)
 
#define BMI160_USER_INTR_STAT_3_HIGH_G_SIGN__POS   (3)
 
#define BMI160_USER_INTR_STAT_3_HIGH_G_SIGN__LEN   (1)
 
#define BMI160_USER_INTR_STAT_3_HIGH_G_SIGN__MSK   (0x08)
 
#define BMI160_USER_INTR_STAT_3_HIGH_G_SIGN__REG   (BMI160_USER_INTR_STAT_3_ADDR)
 
ORIENT XY and Z AXIS LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_STAT_3_ORIENT_XY__POS   (4)
 
#define BMI160_USER_INTR_STAT_3_ORIENT_XY__LEN   (2)
 
#define BMI160_USER_INTR_STAT_3_ORIENT_XY__MSK   (0x30)
 
#define BMI160_USER_INTR_STAT_3_ORIENT_XY__REG   (BMI160_USER_INTR_STAT_3_ADDR)
 
#define BMI160_USER_INTR_STAT_3_ORIENT_Z__POS   (6)
 
#define BMI160_USER_INTR_STAT_3_ORIENT_Z__LEN   (1)
 
#define BMI160_USER_INTR_STAT_3_ORIENT_Z__MSK   (0x40)
 
#define BMI160_USER_INTR_STAT_3_ORIENT_Z__REG   (BMI160_USER_INTR_STAT_3_ADDR)
 
FLAT LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_STAT_3_FLAT__POS   (7)
 
#define BMI160_USER_INTR_STAT_3_FLAT__LEN   (1)
 
#define BMI160_USER_INTR_STAT_3_FLAT__MSK   (0x80)
 
#define BMI160_USER_INTR_STAT_3_FLAT__REG   (BMI160_USER_INTR_STAT_3_ADDR)
 
(0x1F) LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_STAT_3__POS   (0)
 
#define BMI160_USER_INTR_STAT_3__LEN   (8)
 
#define BMI160_USER_INTR_STAT_3__MSK   (0xFF)
 
#define BMI160_USER_INTR_STAT_3__REG   (BMI160_USER_INTR_STAT_3_ADDR)
 
TEMPERATURE LENGTH, POSITION AND MASK
#define BMI160_USER_TEMP_LSB_VALUE__POS   (0)
 
#define BMI160_USER_TEMP_LSB_VALUE__LEN   (8)
 
#define BMI160_USER_TEMP_LSB_VALUE__MSK   (0xFF)
 
#define BMI160_USER_TEMP_LSB_VALUE__REG   (BMI160_USER_TEMPERATURE_0_ADDR)
 
#define BMI160_USER_TEMP_MSB_VALUE__POS   (0)
 
#define BMI160_USER_TEMP_MSB_VALUE__LEN   (8)
 
#define BMI160_USER_TEMP_MSB_VALUE__MSK   (0xFF)
 
#define BMI160_USER_TEMP_MSB_VALUE__REG   (BMI160_USER_TEMPERATURE_1_ADDR)
 
FIFO BYTE COUNTER LENGTH, POSITION AND MASK
#define BMI160_USER_FIFO_BYTE_COUNTER_LSB__POS   (0)
 
#define BMI160_USER_FIFO_BYTE_COUNTER_LSB__LEN   (8)
 
#define BMI160_USER_FIFO_BYTE_COUNTER_LSB__MSK   (0xFF)
 
#define BMI160_USER_FIFO_BYTE_COUNTER_LSB__REG   (BMI160_USER_FIFO_LENGTH_0_ADDR)
 
#define BMI160_USER_FIFO_BYTE_COUNTER_MSB__POS   (0)
 
#define BMI160_USER_FIFO_BYTE_COUNTER_MSB__LEN   3
 
#define BMI160_USER_FIFO_BYTE_COUNTER_MSB__MSK   (0x07)
 
#define BMI160_USER_FIFO_BYTE_COUNTER_MSB__REG   (BMI160_USER_FIFO_LENGTH_1_ADDR)
 
FIFO DATA LENGTH, POSITION AND MASK
#define BMI160_USER_FIFO_DATA__POS   (0)
 
#define BMI160_USER_FIFO_DATA__LEN   (8)
 
#define BMI160_USER_FIFO_DATA__MSK   (0xFF)
 
#define BMI160_USER_FIFO_DATA__REG   (BMI160_USER_FIFO_DATA_ADDR)
 
ACCEL CONFIGURATION LENGTH, POSITION AND MASK
#define BMI160_USER_ACCEL_CONFIG_OUTPUT_DATA_RATE__POS   (0)
 
#define BMI160_USER_ACCEL_CONFIG_OUTPUT_DATA_RATE__LEN   (4)
 
#define BMI160_USER_ACCEL_CONFIG_OUTPUT_DATA_RATE__MSK   (0x0F)
 
#define BMI160_USER_ACCEL_CONFIG_OUTPUT_DATA_RATE__REG   (BMI160_USER_ACCEL_CONFIG_ADDR)
 
#define BMI160_USER_ACCEL_CONFIG_ACCEL_BW__POS   (4)
 
#define BMI160_USER_ACCEL_CONFIG_ACCEL_BW__LEN   (3)
 
#define BMI160_USER_ACCEL_CONFIG_ACCEL_BW__MSK   (0x70)
 
#define BMI160_USER_ACCEL_CONFIG_ACCEL_BW__REG   (BMI160_USER_ACCEL_CONFIG_ADDR)
 
#define BMI160_USER_ACCEL_CONFIG_ACCEL_UNDER_SAMPLING__POS   (7)
 
#define BMI160_USER_ACCEL_CONFIG_ACCEL_UNDER_SAMPLING__LEN   (1)
 
#define BMI160_USER_ACCEL_CONFIG_ACCEL_UNDER_SAMPLING__MSK   (0x80)
 
#define BMI160_USER_ACCEL_CONFIG_ACCEL_UNDER_SAMPLING__REG   (BMI160_USER_ACCEL_CONFIG_ADDR)
 
#define BMI160_USER_ACCEL_RANGE__POS   (0)
 
#define BMI160_USER_ACCEL_RANGE__LEN   (4)
 
#define BMI160_USER_ACCEL_RANGE__MSK   (0x0F)
 
#define BMI160_USER_ACCEL_RANGE__REG   (BMI160_USER_ACCEL_RANGE_ADDR)
 
GYRO CONFIGURATION LENGTH, POSITION AND MASK
#define BMI160_USER_GYRO_CONFIG_OUTPUT_DATA_RATE__POS   (0)
 
#define BMI160_USER_GYRO_CONFIG_OUTPUT_DATA_RATE__LEN   (4)
 
#define BMI160_USER_GYRO_CONFIG_OUTPUT_DATA_RATE__MSK   (0x0F)
 
#define BMI160_USER_GYRO_CONFIG_OUTPUT_DATA_RATE__REG   (BMI160_USER_GYRO_CONFIG_ADDR)
 
#define BMI160_USER_GYRO_CONFIG_BW__POS   (4)
 
#define BMI160_USER_GYRO_CONFIG_BW__LEN   (2)
 
#define BMI160_USER_GYRO_CONFIG_BW__MSK   (0x30)
 
#define BMI160_USER_GYRO_CONFIG_BW__REG   (BMI160_USER_GYRO_CONFIG_ADDR)
 
#define BMI160_USER_GYRO_RANGE__POS   (0)
 
#define BMI160_USER_GYRO_RANGE__LEN   (3)
 
#define BMI160_USER_GYRO_RANGE__MSK   (0x07)
 
#define BMI160_USER_GYRO_RANGE__REG   (BMI160_USER_GYRO_RANGE_ADDR)
 
MAG CONFIGURATION LENGTH, POSITION AND MASK
#define BMI160_USER_MAG_CONFIG_OUTPUT_DATA_RATE__POS   (0)
 
#define BMI160_USER_MAG_CONFIG_OUTPUT_DATA_RATE__LEN   (4)
 
#define BMI160_USER_MAG_CONFIG_OUTPUT_DATA_RATE__MSK   (0x0F)
 
#define BMI160_USER_MAG_CONFIG_OUTPUT_DATA_RATE__REG   (BMI160_USER_MAG_CONFIG_ADDR)
 
FIFO DOWNS LENGTH, POSITION AND MASK
#define BMI160_USER_FIFO_DOWN_GYRO__POS   (0)
 
#define BMI160_USER_FIFO_DOWN_GYRO__LEN   (3)
 
#define BMI160_USER_FIFO_DOWN_GYRO__MSK   (0x07)
 
#define BMI160_USER_FIFO_DOWN_GYRO__REG   (BMI160_USER_FIFO_DOWN_ADDR)
 
FIFO FILTER FOR ACCEL AND GYRO LENGTH, POSITION AND MASK
#define BMI160_USER_FIFO_FILTER_GYRO__POS   (3)
 
#define BMI160_USER_FIFO_FILTER_GYRO__LEN   (1)
 
#define BMI160_USER_FIFO_FILTER_GYRO__MSK   (0x08)
 
#define BMI160_USER_FIFO_FILTER_GYRO__REG   (BMI160_USER_FIFO_DOWN_ADDR)
 
#define BMI160_USER_FIFO_DOWN_ACCEL__POS   (4)
 
#define BMI160_USER_FIFO_DOWN_ACCEL__LEN   (3)
 
#define BMI160_USER_FIFO_DOWN_ACCEL__MSK   (0x70)
 
#define BMI160_USER_FIFO_DOWN_ACCEL__REG   (BMI160_USER_FIFO_DOWN_ADDR)
 
#define BMI160_USER_FIFO_FILTER_ACCEL__POS   (7)
 
#define BMI160_USER_FIFO_FILTER_ACCEL__LEN   (1)
 
#define BMI160_USER_FIFO_FILTER_ACCEL__MSK   (0x80)
 
#define BMI160_USER_FIFO_FILTER_ACCEL__REG   (BMI160_USER_FIFO_DOWN_ADDR)
 
FIFO WATER MARK LENGTH, POSITION AND MASK
#define BMI160_USER_FIFO_WM__POS   (0)
 
#define BMI160_USER_FIFO_WM__LEN   (8)
 
#define BMI160_USER_FIFO_WM__MSK   (0xFF)
 
#define BMI160_USER_FIFO_WM__REG   (BMI160_USER_FIFO_CONFIG_0_ADDR)
 
FIFO TIME LENGTH, POSITION AND MASK
#define BMI160_USER_FIFO_TIME_ENABLE__POS   (1)
 
#define BMI160_USER_FIFO_TIME_ENABLE__LEN   (1)
 
#define BMI160_USER_FIFO_TIME_ENABLE__MSK   (0x02)
 
#define BMI160_USER_FIFO_TIME_ENABLE__REG   (BMI160_USER_FIFO_CONFIG_1_ADDR)
 
FIFO TAG INTERRUPT LENGTH, POSITION AND MASK
#define BMI160_USER_FIFO_TAG_INTR2_ENABLE__POS   (2)
 
#define BMI160_USER_FIFO_TAG_INTR2_ENABLE__LEN   (1)
 
#define BMI160_USER_FIFO_TAG_INTR2_ENABLE__MSK   (0x04)
 
#define BMI160_USER_FIFO_TAG_INTR2_ENABLE__REG   (BMI160_USER_FIFO_CONFIG_1_ADDR)
 
#define BMI160_USER_FIFO_TAG_INTR1_ENABLE__POS   (3)
 
#define BMI160_USER_FIFO_TAG_INTR1_ENABLE__LEN   (1)
 
#define BMI160_USER_FIFO_TAG_INTR1_ENABLE__MSK   (0x08)
 
#define BMI160_USER_FIFO_TAG_INTR1_ENABLE__REG   (BMI160_USER_FIFO_CONFIG_1_ADDR)
 
FIFO HEADER LENGTH, POSITION AND MASK
#define BMI160_USER_FIFO_HEADER_ENABLE__POS   (4)
 
#define BMI160_USER_FIFO_HEADER_ENABLE__LEN   (1)
 
#define BMI160_USER_FIFO_HEADER_ENABLE__MSK   (0x10)
 
#define BMI160_USER_FIFO_HEADER_ENABLE__REG   (BMI160_USER_FIFO_CONFIG_1_ADDR)
 
FIFO MAG ENABLE LENGTH, POSITION AND MASK
#define BMI160_USER_FIFO_MAG_ENABLE__POS   (5)
 
#define BMI160_USER_FIFO_MAG_ENABLE__LEN   (1)
 
#define BMI160_USER_FIFO_MAG_ENABLE__MSK   (0x20)
 
#define BMI160_USER_FIFO_MAG_ENABLE__REG   (BMI160_USER_FIFO_CONFIG_1_ADDR)
 
FIFO ACCEL ENABLE LENGTH, POSITION AND MASK
#define BMI160_USER_FIFO_ACCEL_ENABLE__POS   (6)
 
#define BMI160_USER_FIFO_ACCEL_ENABLE__LEN   (1)
 
#define BMI160_USER_FIFO_ACCEL_ENABLE__MSK   (0x40)
 
#define BMI160_USER_FIFO_ACCEL_ENABLE__REG   (BMI160_USER_FIFO_CONFIG_1_ADDR)
 
FIFO GYRO ENABLE LENGTH, POSITION AND MASK
#define BMI160_USER_FIFO_GYRO_ENABLE__POS   (7)
 
#define BMI160_USER_FIFO_GYRO_ENABLE__LEN   (1)
 
#define BMI160_USER_FIFO_GYRO_ENABLE__MSK   (0x80)
 
#define BMI160_USER_FIFO_GYRO_ENABLE__REG   (BMI160_USER_FIFO_CONFIG_1_ADDR)
 
MAG I2C ADDRESS SELECTION LENGTH, POSITION AND MASK
#define BMI160_USER_I2C_DEVICE_ADDR__POS   (1)
 
#define BMI160_USER_I2C_DEVICE_ADDR__LEN   (7)
 
#define BMI160_USER_I2C_DEVICE_ADDR__MSK   (0xFE)
 
#define BMI160_USER_I2C_DEVICE_ADDR__REG   (BMI160_USER_MAG_IF_0_ADDR)
 
MAG CONFIGURATION FOR SECONDARY

INTERFACE LENGTH, POSITION AND MASK

#define BMI160_USER_MAG_BURST__POS   (0)
 
#define BMI160_USER_MAG_BURST__LEN   (2)
 
#define BMI160_USER_MAG_BURST__MSK   (0x03)
 
#define BMI160_USER_MAG_BURST__REG   (BMI160_USER_MAG_IF_1_ADDR)
 
#define BMI160_USER_MAG_OFFSET__POS   (2)
 
#define BMI160_USER_MAG_OFFSET__LEN   (4)
 
#define BMI160_USER_MAG_OFFSET__MSK   (0x3C)
 
#define BMI160_USER_MAG_OFFSET__REG   (BMI160_USER_MAG_IF_1_ADDR)
 
#define BMI160_USER_MAG_MANUAL_ENABLE__POS   (7)
 
#define BMI160_USER_MAG_MANUAL_ENABLE__LEN   (1)
 
#define BMI160_USER_MAG_MANUAL_ENABLE__MSK   (0x80)
 
#define BMI160_USER_MAG_MANUAL_ENABLE__REG   (BMI160_USER_MAG_IF_1_ADDR)
 
#define BMI160_USER_READ_ADDR__POS   (0)
 
#define BMI160_USER_READ_ADDR__LEN   (8)
 
#define BMI160_USER_READ_ADDR__MSK   (0xFF)
 
#define BMI160_USER_READ_ADDR__REG   (BMI160_USER_MAG_IF_2_ADDR)
 
#define BMI160_USER_WRITE_ADDR__POS   (0)
 
#define BMI160_USER_WRITE_ADDR__LEN   (8)
 
#define BMI160_USER_WRITE_ADDR__MSK   (0xFF)
 
#define BMI160_USER_WRITE_ADDR__REG   (BMI160_USER_MAG_IF_3_ADDR)
 
#define BMI160_USER_WRITE_DATA__POS   (0)
 
#define BMI160_USER_WRITE_DATA__LEN   (8)
 
#define BMI160_USER_WRITE_DATA__MSK   (0xFF)
 
#define BMI160_USER_WRITE_DATA__REG   (BMI160_USER_MAG_IF_4_ADDR)
 
ANY MOTION XYZ AXIS ENABLE LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_X_ENABLE__POS   (0)
 
#define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_X_ENABLE__LEN   (1)
 
#define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_X_ENABLE__MSK   (0x01)
 
#define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_X_ENABLE__REG   (BMI160_USER_INTR_ENABLE_0_ADDR)
 
#define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Y_ENABLE__POS   (1)
 
#define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Y_ENABLE__LEN   (1)
 
#define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Y_ENABLE__MSK   (0x02)
 
#define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Y_ENABLE__REG   (BMI160_USER_INTR_ENABLE_0_ADDR)
 
#define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Z_ENABLE__POS   (2)
 
#define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Z_ENABLE__LEN   (1)
 
#define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Z_ENABLE__MSK   (0x04)
 
#define BMI160_USER_INTR_ENABLE_0_ANY_MOTION_Z_ENABLE__REG   (BMI160_USER_INTR_ENABLE_0_ADDR)
 
DOUBLE TAP ENABLE LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_ENABLE_0_DOUBLE_TAP_ENABLE__POS   (4)
 
#define BMI160_USER_INTR_ENABLE_0_DOUBLE_TAP_ENABLE__LEN   (1)
 
#define BMI160_USER_INTR_ENABLE_0_DOUBLE_TAP_ENABLE__MSK   (0x10)
 
#define BMI160_USER_INTR_ENABLE_0_DOUBLE_TAP_ENABLE__REG   (BMI160_USER_INTR_ENABLE_0_ADDR)
 
SINGLE TAP ENABLE LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_ENABLE_0_SINGLE_TAP_ENABLE__POS   (5)
 
#define BMI160_USER_INTR_ENABLE_0_SINGLE_TAP_ENABLE__LEN   (1)
 
#define BMI160_USER_INTR_ENABLE_0_SINGLE_TAP_ENABLE__MSK   (0x20)
 
#define BMI160_USER_INTR_ENABLE_0_SINGLE_TAP_ENABLE__REG   (BMI160_USER_INTR_ENABLE_0_ADDR)
 
ORIENT ENABLE LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_ENABLE_0_ORIENT_ENABLE__POS   (6)
 
#define BMI160_USER_INTR_ENABLE_0_ORIENT_ENABLE__LEN   (1)
 
#define BMI160_USER_INTR_ENABLE_0_ORIENT_ENABLE__MSK   (0x40)
 
#define BMI160_USER_INTR_ENABLE_0_ORIENT_ENABLE__REG   (BMI160_USER_INTR_ENABLE_0_ADDR)
 
FLAT ENABLE LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_ENABLE_0_FLAT_ENABLE__POS   (7)
 
#define BMI160_USER_INTR_ENABLE_0_FLAT_ENABLE__LEN   (1)
 
#define BMI160_USER_INTR_ENABLE_0_FLAT_ENABLE__MSK   (0x80)
 
#define BMI160_USER_INTR_ENABLE_0_FLAT_ENABLE__REG   (BMI160_USER_INTR_ENABLE_0_ADDR)
 
HIGH_G XYZ ENABLE LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_ENABLE_1_HIGH_G_X_ENABLE__POS   (0)
 
#define BMI160_USER_INTR_ENABLE_1_HIGH_G_X_ENABLE__LEN   (1)
 
#define BMI160_USER_INTR_ENABLE_1_HIGH_G_X_ENABLE__MSK   (0x01)
 
#define BMI160_USER_INTR_ENABLE_1_HIGH_G_X_ENABLE__REG   (BMI160_USER_INTR_ENABLE_1_ADDR)
 
#define BMI160_USER_INTR_ENABLE_1_HIGH_G_Y_ENABLE__POS   (1)
 
#define BMI160_USER_INTR_ENABLE_1_HIGH_G_Y_ENABLE__LEN   (1)
 
#define BMI160_USER_INTR_ENABLE_1_HIGH_G_Y_ENABLE__MSK   (0x02)
 
#define BMI160_USER_INTR_ENABLE_1_HIGH_G_Y_ENABLE__REG   (BMI160_USER_INTR_ENABLE_1_ADDR)
 
#define BMI160_USER_INTR_ENABLE_1_HIGH_G_Z_ENABLE__POS   (2)
 
#define BMI160_USER_INTR_ENABLE_1_HIGH_G_Z_ENABLE__LEN   (1)
 
#define BMI160_USER_INTR_ENABLE_1_HIGH_G_Z_ENABLE__MSK   (0x04)
 
#define BMI160_USER_INTR_ENABLE_1_HIGH_G_Z_ENABLE__REG   (BMI160_USER_INTR_ENABLE_1_ADDR)
 
LOW_G ENABLE LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_ENABLE_1_LOW_G_ENABLE__POS   (3)
 
#define BMI160_USER_INTR_ENABLE_1_LOW_G_ENABLE__LEN   (1)
 
#define BMI160_USER_INTR_ENABLE_1_LOW_G_ENABLE__MSK   (0x08)
 
#define BMI160_USER_INTR_ENABLE_1_LOW_G_ENABLE__REG   (BMI160_USER_INTR_ENABLE_1_ADDR)
 
DATA READY ENABLE LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_ENABLE_1_DATA_RDY_ENABLE__POS   (4)
 
#define BMI160_USER_INTR_ENABLE_1_DATA_RDY_ENABLE__LEN   (1)
 
#define BMI160_USER_INTR_ENABLE_1_DATA_RDY_ENABLE__MSK   (0x10)
 
#define BMI160_USER_INTR_ENABLE_1_DATA_RDY_ENABLE__REG   (BMI160_USER_INTR_ENABLE_1_ADDR)
 
FIFO FULL AND WATER MARK ENABLE LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_ENABLE_1_FIFO_FULL_ENABLE__POS   (5)
 
#define BMI160_USER_INTR_ENABLE_1_FIFO_FULL_ENABLE__LEN   (1)
 
#define BMI160_USER_INTR_ENABLE_1_FIFO_FULL_ENABLE__MSK   (0x20)
 
#define BMI160_USER_INTR_ENABLE_1_FIFO_FULL_ENABLE__REG   (BMI160_USER_INTR_ENABLE_1_ADDR)
 
#define BMI160_USER_INTR_ENABLE_1_FIFO_WM_ENABLE__POS   (6)
 
#define BMI160_USER_INTR_ENABLE_1_FIFO_WM_ENABLE__LEN   (1)
 
#define BMI160_USER_INTR_ENABLE_1_FIFO_WM_ENABLE__MSK   (0x40)
 
#define BMI160_USER_INTR_ENABLE_1_FIFO_WM_ENABLE__REG   (BMI160_USER_INTR_ENABLE_1_ADDR)
 
NO MOTION XYZ ENABLE LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_ENABLE_2_NOMOTION_X_ENABLE__POS   (0)
 
#define BMI160_USER_INTR_ENABLE_2_NOMOTION_X_ENABLE__LEN   (1)
 
#define BMI160_USER_INTR_ENABLE_2_NOMOTION_X_ENABLE__MSK   (0x01)
 
#define BMI160_USER_INTR_ENABLE_2_NOMOTION_X_ENABLE__REG   (BMI160_USER_INTR_ENABLE_2_ADDR)
 
#define BMI160_USER_INTR_ENABLE_2_NOMOTION_Y_ENABLE__POS   (1)
 
#define BMI160_USER_INTR_ENABLE_2_NOMOTION_Y_ENABLE__LEN   (1)
 
#define BMI160_USER_INTR_ENABLE_2_NOMOTION_Y_ENABLE__MSK   (0x02)
 
#define BMI160_USER_INTR_ENABLE_2_NOMOTION_Y_ENABLE__REG   (BMI160_USER_INTR_ENABLE_2_ADDR)
 
#define BMI160_USER_INTR_ENABLE_2_NOMOTION_Z_ENABLE__POS   (2)
 
#define BMI160_USER_INTR_ENABLE_2_NOMOTION_Z_ENABLE__LEN   (1)
 
#define BMI160_USER_INTR_ENABLE_2_NOMOTION_Z_ENABLE__MSK   (0x04)
 
#define BMI160_USER_INTR_ENABLE_2_NOMOTION_Z_ENABLE__REG   (BMI160_USER_INTR_ENABLE_2_ADDR)
 
STEP DETECTOR ENABLE LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_ENABLE_2_STEP_DETECTOR_ENABLE__POS   (3)
 
#define BMI160_USER_INTR_ENABLE_2_STEP_DETECTOR_ENABLE__LEN   (1)
 
#define BMI160_USER_INTR_ENABLE_2_STEP_DETECTOR_ENABLE__MSK   (0x08)
 
#define BMI160_USER_INTR_ENABLE_2_STEP_DETECTOR_ENABLE__REG   (BMI160_USER_INTR_ENABLE_2_ADDR)
 
EDGE CONTROL ENABLE LENGTH, POSITION AND MASK
#define BMI160_USER_INTR1_EDGE_CTRL__POS   (0)
 
#define BMI160_USER_INTR1_EDGE_CTRL__LEN   (1)
 
#define BMI160_USER_INTR1_EDGE_CTRL__MSK   (0x01)
 
#define BMI160_USER_INTR1_EDGE_CTRL__REG   (BMI160_USER_INTR_OUT_CTRL_ADDR)
 
#define BMI160_USER_INTR2_EDGE_CTRL__POS   (4)
 
#define BMI160_USER_INTR2_EDGE_CTRL__LEN   (1)
 
#define BMI160_USER_INTR2_EDGE_CTRL__MSK   (0x10)
 
#define BMI160_USER_INTR2_EDGE_CTRL__REG   (BMI160_USER_INTR_OUT_CTRL_ADDR)
 
LEVEL CONTROL ENABLE LENGTH, POSITION AND MASK
#define BMI160_USER_INTR1_LEVEL__POS   (1)
 
#define BMI160_USER_INTR1_LEVEL__LEN   (1)
 
#define BMI160_USER_INTR1_LEVEL__MSK   (0x02)
 
#define BMI160_USER_INTR1_LEVEL__REG   (BMI160_USER_INTR_OUT_CTRL_ADDR)
 
#define BMI160_USER_INTR2_LEVEL__POS   (5)
 
#define BMI160_USER_INTR2_LEVEL__LEN   (1)
 
#define BMI160_USER_INTR2_LEVEL__MSK   (0x20)
 
#define BMI160_USER_INTR2_LEVEL__REG   (BMI160_USER_INTR_OUT_CTRL_ADDR)
 
OUTPUT TYPE ENABLE LENGTH, POSITION AND MASK
#define BMI160_USER_INTR1_OUTPUT_TYPE__POS   (2)
 
#define BMI160_USER_INTR1_OUTPUT_TYPE__LEN   (1)
 
#define BMI160_USER_INTR1_OUTPUT_TYPE__MSK   (0x04)
 
#define BMI160_USER_INTR1_OUTPUT_TYPE__REG   (BMI160_USER_INTR_OUT_CTRL_ADDR)
 
#define BMI160_USER_INTR1_OUTPUT_ENABLE__POS   (3)
 
#define BMI160_USER_INTR1_OUTPUT_ENABLE__LEN   (1)
 
#define BMI160_USER_INTR1_OUTPUT_ENABLE__MSK   (0x08)
 
#define BMI160_USER_INTR1_OUTPUT_ENABLE__REG   (BMI160_USER_INTR_OUT_CTRL_ADDR)
 
#define BMI160_USER_INTR2_OUTPUT_TYPE__POS   (6)
 
#define BMI160_USER_INTR2_OUTPUT_TYPE__LEN   (1)
 
#define BMI160_USER_INTR2_OUTPUT_TYPE__MSK   (0x40)
 
#define BMI160_USER_INTR2_OUTPUT_TYPE__REG   (BMI160_USER_INTR_OUT_CTRL_ADDR)
 
#define BMI160_USER_INTR2_OUTPUT_EN__POS   (7)
 
#define BMI160_USER_INTR2_OUTPUT_EN__LEN   (1)
 
#define BMI160_USER_INTR2_OUTPUT_EN__MSK   (0x80)
 
#define BMI160_USER_INTR2_OUTPUT_EN__REG   (BMI160_USER_INTR_OUT_CTRL_ADDR)
 
LATCH INTERRUPT LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_LATCH__POS   (0)
 
#define BMI160_USER_INTR_LATCH__LEN   (4)
 
#define BMI160_USER_INTR_LATCH__MSK   (0x0F)
 
#define BMI160_USER_INTR_LATCH__REG   (BMI160_USER_INTR_LATCH_ADDR)
 
INPUT ENABLE LENGTH, POSITION AND MASK
#define BMI160_USER_INTR1_INPUT_ENABLE__POS   (4)
 
#define BMI160_USER_INTR1_INPUT_ENABLE__LEN   (1)
 
#define BMI160_USER_INTR1_INPUT_ENABLE__MSK   (0x10)
 
#define BMI160_USER_INTR1_INPUT_ENABLE__REG   (BMI160_USER_INTR_LATCH_ADDR)
 
#define BMI160_USER_INTR2_INPUT_ENABLE__POS   (5)
 
#define BMI160_USER_INTR2_INPUT_ENABLE__LEN   (1)
 
#define BMI160_USER_INTR2_INPUT_ENABLE__MSK   (0x20)
 
#define BMI160_USER_INTR2_INPUT_ENABLE__REG   (BMI160_USER_INTR_LATCH_ADDR)
 
INTERRUPT1 MAPPIONG OF LOW_G LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_MAP_0_INTR1_LOW_G__POS   (0)
 
#define BMI160_USER_INTR_MAP_0_INTR1_LOW_G__LEN   (1)
 
#define BMI160_USER_INTR_MAP_0_INTR1_LOW_G__MSK   (0x01)
 
#define BMI160_USER_INTR_MAP_0_INTR1_LOW_G__REG   (BMI160_USER_INTR_MAP_0_ADDR)
 
INTERRUPT1 MAPPIONG OF HIGH_G LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_MAP_0_INTR1_HIGH_G__POS   (1)
 
#define BMI160_USER_INTR_MAP_0_INTR1_HIGH_G__LEN   (1)
 
#define BMI160_USER_INTR_MAP_0_INTR1_HIGH_G__MSK   (0x02)
 
#define BMI160_USER_INTR_MAP_0_INTR1_HIGH_G__REG   (BMI160_USER_INTR_MAP_0_ADDR)
 
INTERRUPT MAPPIONG OF ANY MOTION_G LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_MAP_0_INTR1_ANY_MOTION__POS   (2)
 
#define BMI160_USER_INTR_MAP_0_INTR1_ANY_MOTION__LEN   (1)
 
#define BMI160_USER_INTR_MAP_0_INTR1_ANY_MOTION__MSK   (0x04)
 
#define BMI160_USER_INTR_MAP_0_INTR1_ANY_MOTION__REG   (BMI160_USER_INTR_MAP_0_ADDR)
 
INTERRUPT1 MAPPIONG OF NO MOTION LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_MAP_0_INTR1_NOMOTION__POS   (3)
 
#define BMI160_USER_INTR_MAP_0_INTR1_NOMOTION__LEN   (1)
 
#define BMI160_USER_INTR_MAP_0_INTR1_NOMOTION__MSK   (0x08)
 
#define BMI160_USER_INTR_MAP_0_INTR1_NOMOTION__REG   (BMI160_USER_INTR_MAP_0_ADDR)
 
INTERRUPT1 MAPPIONG OF DOUBLE TAP LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_MAP_0_INTR1_DOUBLE_TAP__POS   (4)
 
#define BMI160_USER_INTR_MAP_0_INTR1_DOUBLE_TAP__LEN   (1)
 
#define BMI160_USER_INTR_MAP_0_INTR1_DOUBLE_TAP__MSK   (0x10)
 
#define BMI160_USER_INTR_MAP_0_INTR1_DOUBLE_TAP__REG   (BMI160_USER_INTR_MAP_0_ADDR)
 
INTERRUPT1 MAPPIONG OF SINGLE TAP LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_MAP_0_INTR1_SINGLE_TAP__POS   (5)
 
#define BMI160_USER_INTR_MAP_0_INTR1_SINGLE_TAP__LEN   (1)
 
#define BMI160_USER_INTR_MAP_0_INTR1_SINGLE_TAP__MSK   (0x20)
 
#define BMI160_USER_INTR_MAP_0_INTR1_SINGLE_TAP__REG   (BMI160_USER_INTR_MAP_0_ADDR)
 
INTERRUPT1 MAPPIONG OF ORIENT LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_MAP_0_INTR1_ORIENT__POS   (6)
 
#define BMI160_USER_INTR_MAP_0_INTR1_ORIENT__LEN   (1)
 
#define BMI160_USER_INTR_MAP_0_INTR1_ORIENT__MSK   (0x40)
 
#define BMI160_USER_INTR_MAP_0_INTR1_ORIENT__REG   (BMI160_USER_INTR_MAP_0_ADDR)
 
INTERRUPT MAPPIONG OF FLAT LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_MAP_0_INTR1_FLAT__POS   (7)
 
#define BMI160_USER_INTR_MAP_0_INTR1_FLAT__LEN   (1)
 
#define BMI160_USER_INTR_MAP_0_INTR1_FLAT__MSK   (0x80)
 
#define BMI160_USER_INTR_MAP_0_INTR1_FLAT__REG   (BMI160_USER_INTR_MAP_0_ADDR)
 
INTERRUPT1 MAPPIONG OF PMU TRIGGER LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_MAP_1_INTR2_PMU_TRIG__POS   (0)
 
#define BMI160_USER_INTR_MAP_1_INTR2_PMU_TRIG__LEN   (1)
 
#define BMI160_USER_INTR_MAP_1_INTR2_PMU_TRIG__MSK   (0x01)
 
#define BMI160_USER_INTR_MAP_1_INTR2_PMU_TRIG__REG   (BMI160_USER_INTR_MAP_1_ADDR)
 
#define BMI160_USER_INTR_MAP_1_INTR1_PMU_TRIG__POS   (4)
 
#define BMI160_USER_INTR_MAP_1_INTR1_PMU_TRIG__LEN   (1)
 
#define BMI160_USER_INTR_MAP_1_INTR1_PMU_TRIG__MSK   (0x10)
 
#define BMI160_USER_INTR_MAP_1_INTR1_PMU_TRIG__REG   (BMI160_USER_INTR_MAP_1_ADDR)
 
INTERRUPT1 MAPPIONG OF FIFO FULL AND

WATER MARK LENGTH, POSITION AND MASK

#define BMI160_USER_INTR_MAP_1_INTR2_FIFO_FULL__POS   (1)
 
#define BMI160_USER_INTR_MAP_1_INTR2_FIFO_FULL__LEN   (1)
 
#define BMI160_USER_INTR_MAP_1_INTR2_FIFO_FULL__MSK   (0x02)
 
#define BMI160_USER_INTR_MAP_1_INTR2_FIFO_FULL__REG   (BMI160_USER_INTR_MAP_1_ADDR)
 
#define BMI160_USER_INTR_MAP_1_INTR2_FIFO_WM__POS   (2)
 
#define BMI160_USER_INTR_MAP_1_INTR2_FIFO_WM__LEN   (1)
 
#define BMI160_USER_INTR_MAP_1_INTR2_FIFO_WM__MSK   (0x04)
 
#define BMI160_USER_INTR_MAP_1_INTR2_FIFO_WM__REG   (BMI160_USER_INTR_MAP_1_ADDR)
 
#define BMI160_USER_INTR_MAP_1_INTR1_FIFO_FULL__POS   (5)
 
#define BMI160_USER_INTR_MAP_1_INTR1_FIFO_FULL__LEN   (1)
 
#define BMI160_USER_INTR_MAP_1_INTR1_FIFO_FULL__MSK   (0x20)
 
#define BMI160_USER_INTR_MAP_1_INTR1_FIFO_FULL__REG   (BMI160_USER_INTR_MAP_1_ADDR)
 
#define BMI160_USER_INTR_MAP_1_INTR1_FIFO_WM__POS   (6)
 
#define BMI160_USER_INTR_MAP_1_INTR1_FIFO_WM__LEN   (1)
 
#define BMI160_USER_INTR_MAP_1_INTR1_FIFO_WM__MSK   (0x40)
 
#define BMI160_USER_INTR_MAP_1_INTR1_FIFO_WM__REG   (BMI160_USER_INTR_MAP_1_ADDR)
 
INTERRUPT1 MAPPIONG OF DATA READY LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_MAP_1_INTR2_DATA_RDY__POS   (3)
 
#define BMI160_USER_INTR_MAP_1_INTR2_DATA_RDY__LEN   (1)
 
#define BMI160_USER_INTR_MAP_1_INTR2_DATA_RDY__MSK   (0x08)
 
#define BMI160_USER_INTR_MAP_1_INTR2_DATA_RDY__REG   (BMI160_USER_INTR_MAP_1_ADDR)
 
#define BMI160_USER_INTR_MAP_1_INTR1_DATA_RDY__POS   (7)
 
#define BMI160_USER_INTR_MAP_1_INTR1_DATA_RDY__LEN   (1)
 
#define BMI160_USER_INTR_MAP_1_INTR1_DATA_RDY__MSK   (0x80)
 
#define BMI160_USER_INTR_MAP_1_INTR1_DATA_RDY__REG   (BMI160_USER_INTR_MAP_1_ADDR)
 
INTERRUPT2 MAPPIONG OF LOW_G LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_MAP_2_INTR2_LOW_G__POS   (0)
 
#define BMI160_USER_INTR_MAP_2_INTR2_LOW_G__LEN   (1)
 
#define BMI160_USER_INTR_MAP_2_INTR2_LOW_G__MSK   (0x01)
 
#define BMI160_USER_INTR_MAP_2_INTR2_LOW_G__REG   (BMI160_USER_INTR_MAP_2_ADDR)
 
INTERRUPT2 MAPPIONG OF HIGH_G LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_MAP_2_INTR2_HIGH_G__POS   (1)
 
#define BMI160_USER_INTR_MAP_2_INTR2_HIGH_G__LEN   (1)
 
#define BMI160_USER_INTR_MAP_2_INTR2_HIGH_G__MSK   (0x02)
 
#define BMI160_USER_INTR_MAP_2_INTR2_HIGH_G__REG   (BMI160_USER_INTR_MAP_2_ADDR)
 
INTERRUPT2 MAPPIONG OF ANY MOTION LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_MAP_2_INTR2_ANY_MOTION__POS   (2)
 
#define BMI160_USER_INTR_MAP_2_INTR2_ANY_MOTION__LEN   (1)
 
#define BMI160_USER_INTR_MAP_2_INTR2_ANY_MOTION__MSK   (0x04)
 
#define BMI160_USER_INTR_MAP_2_INTR2_ANY_MOTION__REG   (BMI160_USER_INTR_MAP_2_ADDR)
 
INTERRUPT2 MAPPIONG OF NO MOTION LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_MAP_2_INTR2_NOMOTION__POS   (3)
 
#define BMI160_USER_INTR_MAP_2_INTR2_NOMOTION__LEN   (1)
 
#define BMI160_USER_INTR_MAP_2_INTR2_NOMOTION__MSK   (0x08)
 
#define BMI160_USER_INTR_MAP_2_INTR2_NOMOTION__REG   (BMI160_USER_INTR_MAP_2_ADDR)
 
INTERRUPT2 MAPPIONG OF DOUBLE TAP LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_MAP_2_INTR2_DOUBLE_TAP__POS   (4)
 
#define BMI160_USER_INTR_MAP_2_INTR2_DOUBLE_TAP__LEN   (1)
 
#define BMI160_USER_INTR_MAP_2_INTR2_DOUBLE_TAP__MSK   (0x10)
 
#define BMI160_USER_INTR_MAP_2_INTR2_DOUBLE_TAP__REG   (BMI160_USER_INTR_MAP_2_ADDR)
 
INTERRUPT2 MAPPIONG OF SINGLE TAP LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_MAP_2_INTR2_SINGLE_TAP__POS   (5)
 
#define BMI160_USER_INTR_MAP_2_INTR2_SINGLE_TAP__LEN   (1)
 
#define BMI160_USER_INTR_MAP_2_INTR2_SINGLE_TAP__MSK   (0x20)
 
#define BMI160_USER_INTR_MAP_2_INTR2_SINGLE_TAP__REG   (BMI160_USER_INTR_MAP_2_ADDR)
 
INTERRUPT2 MAPPIONG OF ORIENT LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_MAP_2_INTR2_ORIENT__POS   (6)
 
#define BMI160_USER_INTR_MAP_2_INTR2_ORIENT__LEN   (1)
 
#define BMI160_USER_INTR_MAP_2_INTR2_ORIENT__MSK   (0x40)
 
#define BMI160_USER_INTR_MAP_2_INTR2_ORIENT__REG   (BMI160_USER_INTR_MAP_2_ADDR)
 
INTERRUPT2 MAPPIONG OF FLAT LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_MAP_2_INTR2_FLAT__POS   (7)
 
#define BMI160_USER_INTR_MAP_2_INTR2_FLAT__LEN   (1)
 
#define BMI160_USER_INTR_MAP_2_INTR2_FLAT__MSK   (0x80)
 
#define BMI160_USER_INTR_MAP_2_INTR2_FLAT__REG   (BMI160_USER_INTR_MAP_2_ADDR)
 
TAP SOURCE LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_DATA_0_INTR_TAP_SOURCE__POS   (3)
 
#define BMI160_USER_INTR_DATA_0_INTR_TAP_SOURCE__LEN   (1)
 
#define BMI160_USER_INTR_DATA_0_INTR_TAP_SOURCE__MSK   (0x08)
 
#define BMI160_USER_INTR_DATA_0_INTR_TAP_SOURCE__REG   (BMI160_USER_INTR_DATA_0_ADDR)
 
HIGH SOURCE LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_DATA_0_INTR_LOW_HIGH_SOURCE__POS   (7)
 
#define BMI160_USER_INTR_DATA_0_INTR_LOW_HIGH_SOURCE__LEN   (1)
 
#define BMI160_USER_INTR_DATA_0_INTR_LOW_HIGH_SOURCE__MSK   (0x80)
 
#define BMI160_USER_INTR_DATA_0_INTR_LOW_HIGH_SOURCE__REG   (BMI160_USER_INTR_DATA_0_ADDR)
 
MOTION SOURCE LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_DATA_1_INTR_MOTION_SOURCE__POS   (7)
 
#define BMI160_USER_INTR_DATA_1_INTR_MOTION_SOURCE__LEN   (1)
 
#define BMI160_USER_INTR_DATA_1_INTR_MOTION_SOURCE__MSK   (0x80)
 
#define BMI160_USER_INTR_DATA_1_INTR_MOTION_SOURCE__REG   (BMI160_USER_INTR_DATA_1_ADDR)
 
LOW HIGH DURATION LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_LOWHIGH_0_INTR_LOW_DURN__POS   (0)
 
#define BMI160_USER_INTR_LOWHIGH_0_INTR_LOW_DURN__LEN   (8)
 
#define BMI160_USER_INTR_LOWHIGH_0_INTR_LOW_DURN__MSK   (0xFF)
 
#define BMI160_USER_INTR_LOWHIGH_0_INTR_LOW_DURN__REG   (BMI160_USER_INTR_LOWHIGH_0_ADDR)
 
LOW THRESHOLD LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_LOWHIGH_1_INTR_LOW_THRES__POS   (0)
 
#define BMI160_USER_INTR_LOWHIGH_1_INTR_LOW_THRES__LEN   (8)
 
#define BMI160_USER_INTR_LOWHIGH_1_INTR_LOW_THRES__MSK   (0xFF)
 
#define BMI160_USER_INTR_LOWHIGH_1_INTR_LOW_THRES__REG   (BMI160_USER_INTR_LOWHIGH_1_ADDR)
 
LOW HYSTERESIS LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_HYST__POS   (0)
 
#define BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_HYST__LEN   (2)
 
#define BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_HYST__MSK   (0x03)
 
#define BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_HYST__REG   (BMI160_USER_INTR_LOWHIGH_2_ADDR)
 
LOW MODE LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_MODE__POS   (2)
 
#define BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_MODE__LEN   (1)
 
#define BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_MODE__MSK   (0x04)
 
#define BMI160_USER_INTR_LOWHIGH_2_INTR_LOW_G_MODE__REG   (BMI160_USER_INTR_LOWHIGH_2_ADDR)
 
HIGH_G HYSTERESIS LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_LOWHIGH_2_INTR_HIGH_G_HYST__POS   (6)
 
#define BMI160_USER_INTR_LOWHIGH_2_INTR_HIGH_G_HYST__LEN   (2)
 
#define BMI160_USER_INTR_LOWHIGH_2_INTR_HIGH_G_HYST__MSK   (0xC0)
 
#define BMI160_USER_INTR_LOWHIGH_2_INTR_HIGH_G_HYST__REG   (BMI160_USER_INTR_LOWHIGH_2_ADDR)
 
HIGH_G DURATION LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_LOWHIGH_3_INTR_HIGH_G_DURN__POS   (0)
 
#define BMI160_USER_INTR_LOWHIGH_3_INTR_HIGH_G_DURN__LEN   (8)
 
#define BMI160_USER_INTR_LOWHIGH_3_INTR_HIGH_G_DURN__MSK   (0xFF)
 
#define BMI160_USER_INTR_LOWHIGH_3_INTR_HIGH_G_DURN__REG   (BMI160_USER_INTR_LOWHIGH_3_ADDR)
 
HIGH_G THRESHOLD LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_LOWHIGH_4_INTR_HIGH_THRES__POS   (0)
 
#define BMI160_USER_INTR_LOWHIGH_4_INTR_HIGH_THRES__LEN   (8)
 
#define BMI160_USER_INTR_LOWHIGH_4_INTR_HIGH_THRES__MSK   (0xFF)
 
#define BMI160_USER_INTR_LOWHIGH_4_INTR_HIGH_THRES__REG   (BMI160_USER_INTR_LOWHIGH_4_ADDR)
 
ANY MOTION DURATION LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_MOTION_0_INTR_ANY_MOTION_DURN__POS   (0)
 
#define BMI160_USER_INTR_MOTION_0_INTR_ANY_MOTION_DURN__LEN   (2)
 
#define BMI160_USER_INTR_MOTION_0_INTR_ANY_MOTION_DURN__MSK   (0x03)
 
#define BMI160_USER_INTR_MOTION_0_INTR_ANY_MOTION_DURN__REG   (BMI160_USER_INTR_MOTION_0_ADDR)
 
SLOW/NO MOTION DURATION LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_MOTION_0_INTR_SLOW_NO_MOTION_DURN__POS   (2)
 
#define BMI160_USER_INTR_MOTION_0_INTR_SLOW_NO_MOTION_DURN__LEN   (6)
 
#define BMI160_USER_INTR_MOTION_0_INTR_SLOW_NO_MOTION_DURN__MSK   (0xFC)
 
#define BMI160_USER_INTR_MOTION_0_INTR_SLOW_NO_MOTION_DURN__REG   (BMI160_USER_INTR_MOTION_0_ADDR)
 
ANY MOTION THRESHOLD LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_MOTION_1_INTR_ANY_MOTION_THRES__POS   (0)
 
#define BMI160_USER_INTR_MOTION_1_INTR_ANY_MOTION_THRES__LEN   (8)
 
#define BMI160_USER_INTR_MOTION_1_INTR_ANY_MOTION_THRES__MSK   (0xFF)
 
#define BMI160_USER_INTR_MOTION_1_INTR_ANY_MOTION_THRES__REG   (BMI160_USER_INTR_MOTION_1_ADDR)
 
SLOW/NO MOTION THRESHOLD LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_MOTION_2_INTR_SLOW_NO_MOTION_THRES__POS   (0)
 
#define BMI160_USER_INTR_MOTION_2_INTR_SLOW_NO_MOTION_THRES__LEN   (8)
 
#define BMI160_USER_INTR_MOTION_2_INTR_SLOW_NO_MOTION_THRES__MSK   (0xFF)
 
#define BMI160_USER_INTR_MOTION_2_INTR_SLOW_NO_MOTION_THRES__REG   (BMI160_USER_INTR_MOTION_2_ADDR)
 
SLOW/NO MOTION SELECT LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_MOTION_3_INTR_SLOW_NO_MOTION_SELECT__POS   (0)
 
#define BMI160_USER_INTR_MOTION_3_INTR_SLOW_NO_MOTION_SELECT__LEN   (1)
 
#define BMI160_USER_INTR_MOTION_3_INTR_SLOW_NO_MOTION_SELECT__MSK   (0x01)
 
#define BMI160_USER_INTR_MOTION_3_INTR_SLOW_NO_MOTION_SELECT__REG   (BMI160_USER_INTR_MOTION_3_ADDR)
 
SIGNIFICANT MOTION SELECT LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_SIGNIFICATION_MOTION_SELECT__POS   (1)
 
#define BMI160_USER_INTR_SIGNIFICATION_MOTION_SELECT__LEN   (1)
 
#define BMI160_USER_INTR_SIGNIFICATION_MOTION_SELECT__MSK   (0x02)
 
#define BMI160_USER_INTR_SIGNIFICATION_MOTION_SELECT__REG   (BMI160_USER_INTR_MOTION_3_ADDR)
 
#define BMI160_USER_INTR_SIGNIFICANT_MOTION_SKIP__POS   (2)
 
#define BMI160_USER_INTR_SIGNIFICANT_MOTION_SKIP__LEN   (2)
 
#define BMI160_USER_INTR_SIGNIFICANT_MOTION_SKIP__MSK   (0x0C)
 
#define BMI160_USER_INTR_SIGNIFICANT_MOTION_SKIP__REG   (BMI160_USER_INTR_MOTION_3_ADDR)
 
#define BMI160_USER_INTR_SIGNIFICANT_MOTION_PROOF__POS   (4)
 
#define BMI160_USER_INTR_SIGNIFICANT_MOTION_PROOF__LEN   (2)
 
#define BMI160_USER_INTR_SIGNIFICANT_MOTION_PROOF__MSK   (0x30)
 
#define BMI160_USER_INTR_SIGNIFICANT_MOTION_PROOF__REG   (BMI160_USER_INTR_MOTION_3_ADDR)
 
TAP DURATION LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_TAP_0_INTR_TAP_DURN__POS   (0)
 
#define BMI160_USER_INTR_TAP_0_INTR_TAP_DURN__LEN   (3)
 
#define BMI160_USER_INTR_TAP_0_INTR_TAP_DURN__MSK   (0x07)
 
#define BMI160_USER_INTR_TAP_0_INTR_TAP_DURN__REG   (BMI160_USER_INTR_TAP_0_ADDR)
 
TAP SHOCK LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_TAP_0_INTR_TAP_SHOCK__POS   (6)
 
#define BMI160_USER_INTR_TAP_0_INTR_TAP_SHOCK__LEN   (1)
 
#define BMI160_USER_INTR_TAP_0_INTR_TAP_SHOCK__MSK   (0x40)
 
#define BMI160_USER_INTR_TAP_0_INTR_TAP_SHOCK__REG   (BMI160_USER_INTR_TAP_0_ADDR)
 
TAP QUIET LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_TAP_0_INTR_TAP_QUIET__POS   (7)
 
#define BMI160_USER_INTR_TAP_0_INTR_TAP_QUIET__LEN   (1)
 
#define BMI160_USER_INTR_TAP_0_INTR_TAP_QUIET__MSK   (0x80)
 
#define BMI160_USER_INTR_TAP_0_INTR_TAP_QUIET__REG   (BMI160_USER_INTR_TAP_0_ADDR)
 
TAP THRESHOLD LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_TAP_1_INTR_TAP_THRES__POS   (0)
 
#define BMI160_USER_INTR_TAP_1_INTR_TAP_THRES__LEN   (5)
 
#define BMI160_USER_INTR_TAP_1_INTR_TAP_THRES__MSK   (0x1F)
 
#define BMI160_USER_INTR_TAP_1_INTR_TAP_THRES__REG   (BMI160_USER_INTR_TAP_1_ADDR)
 
ORIENT MODE LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_MODE__POS   (0)
 
#define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_MODE__LEN   (2)
 
#define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_MODE__MSK   (0x03)
 
#define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_MODE__REG   (BMI160_USER_INTR_ORIENT_0_ADDR)
 
ORIENT BLOCKING LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_BLOCKING__POS   (2)
 
#define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_BLOCKING__LEN   (2)
 
#define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_BLOCKING__MSK   (0x0C)
 
#define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_BLOCKING__REG   (BMI160_USER_INTR_ORIENT_0_ADDR)
 
ORIENT HYSTERESIS LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_HYST__POS   (4)
 
#define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_HYST__LEN   (4)
 
#define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_HYST__MSK   (0xF0)
 
#define BMI160_USER_INTR_ORIENT_0_INTR_ORIENT_HYST__REG   (BMI160_USER_INTR_ORIENT_0_ADDR)
 
ORIENT THETA LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_THETA__POS   (0)
 
#define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_THETA__LEN   (6)
 
#define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_THETA__MSK   (0x3F)
 
#define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_THETA__REG   (BMI160_USER_INTR_ORIENT_1_ADDR)
 
ORIENT UD LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_UD_ENABLE__POS   (6)
 
#define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_UD_ENABLE__LEN   (1)
 
#define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_UD_ENABLE__MSK   (0x40)
 
#define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_UD_ENABLE__REG   (BMI160_USER_INTR_ORIENT_1_ADDR)
 
ORIENT AXIS LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_AXES_EX__POS   (7)
 
#define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_AXES_EX__LEN   (1)
 
#define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_AXES_EX__MSK   (0x80)
 
#define BMI160_USER_INTR_ORIENT_1_INTR_ORIENT_AXES_EX__REG   (BMI160_USER_INTR_ORIENT_1_ADDR)
 
FLAT THETA LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_FLAT_0_INTR_FLAT_THETA__POS   (0)
 
#define BMI160_USER_INTR_FLAT_0_INTR_FLAT_THETA__LEN   (6)
 
#define BMI160_USER_INTR_FLAT_0_INTR_FLAT_THETA__MSK   (0x3F)
 
#define BMI160_USER_INTR_FLAT_0_INTR_FLAT_THETA__REG   (BMI160_USER_INTR_FLAT_0_ADDR)
 
FLAT HYSTERESIS LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_FLAT_1_INTR_FLAT_HYST__POS   (0)
 
#define BMI160_USER_INTR_FLAT_1_INTR_FLAT_HYST__LEN   (4)
 
#define BMI160_USER_INTR_FLAT_1_INTR_FLAT_HYST__MSK   (0x0F)
 
#define BMI160_USER_INTR_FLAT_1_INTR_FLAT_HYST__REG   (BMI160_USER_INTR_FLAT_1_ADDR)
 
FLAT HOLD LENGTH, POSITION AND MASK
#define BMI160_USER_INTR_FLAT_1_INTR_FLAT_HOLD__POS   (4)
 
#define BMI160_USER_INTR_FLAT_1_INTR_FLAT_HOLD__LEN   (2)
 
#define BMI160_USER_INTR_FLAT_1_INTR_FLAT_HOLD__MSK   (0x30)
 
#define BMI160_USER_INTR_FLAT_1_INTR_FLAT_HOLD__REG   (BMI160_USER_INTR_FLAT_1_ADDR)
 
FOC ACCEL XYZ LENGTH, POSITION AND MASK
#define BMI160_USER_FOC_ACCEL_Z__POS   (0)
 
#define BMI160_USER_FOC_ACCEL_Z__LEN   (2)
 
#define BMI160_USER_FOC_ACCEL_Z__MSK   (0x03)
 
#define BMI160_USER_FOC_ACCEL_Z__REG   (BMI160_USER_FOC_CONFIG_ADDR)
 
#define BMI160_USER_FOC_ACCEL_Y__POS   (2)
 
#define BMI160_USER_FOC_ACCEL_Y__LEN   (2)
 
#define BMI160_USER_FOC_ACCEL_Y__MSK   (0x0C)
 
#define BMI160_USER_FOC_ACCEL_Y__REG   (BMI160_USER_FOC_CONFIG_ADDR)
 
#define BMI160_USER_FOC_ACCEL_X__POS   (4)
 
#define BMI160_USER_FOC_ACCEL_X__LEN   (2)
 
#define BMI160_USER_FOC_ACCEL_X__MSK   (0x30)
 
#define BMI160_USER_FOC_ACCEL_X__REG   (BMI160_USER_FOC_CONFIG_ADDR)
 
FOC GYRO LENGTH, POSITION AND MASK
#define BMI160_USER_FOC_GYRO_ENABLE__POS   (6)
 
#define BMI160_USER_FOC_GYRO_ENABLE__LEN   (1)
 
#define BMI160_USER_FOC_GYRO_ENABLE__MSK   (0x40)
 
#define BMI160_USER_FOC_GYRO_ENABLE__REG   (BMI160_USER_FOC_CONFIG_ADDR)
 
NVM PROGRAM LENGTH, POSITION AND MASK
#define BMI160_USER_CONFIG_NVM_PROG_ENABLE__POS   (1)
 
#define BMI160_USER_CONFIG_NVM_PROG_ENABLE__LEN   (1)
 
#define BMI160_USER_CONFIG_NVM_PROG_ENABLE__MSK   (0x02)
 
#define BMI160_USER_CONFIG_NVM_PROG_ENABLE__REG   (BMI160_USER_CONFIG_ADDR)
 
#define BMI160_USER_IF_CONFIG_SPI3__POS   (0)
 
#define BMI160_USER_IF_CONFIG_SPI3__LEN   (1)
 
#define BMI160_USER_IF_CONFIG_SPI3__MSK   (0x01)
 
#define BMI160_USER_IF_CONFIG_SPI3__REG   (BMI160_USER_IF_CONFIG_ADDR)
 
#define BMI160_USER_IF_CONFIG_IF_MODE__POS   (4)
 
#define BMI160_USER_IF_CONFIG_IF_MODE__LEN   (2)
 
#define BMI160_USER_IF_CONFIG_IF_MODE__MSK   (0x30)
 
#define BMI160_USER_IF_CONFIG_IF_MODE__REG   (BMI160_USER_IF_CONFIG_ADDR)
 
GYRO SLEEP CONFIGURATION LENGTH, POSITION AND MASK
#define BMI160_USER_GYRO_SLEEP_TRIGGER__POS   (0)
 
#define BMI160_USER_GYRO_SLEEP_TRIGGER__LEN   (3)
 
#define BMI160_USER_GYRO_SLEEP_TRIGGER__MSK   (0x07)
 
#define BMI160_USER_GYRO_SLEEP_TRIGGER__REG   (BMI160_USER_PMU_TRIGGER_ADDR)
 
#define BMI160_USER_GYRO_WAKEUP_TRIGGER__POS   (3)
 
#define BMI160_USER_GYRO_WAKEUP_TRIGGER__LEN   (2)
 
#define BMI160_USER_GYRO_WAKEUP_TRIGGER__MSK   (0x18)
 
#define BMI160_USER_GYRO_WAKEUP_TRIGGER__REG   (BMI160_USER_PMU_TRIGGER_ADDR)
 
#define BMI160_USER_GYRO_SLEEP_STATE__POS   (5)
 
#define BMI160_USER_GYRO_SLEEP_STATE__LEN   (1)
 
#define BMI160_USER_GYRO_SLEEP_STATE__MSK   (0x20)
 
#define BMI160_USER_GYRO_SLEEP_STATE__REG   (BMI160_USER_PMU_TRIGGER_ADDR)
 
#define BMI160_USER_GYRO_WAKEUP_INTR__POS   (6)
 
#define BMI160_USER_GYRO_WAKEUP_INTR__LEN   (1)
 
#define BMI160_USER_GYRO_WAKEUP_INTR__MSK   (0x40)
 
#define BMI160_USER_GYRO_WAKEUP_INTR__REG   (BMI160_USER_PMU_TRIGGER_ADDR)
 
ACCEL SELF TEST LENGTH, POSITION AND MASK
#define BMI160_USER_ACCEL_SELFTEST_AXIS__POS   (0)
 
#define BMI160_USER_ACCEL_SELFTEST_AXIS__LEN   (2)
 
#define BMI160_USER_ACCEL_SELFTEST_AXIS__MSK   (0x03)
 
#define BMI160_USER_ACCEL_SELFTEST_AXIS__REG   (BMI160_USER_SELF_TEST_ADDR)
 
#define BMI160_USER_ACCEL_SELFTEST_SIGN__POS   (2)
 
#define BMI160_USER_ACCEL_SELFTEST_SIGN__LEN   (1)
 
#define BMI160_USER_ACCEL_SELFTEST_SIGN__MSK   (0x04)
 
#define BMI160_USER_ACCEL_SELFTEST_SIGN__REG   (BMI160_USER_SELF_TEST_ADDR)
 
#define BMI160_USER_SELFTEST_AMP__POS   (3)
 
#define BMI160_USER_SELFTEST_AMP__LEN   (1)
 
#define BMI160_USER_SELFTEST_AMP__MSK   (0x08)
 
#define BMI160_USER_SELFTEST_AMP__REG   (BMI160_USER_SELF_TEST_ADDR)
 
NV_CONFIG LENGTH, POSITION AND MASK
#define BMI160_USER_NV_CONFIG_SPI_ENABLE__POS   (0)
 
#define BMI160_USER_NV_CONFIG_SPI_ENABLE__LEN   (1)
 
#define BMI160_USER_NV_CONFIG_SPI_ENABLE__MSK   (0x01)
 
#define BMI160_USER_NV_CONFIG_SPI_ENABLE__REG   (BMI160_USER_NV_CONFIG_ADDR)
 
#define BMI160_USER_IF_CONFIG_I2C_WDT_SELECT__POS   (1)
 
#define BMI160_USER_IF_CONFIG_I2C_WDT_SELECT__LEN   (1)
 
#define BMI160_USER_IF_CONFIG_I2C_WDT_SELECT__MSK   (0x02)
 
#define BMI160_USER_IF_CONFIG_I2C_WDT_SELECT__REG   (BMI160_USER_NV_CONFIG_ADDR)
 
#define BMI160_USER_IF_CONFIG_I2C_WDT_ENABLE__POS   (2)
 
#define BMI160_USER_IF_CONFIG_I2C_WDT_ENABLE__LEN   (1)
 
#define BMI160_USER_IF_CONFIG_I2C_WDT_ENABLE__MSK   (0x04)
 
#define BMI160_USER_IF_CONFIG_I2C_WDT_ENABLE__REG   (BMI160_USER_NV_CONFIG_ADDR)
 
#define BMI160_USER_NV_CONFIG_SPARE0__POS   (3)
 
#define BMI160_USER_NV_CONFIG_SPARE0__LEN   (1)
 
#define BMI160_USER_NV_CONFIG_SPARE0__MSK   (0x08)
 
#define BMI160_USER_NV_CONFIG_SPARE0__REG   (BMI160_USER_NV_CONFIG_ADDR)
 
#define BMI160_USER_NV_CONFIG_NVM_COUNTER__POS   (4)
 
#define BMI160_USER_NV_CONFIG_NVM_COUNTER__LEN   (4)
 
#define BMI160_USER_NV_CONFIG_NVM_COUNTER__MSK   (0xF0)
 
#define BMI160_USER_NV_CONFIG_NVM_COUNTER__REG   (BMI160_USER_NV_CONFIG_ADDR)
 
ACCEL MANUAL OFFSET LENGTH, POSITION AND MASK
#define BMI160_USER_OFFSET_0_ACCEL_OFF_X__POS   (0)
 
#define BMI160_USER_OFFSET_0_ACCEL_OFF_X__LEN   (8)
 
#define BMI160_USER_OFFSET_0_ACCEL_OFF_X__MSK   (0xFF)
 
#define BMI160_USER_OFFSET_0_ACCEL_OFF_X__REG   (BMI160_USER_OFFSET_0_ADDR)
 
#define BMI160_USER_OFFSET_1_ACCEL_OFF_Y__POS   (0)
 
#define BMI160_USER_OFFSET_1_ACCEL_OFF_Y__LEN   (8)
 
#define BMI160_USER_OFFSET_1_ACCEL_OFF_Y__MSK   (0xFF)
 
#define BMI160_USER_OFFSET_1_ACCEL_OFF_Y__REG   (BMI160_USER_OFFSET_1_ADDR)
 
#define BMI160_USER_OFFSET_2_ACCEL_OFF_Z__POS   (0)
 
#define BMI160_USER_OFFSET_2_ACCEL_OFF_Z__LEN   (8)
 
#define BMI160_USER_OFFSET_2_ACCEL_OFF_Z__MSK   (0xFF)
 
#define BMI160_USER_OFFSET_2_ACCEL_OFF_Z__REG   (BMI160_USER_OFFSET_2_ADDR)
 
GYRO MANUAL OFFSET LENGTH, POSITION AND MASK
#define BMI160_USER_OFFSET_3_GYRO_OFF_X__POS   (0)
 
#define BMI160_USER_OFFSET_3_GYRO_OFF_X__LEN   (8)
 
#define BMI160_USER_OFFSET_3_GYRO_OFF_X__MSK   (0xFF)
 
#define BMI160_USER_OFFSET_3_GYRO_OFF_X__REG   (BMI160_USER_OFFSET_3_ADDR)
 
#define BMI160_USER_OFFSET_4_GYRO_OFF_Y__POS   (0)
 
#define BMI160_USER_OFFSET_4_GYRO_OFF_Y__LEN   (8)
 
#define BMI160_USER_OFFSET_4_GYRO_OFF_Y__MSK   (0xFF)
 
#define BMI160_USER_OFFSET_4_GYRO_OFF_Y__REG   (BMI160_USER_OFFSET_4_ADDR)
 
#define BMI160_USER_OFFSET_5_GYRO_OFF_Z__POS   (0)
 
#define BMI160_USER_OFFSET_5_GYRO_OFF_Z__LEN   (8)
 
#define BMI160_USER_OFFSET_5_GYRO_OFF_Z__MSK   (0xFF)
 
#define BMI160_USER_OFFSET_5_GYRO_OFF_Z__REG   (BMI160_USER_OFFSET_5_ADDR)
 
#define BMI160_USER_OFFSET_6_GYRO_OFF_X__POS   (0)
 
#define BMI160_USER_OFFSET_6_GYRO_OFF_X__LEN   (2)
 
#define BMI160_USER_OFFSET_6_GYRO_OFF_X__MSK   (0x03)
 
#define BMI160_USER_OFFSET_6_GYRO_OFF_X__REG   (BMI160_USER_OFFSET_6_ADDR)
 
#define BMI160_USER_OFFSET_6_GYRO_OFF_Y__POS   (2)
 
#define BMI160_USER_OFFSET_6_GYRO_OFF_Y__LEN   (2)
 
#define BMI160_USER_OFFSET_6_GYRO_OFF_Y__MSK   (0x0C)
 
#define BMI160_USER_OFFSET_6_GYRO_OFF_Y__REG   (BMI160_USER_OFFSET_6_ADDR)
 
#define BMI160_USER_OFFSET_6_GYRO_OFF_Z__POS   (4)
 
#define BMI160_USER_OFFSET_6_GYRO_OFF_Z__LEN   (2)
 
#define BMI160_USER_OFFSET_6_GYRO_OFF_Z__MSK   (0x30)
 
#define BMI160_USER_OFFSET_6_GYRO_OFF_Z__REG   (BMI160_USER_OFFSET_6_ADDR)
 
ACCEL OFFSET ENABLE LENGTH, POSITION AND MASK
#define BMI160_USER_OFFSET_6_ACCEL_OFF_ENABLE__POS   (6)
 
#define BMI160_USER_OFFSET_6_ACCEL_OFF_ENABLE__LEN   (1)
 
#define BMI160_USER_OFFSET_6_ACCEL_OFF_ENABLE__MSK   (0x40)
 
#define BMI160_USER_OFFSET_6_ACCEL_OFF_ENABLE__REG   (BMI160_USER_OFFSET_6_ADDR)
 
GYRO OFFSET ENABLE LENGTH, POSITION AND MASK
#define BMI160_USER_OFFSET_6_GYRO_OFF_EN__POS   (7)
 
#define BMI160_USER_OFFSET_6_GYRO_OFF_EN__LEN   (1)
 
#define BMI160_USER_OFFSET_6_GYRO_OFF_EN__MSK   (0x80)
 
#define BMI160_USER_OFFSET_6_GYRO_OFF_EN__REG   (BMI160_USER_OFFSET_6_ADDR)
 
STEP COUNTER LENGTH, POSITION AND MASK
#define BMI160_USER_STEP_COUNT_LSB__POS   (0)
 
#define BMI160_USER_STEP_COUNT_LSB__LEN   (7)
 
#define BMI160_USER_STEP_COUNT_LSB__MSK   (0xFF)
 
#define BMI160_USER_STEP_COUNT_LSB__REG   (BMI160_USER_STEP_COUNT_0_ADDR)
 
#define BMI160_USER_STEP_COUNT_MSB__POS   (0)
 
#define BMI160_USER_STEP_COUNT_MSB__LEN   (7)
 
#define BMI160_USER_STEP_COUNT_MSB__MSK   (0xFF)
 
#define BMI160_USER_STEP_COUNT_MSB__REG   (BMI160_USER_STEP_COUNT_1_ADDR)
 
STEP COUNTER CONFIGURATION LENGTH, POSITION AND MASK
#define BMI160_USER_STEP_CONFIG_ZERO__POS   (0)
 
#define BMI160_USER_STEP_CONFIG_ZERO__LEN   (7)
 
#define BMI160_USER_STEP_CONFIG_ZERO__MSK   (0xFF)
 
#define BMI160_USER_STEP_CONFIG_ZERO__REG   (BMI160_USER_STEP_CONFIG_0_ADDR)
 
#define BMI160_USER_STEP_CONFIG_ONE_CNF1__POS   (0)
 
#define BMI160_USER_STEP_CONFIG_ONE_CNF1__LEN   (3)
 
#define BMI160_USER_STEP_CONFIG_ONE_CNF1__MSK   (0x07)
 
#define BMI160_USER_STEP_CONFIG_ONE_CNF1__REG   (BMI160_USER_STEP_CONFIG_1_ADDR)
 
#define BMI160_USER_STEP_CONFIG_ONE_CNF2__POS   (4)
 
#define BMI160_USER_STEP_CONFIG_ONE_CNF2__LEN   (4)
 
#define BMI160_USER_STEP_CONFIG_ONE_CNF2__MSK   (0xF0)
 
#define BMI160_USER_STEP_CONFIG_ONE_CNF2__REG   (BMI160_USER_STEP_CONFIG_1_ADDR)
 
STEP COUNTER ENABLE LENGTH, POSITION AND MASK
#define BMI160_USER_STEP_CONFIG_1_STEP_COUNT_ENABLE__POS   (3)
 
#define BMI160_USER_STEP_CONFIG_1_STEP_COUNT_ENABLE__LEN   (1)
 
#define BMI160_USER_STEP_CONFIG_1_STEP_COUNT_ENABLE__MSK   (0x08)
 
#define BMI160_USER_STEP_CONFIG_1_STEP_COUNT_ENABLE__REG   (BMI160_USER_STEP_CONFIG_1_ADDR)
 
COMMAND REGISTER LENGTH, POSITION AND MASK
#define BMI160_CMD_COMMANDS__POS   (0)
 
#define BMI160_CMD_COMMANDS__LEN   (8)
 
#define BMI160_CMD_COMMANDS__MSK   (0xFF)
 
#define BMI160_CMD_COMMANDS__REG   (BMI160_CMD_COMMANDS_ADDR)
 
PAGE ENABLE LENGTH, POSITION AND MASK
#define BMI160_CMD_TARGET_PAGE__POS   (4)
 
#define BMI160_CMD_TARGET_PAGE__LEN   (2)
 
#define BMI160_CMD_TARGET_PAGE__MSK   (0x30)
 
#define BMI160_CMD_TARGET_PAGE__REG   (BMI160_CMD_EXT_MODE_ADDR)
 
#define BMI160_CMD_PAGING_EN__POS   (7)
 
#define BMI160_CMD_PAGING_EN__LEN   (1)
 
#define BMI160_CMD_PAGING_EN__MSK   (0x80)
 
#define BMI160_CMD_PAGING_EN__REG   (BMI160_CMD_EXT_MODE_ADDR)
 
#define BMI160_COM_C_TRIM_FIVE__POS   (0)
 
#define BMI160_COM_C_TRIM_FIVE__LEN   (8)
 
#define BMI160_COM_C_TRIM_FIVE__MSK   (0xFF)
 
#define BMI160_COM_C_TRIM_FIVE__REG   (BMI160_COM_C_TRIM_FIVE_ADDR)
 
FIFO FRAME COUNT DEFINITION
#define FIFO_FRAME   (1024)
 
#define FIFO_CONFIG_CHECK1   (0x00)
 
#define FIFO_CONFIG_CHECK2   (0x80)
 
MAG SENSOR SELECT
#define BST_BMM   (0)
 
#define BST_AKM   (1)
 
#define BMI160_YAS537_I2C_ADDRESS   (0x2E)
 
ACCEL ODR
#define BMI160_ACCEL_OUTPUT_DATA_RATE_RESERVED   (0x00)
 
#define BMI160_ACCEL_OUTPUT_DATA_RATE_0_78HZ   (0x01)
 
#define BMI160_ACCEL_OUTPUT_DATA_RATE_1_56HZ   (0x02)
 
#define BMI160_ACCEL_OUTPUT_DATA_RATE_3_12HZ   (0x03)
 
#define BMI160_ACCEL_OUTPUT_DATA_RATE_6_25HZ   (0x04)
 
#define BMI160_ACCEL_OUTPUT_DATA_RATE_12_5HZ   (0x05)
 
#define BMI160_ACCEL_OUTPUT_DATA_RATE_25HZ   (0x06)
 
#define BMI160_ACCEL_OUTPUT_DATA_RATE_50HZ   (0x07)
 
#define BMI160_ACCEL_OUTPUT_DATA_RATE_100HZ   (0x08)
 
#define BMI160_ACCEL_OUTPUT_DATA_RATE_200HZ   (0x09)
 
#define BMI160_ACCEL_OUTPUT_DATA_RATE_400HZ   (0x0A)
 
#define BMI160_ACCEL_OUTPUT_DATA_RATE_800HZ   (0x0B)
 
#define BMI160_ACCEL_OUTPUT_DATA_RATE_1600HZ   (0x0C)
 
#define BMI160_ACCEL_OUTPUT_DATA_RATE_RESERVED0   (0x0D)
 
#define BMI160_ACCEL_OUTPUT_DATA_RATE_RESERVED1   (0x0E)
 
#define BMI160_ACCEL_OUTPUT_DATA_RATE_RESERVED2   (0x0F)
 
ACCEL BANDWIDTH PARAMETER
#define BMI160_ACCEL_OSR4_AVG1   (0)
 
#define BMI160_ACCEL_OSR2_AVG2   (1)
 
#define BMI160_ACCEL_NORMAL_AVG4   (2)
 
#define BMI160_ACCEL_CIC_AVG8   (3)
 
#define BMI160_ACCEL_RES_AVG2   (4)
 
#define BMI160_ACCEL_RES_AVG4   (5)
 
#define BMI160_ACCEL_RES_AVG8   (6)
 
#define BMI160_ACCEL_RES_AVG16   (7)
 
#define BMI160_ACCEL_RES_AVG32   (8)
 
#define BMI160_ACCEL_RES_AVG64   (9)
 
#define BMI160_ACCEL_RES_AVG128   (10)
 
#define BMI160_US_DISABLE   (0)
 
#define BMI160_US_ENABLE   (1)
 
GYRO ODR
#define BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED   (0x00)
 
#define BMI160_GYRO_OUTPUT_DATA_RATE_25HZ   (0x06)
 
#define BMI160_GYRO_OUTPUT_DATA_RATE_50HZ   (0x07)
 
#define BMI160_GYRO_OUTPUT_DATA_RATE_100HZ   (0x08)
 
#define BMI160_GYRO_OUTPUT_DATA_RATE_200HZ   (0x09)
 
#define BMI160_GYRO_OUTPUT_DATA_RATE_400HZ   (0x0A)
 
#define BMI160_GYRO_OUTPUT_DATA_RATE_800HZ   (0x0B)
 
#define BMI160_GYRO_OUTPUT_DATA_RATE_1600HZ   (0x0C)
 
#define BMI160_GYRO_OUTPUT_DATA_RATE_3200HZ   (0x0D)
 
GYRO BANDWIDTH PARAMETER
#define BMI160_GYRO_OSR4_MODE   (0x00)
 
#define BMI160_GYRO_OSR2_MODE   (0x01)
 
#define BMI160_GYRO_NORMAL_MODE   (0x02)
 
#define BMI160_GYRO_CIC_MODE   (0x03)
 
GYROSCOPE RANGE PARAMETER
#define BMI160_GYRO_RANGE_2000_DEG_SEC   (0x00)
 
#define BMI160_GYRO_RANGE_1000_DEG_SEC   (0x01)
 
#define BMI160_GYRO_RANGE_500_DEG_SEC   (0x02)
 
#define BMI160_GYRO_RANGE_250_DEG_SEC   (0x03)
 
#define BMI160_GYRO_RANGE_125_DEG_SEC   (0x04)
 
MAG ODR
#define BMI160_MAG_OUTPUT_DATA_RATE_RESERVED   (0x00)
 
#define BMI160_MAG_OUTPUT_DATA_RATE_0_78HZ   (0x01)
 
#define BMI160_MAG_OUTPUT_DATA_RATE_1_56HZ   (0x02)
 
#define BMI160_MAG_OUTPUT_DATA_RATE_3_12HZ   (0x03)
 
#define BMI160_MAG_OUTPUT_DATA_RATE_6_25HZ   (0x04)
 
#define BMI160_MAG_OUTPUT_DATA_RATE_12_5HZ   (0x05)
 
#define BMI160_MAG_OUTPUT_DATA_RATE_25HZ   (0x06)
 
#define BMI160_MAG_OUTPUT_DATA_RATE_50HZ   (0x07)
 
#define BMI160_MAG_OUTPUT_DATA_RATE_100HZ   (0x08)
 
#define BMI160_MAG_OUTPUT_DATA_RATE_200HZ   (0x09)
 
#define BMI160_MAG_OUTPUT_DATA_RATE_400HZ   (0x0A)
 
#define BMI160_MAG_OUTPUT_DATA_RATE_800HZ   (0x0B)
 
#define BMI160_MAG_OUTPUT_DATA_RATE_1600HZ   (0x0C)
 
#define BMI160_MAG_OUTPUT_DATA_RATE_RESERVED0   (0x0D)
 
#define BMI160_MAG_OUTPUT_DATA_RATE_RESERVED1   (0x0E)
 
#define BMI160_MAG_OUTPUT_DATA_RATE_RESERVED2   (0x0F)
 
ENABLE/DISABLE SELECTIONS
#define ACCEL_OFFSET_ENABLE   (0x01)
 
#define GYRO_OFFSET_ENABLE   (0x01)
 
#define START_FOC_ACCEL_GYRO   (0X03)
 
#define BMI160_ANY_MOTION_X_ENABLE   (0)
 
#define BMI160_ANY_MOTION_Y_ENABLE   (1)
 
#define BMI160_ANY_MOTION_Z_ENABLE   (2)
 
#define BMI160_DOUBLE_TAP_ENABLE   (4)
 
#define BMI160_SINGLE_TAP_ENABLE   (5)
 
#define BMI160_ORIENT_ENABLE   (6)
 
#define BMI160_FLAT_ENABLE   (7)
 
#define BMI160_HIGH_G_X_ENABLE   (0)
 
#define BMI160_HIGH_G_Y_ENABLE   (1)
 
#define BMI160_HIGH_G_Z_ENABLE   (2)
 
#define BMI160_LOW_G_ENABLE   (3)
 
#define BMI160_DATA_RDY_ENABLE   (4)
 
#define BMI160_FIFO_FULL_ENABLE   (5)
 
#define BMI160_FIFO_WM_ENABLE   (6)
 
#define BMI160_NOMOTION_X_ENABLE   (0)
 
#define BMI160_NOMOTION_Y_ENABLE   (1)
 
#define BMI160_NOMOTION_Z_ENABLE   (2)
 
#define FOC_X_AXIS   (0)
 
#define FOC_Y_AXIS   (1)
 
#define FOC_Z_AXIS   (2)
 
#define BMI160_INTR1_EDGE_CTRL   (0)
 
#define BMI160_INTR2_EDGE_CTRL   (1)
 
#define BMI160_INTR1_LEVEL   (0)
 
#define BMI160_INTR2_LEVEL   (1)
 
#define BMI160_INTR1_OUTPUT_TYPE   (0)
 
#define BMI160_INTR2_OUTPUT_TYPE   (1)
 
#define BMI160_INTR1_OUTPUT_ENABLE   (0)
 
#define BMI160_INTR2_OUTPUT_ENABLE   (1)
 
#define BMI160_INTR1_INPUT_ENABLE   (0)
 
#define BMI160_INTR2_INPUT_ENABLE   (1)
 
#define BMI160_INTR1_MAP_LOW_G   (0)
 
#define BMI160_INTR2_MAP_LOW_G   (1)
 
#define BMI160_INTR1_MAP_HIGH_G   (0)
 
#define BMI160_INTR2_MAP_HIGH_G   (1)
 
#define BMI160_INTR1_MAP_ANY_MOTION   (0)
 
#define BMI160_INTR2_MAP_ANY_MOTION   (1)
 
#define BMI160_INTR1_MAP_NOMO   (0)
 
#define BMI160_INTR2_MAP_NOMO   (1)
 
#define BMI160_INTR1_MAP_DOUBLE_TAP   (0)
 
#define BMI160_INTR2_MAP_DOUBLE_TAP   (1)
 
#define BMI160_INTR1_MAP_SINGLE_TAP   (0)
 
#define BMI160_INTR2_MAP_SINGLE_TAP   (1)
 
#define BMI160_INTR1_MAP_ORIENT   (0)
 
#define BMI160_INTR2_MAP_ORIENT   (1)
 
#define BMI160_INTR1_MAP_FLAT   (0)
 
#define BMI160_INTR2_MAP_FLAT   (1)
 
#define BMI160_INTR1_MAP_DATA_RDY   (0)
 
#define BMI160_INTR2_MAP_DATA_RDY   (1)
 
#define BMI160_INTR1_MAP_FIFO_WM   (0)
 
#define BMI160_INTR2_MAP_FIFO_WM   (1)
 
#define BMI160_INTR1_MAP_FIFO_FULL   (0)
 
#define BMI160_INTR2_MAP_FIFO_FULL   (1)
 
#define BMI160_INTR1_MAP_PMUTRIG   (0)
 
#define BMI160_INTR2_MAP_PMUTRIG   (1)
 
#define BMI160_MAP_INTR1   (0)
 
#define BMI160_MAP_INTR2   (1)
 
TAP DURATION
#define BMI160_TAP_DURN_50MS   (0x00)
 
#define BMI160_TAP_DURN_100MS   (0x01)
 
#define BMI160_TAP_DURN_150MS   (0x02)
 
#define BMI160_TAP_DURN_200MS   (0x03)
 
#define BMI160_TAP_DURN_250MS   (0x04)
 
#define BMI160_TAP_DURN_375MS   (0x05)
 
#define BMI160_TAP_DURN_500MS   (0x06)
 
#define BMI160_TAP_DURN_700MS   (0x07)
 
TAP SHOCK
#define BMI160_TAP_SHOCK_50MS   (0x00)
 
#define BMI160_TAP_SHOCK_75MS   (0x01)
 
TAP QUIET
#define BMI160_TAP_QUIET_30MS   (0x00)
 
#define BMI160_TAP_QUIET_20MS   (0x01)
 
STEP DETECTION SELECTION MODES
#define BMI160_STEP_NORMAL_MODE   (0)
 
#define BMI160_STEP_SENSITIVE_MODE   (1)
 
#define BMI160_STEP_ROBUST_MODE   (2)
 
STEP CONFIGURATION SELECT MODE
#define STEP_CONFIG_NORMAL   (0X315)
 
#define STEP_CONFIG_SENSITIVE   (0X2D)
 
#define STEP_CONFIG_ROBUST   (0X71D)
 
BMM150 TRIM DATA DEFINITIONS
#define BMI160_MAG_DIG_X1   (0x5D)
 
#define BMI160_MAG_DIG_Y1   (0x5E)
 
#define BMI160_MAG_DIG_Z4_LSB   (0x62)
 
#define BMI160_MAG_DIG_Z4_MSB   (0x63)
 
#define BMI160_MAG_DIG_X2   (0x64)
 
#define BMI160_MAG_DIG_Y2   (0x65)
 
#define BMI160_MAG_DIG_Z2_LSB   (0x68)
 
#define BMI160_MAG_DIG_Z2_MSB   (0x69)
 
#define BMI160_MAG_DIG_Z1_LSB   (0x6A)
 
#define BMI160_MAG_DIG_Z1_MSB   (0x6B)
 
#define BMI160_MAG_DIG_XYZ1_LSB   (0x6C)
 
#define BMI160_MAG_DIG_XYZ1_MSB   (0x6D)
 
#define BMI160_MAG_DIG_Z3_LSB   (0x6E)
 
#define BMI160_MAG_DIG_Z3_MSB   (0x6F)
 
#define BMI160_MAG_DIG_XY2   (0x70)
 
#define BMI160_MAG_DIG_XY1   (0x71)
 
BMM150 PRE-SET MODE DEFINITIONS
#define BMI160_MAG_PRESETMODE_LOWPOWER   (1)
 
#define BMI160_MAG_PRESETMODE_REGULAR   (2)
 
#define BMI160_MAG_PRESETMODE_HIGHACCURACY   (3)
 
#define BMI160_MAG_PRESETMODE_ENHANCED   (4)
 
BMM150 PRESET MODES - DATA RATES
#define BMI160_MAG_LOWPOWER_DR   (0x02)
 
#define BMI160_MAG_REGULAR_DR   (0x02)
 
#define BMI160_MAG_HIGHACCURACY_DR   (0x2A)
 
#define BMI160_MAG_ENHANCED_DR   (0x02)
 
BMM150 PRESET MODES - REPETITIONS-XY RATES
#define BMI160_MAG_LOWPOWER_REPXY   (1)
 
#define BMI160_MAG_REGULAR_REPXY   (4)
 
#define BMI160_MAG_HIGHACCURACY_REPXY   (23)
 
#define BMI160_MAG_ENHANCED_REPXY   (7)
 
BMM150 PRESET MODES - REPETITIONS-Z RATES
#define BMI160_MAG_LOWPOWER_REPZ   (2)
 
#define BMI160_MAG_REGULAR_REPZ   (14)
 
#define BMI160_MAG_HIGHACCURACY_REPZ   (82)
 
#define BMI160_MAG_ENHANCED_REPZ   (26)
 
#define BMI160_MAG_NOAMRL_SWITCH_TIMES   (5)
 
#define MAG_INTERFACE_PMU_ENABLE   (1)
 
#define MAG_INTERFACE_PMU_DISABLE   (0)
 
USED FOR MAG OVERFLOW CHECK FOR BMM150
#define BMI160_MAG_OVERFLOW_OUTPUT   ((s16)-32768)
 
#define BMI160_MAG_OVERFLOW_OUTPUT_S32   ((s32)(-2147483647-1))
 
#define BMI160_MAG_NEGATIVE_SATURATION_Z   ((s16)-32767)
 
#define BMI160_MAG_POSITIVE_SATURATION_Z   ((u16)32767)
 
#define BMI160_MAG_FLIP_OVERFLOW_ADCVAL   ((s16)-4096)
 
#define BMI160_MAG_HALL_OVERFLOW_ADCVAL   ((s16)-16384)
 
BMM150 REGISTER DEFINITION
#define BMI160_BMM150_CHIP_ID   (0x40)
 
#define BMI160_BMM150_POWE_CONTROL_REG   (0x4B)
 
#define BMI160_BMM150_POWE_MODE_REG   (0x4C)
 
#define BMI160_BMM150_DATA_REG   (0x42)
 
#define BMI160_BMM150_XY_REP   (0x51)
 
#define BMI160_BMM150_Z_REP   (0x52)
 
AKM COMPENSATING DATA REGISTERS
#define BMI160_BST_AKM_ASAX   (0x60)
 
#define BMI160_BST_AKM_ASAY   (0x61)
 
#define BMI160_BST_AKM_ASAZ   (0x62)
 
AKM POWER MODE SELECTION
#define AKM_POWER_DOWN_MODE   (0)
 
#define AKM_SINGLE_MEAS_MODE   (1)
 
#define FUSE_ROM_MODE   (2)
 
SECONDARY_MAG POWER MODE SELECTION
#define BMI160_MAG_FORCE_MODE   (0)
 
#define BMI160_MAG_SUSPEND_MODE   (1)
 
MAG POWER MODE SELECTION
#define FORCE_MODE   (0)
 
#define SUSPEND_MODE   (1)
 
#define NORMAL_MODE   (2)
 
#define MAG_SUSPEND_MODE   (1)
 
FIFO CONFIGURATIONS
#define FIFO_HEADER_ENABLE   (0x01)
 
#define FIFO_MAG_ENABLE   (0x01)
 
#define FIFO_ACCEL_ENABLE   (0x01)
 
#define FIFO_GYRO_ENABLE   (0x01)
 
#define FIFO_TIME_ENABLE   (0x01)
 
#define FIFO_STOPONFULL_ENABLE   (0x01)
 
#define FIFO_WM_INTERRUPT_ENABLE   (0x01)
 
#define BMI160_FIFO_INDEX_LENGTH   (1)
 
#define BMI160_FIFO_TAG_INTR_MASK   (0xFC)
 
#define FIFO_HEAD_A   (0x84)
 
#define FIFO_HEAD_G   (0x88)
 
#define FIFO_HEAD_M   (0x90)
 
#define FIFO_HEAD_G_A   (0x8C)
 
#define FIFO_HEAD_M_A   (0x94)
 
#define FIFO_HEAD_M_G   (0x98)
 
#define FIFO_HEAD_M_G_A   (0x9C)
 
#define FIFO_HEAD_SENSOR_TIME   (0x44)
 
#define FIFO_HEAD_INPUT_CONFIG   (0x48)
 
#define FIFO_HEAD_SKIP_FRAME   (0x40)
 
#define FIFO_HEAD_OVER_READ_LSB   (0x80)
 
#define FIFO_HEAD_OVER_READ_MSB   (0x00)
 
#define FIFO_INPUT_CONFIG_OVER_LEN   ((s8)-11)
 
#define FIFO_OVER_READ_RETURN   ((s8)-10)
 
#define FIFO_SENSORTIME_RETURN   ((s8)-9)
 
#define FIFO_SKIP_OVER_LEN   ((s8)-8)
 
#define FIFO_M_G_A_OVER_LEN   ((s8)-7)
 
#define FIFO_M_G_OVER_LEN   ((s8)-6)
 
#define FIFO_M_A_OVER_LEN   ((s8)-5)
 
#define FIFO_G_A_OVER_LEN   ((s8)-4)
 
#define FIFO_M_OVER_LEN   ((s8)-3)
 
#define FIFO_G_OVER_LEN   ((s8)-2)
 
#define FIFO_A_OVER_LEN   ((s8)-1)
 
ACCEL POWER MODE
#define ACCEL_MODE_NORMAL   (0x11)
 
#define ACCEL_LOWPOWER   (0X12)
 
#define ACCEL_SUSPEND   (0X10)
 
#define BMI160_ACCEL_SUSPEND   0
 
#define BMI160_ACCEL_NORMAL_MODE   1
 
#define BMI160_ACCEL_LOW_POWER   2
 
GYRO POWER MODE
#define GYRO_MODE_SUSPEND   (0x14)
 
#define GYRO_MODE_NORMAL   (0x15)
 
#define GYRO_MODE_FASTSTARTUP   (0x17)
 
MAG POWER MODE
#define MAG_MODE_SUSPEND   (0x18)
 
#define MAG_MODE_NORMAL   (0x19)
 
#define MAG_MODE_LOWPOWER   (0x1A)
 
ENABLE/DISABLE BIT VALUES
#define BMI160_ENABLE   (0x01)
 
#define BMI160_DISABLE   (0x00)
 
INTERRUPT EDGE TRIGGER ENABLE
#define BMI160_EDGE   (0x01)
 
#define BMI160_LEVEL   (0x00)
 
INTERRUPT LEVEL ENABLE
#define BMI160_LEVEL_LOW   (0x00)
 
#define BMI160_LEVEL_HIGH   (0x01)
 
INTERRUPT OUTPUT ENABLE
#define BMI160_OPEN_DRAIN   (0x01)
 
#define BMI160_PUSH_PULL   (0x00)
 
#define BMI160_INPUT   (0x01)
 
#define BMI160_OUTPUT   (0x00)
 
INTERRUPT TAP SOURCE ENABLE
#define FILTER_DATA   (0x00)
 
#define UNFILTER_DATA   (0x01)
 
SLOW MOTION/ NO MOTION SELECT
#define SLOW_MOTION   (0x00)
 
#define NO_MOTION   (0x01)
 
SIGNIFICANT MOTION SELECTION
#define ANY_MOTION   (0x00)
 
#define SIGNIFICANT_MOTION   (0x01)
 
LATCH DURATION
#define BMI160_LATCH_DUR_NONE   (0x00)
 
#define BMI160_LATCH_DUR_312_5_MICRO_SEC   (0x01)
 
#define BMI160_LATCH_DUR_625_MICRO_SEC   (0x02)
 
#define BMI160_LATCH_DUR_1_25_MILLI_SEC   (0x03)
 
#define BMI160_LATCH_DUR_2_5_MILLI_SEC   (0x04)
 
#define BMI160_LATCH_DUR_5_MILLI_SEC   (0x05)
 
#define BMI160_LATCH_DUR_10_MILLI_SEC   (0x06)
 
#define BMI160_LATCH_DUR_20_MILLI_SEC   (0x07)
 
#define BMI160_LATCH_DUR_40_MILLI_SEC   (0x08)
 
#define BMI160_LATCH_DUR_80_MILLI_SEC   (0x09)
 
#define BMI160_LATCH_DUR_160_MILLI_SEC   (0x0A)
 
#define BMI160_LATCH_DUR_320_MILLI_SEC   (0x0B)
 
#define BMI160_LATCH_DUR_640_MILLI_SEC   (0x0C)
 
#define BMI160_LATCH_DUR_1_28_SEC   (0x0D)
 
#define BMI160_LATCH_DUR_2_56_SEC   (0x0E)
 
#define BMI160_LATCHED   (0x0F)
 
GYRO OFFSET MASK DEFINITION
#define BMI160_GYRO_MANUAL_OFFSET_0_7   (0x00FF)
 
#define BMI160_GYRO_MANUAL_OFFSET_8_9   (0x0300)
 
STEP CONFIGURATION MASK DEFINITION
#define BMI160_STEP_CONFIG_0_7   (0x00FF)
 
#define BMI160_STEP_CONFIG_8_10   (0x0700)
 
#define BMI160_STEP_CONFIG_11_14   (0xF000)
 
DEFINITION USED FOR DIFFERENT WRITE
#define BMI160_WRITE_TARGET_PAGE0   (0x00)
 
#define BMI160_WRITE_TARGET_PAGE1   (0x01)
 
#define BMI160_WRITE_ENABLE_PAGE1   (0x01)
 
#define BMI160_MANUAL_DISABLE   (0x00)
 
#define BMI160_MANUAL_ENABLE   (0x01)
 
#define BMI160_YAS_DISABLE_RCOIL   (0x00)
 
#define BMI160_ENABLE_MAG_IF_MODE   (0x02)
 
#define BMI160_ENABLE_ANY_MOTION_INTR1   (0x04)
 
#define BMI160_ENABLE_ANY_MOTION_INTR2   (0x04)
 
#define BMI160_MAG_DATA_READ_REG   (0x04)
 
#define BMI160_BMM_POWER_MODE_REG   (0x06)
 
#define BMI160_ENABLE_ANY_MOTION_AXIS   (0x07)
 
#define BMI160_ENABLE_LOW_G   (0x08)
 
#define BMI160_YAS532_ACQ_START   (0x11)
 
#define BMI160_YAS_DEVICE_ID_REG   (0x80)
 
#define BMI160_FIFO_GYRO_ENABLE   (0x80)
 
#define BMI160_SIG_MOTION_INTR_ENABLE   (0x01)
 
#define BMI160_STEP_DETECT_INTR_ENABLE   (0x01)
 
#define BMI160_LOW_G_INTR_STAT   (0x01)
 
#define BMI160_PULL_UP_DATA   (0x30)
 
#define BMI160_FIFO_M_G_A_ENABLE   (0xE0)
 
#define BMI160_FIFO_M_G_ENABLE   (0xA0)
 
#define BMI160_FIFO_M_A_ENABLE   (0x60)
 
#define BMI160_FIFO_G_A_ENABLE   (0xC0)
 
#define BMI160_FIFO_A_ENABLE   (0x40)
 
#define BMI160_FIFO_M_ENABLE   (0x20)
 
#define BMI160_SEC_IF_BMM150   (0)
 
#define BMI160_SEC_IF_AKM09911   (1)
 
#define BMI160_SEC_IF_AKM09912   (2)
 
#define BMI160_SEC_IF_YAS532   (3)
 
#define BMI160_SEC_IF_YAS537   (4)
 
MAG INIT DEFINITION
#define BMI160_COMMAND_REG_ONE   (0x37)
 
#define BMI160_COMMAND_REG_TWO   (0x9A)
 
#define BMI160_COMMAND_REG_THREE   (0xC0)
 
#define RESET_STEP_COUNTER   (0xB2)
 
BIT SLICE GET AND SET FUNCTIONS
#define BMI160_GET_BITSLICE(regvar, bitname)   ((regvar & bitname##__MSK) >> bitname##__POS)
 
#define BMI160_SET_BITSLICE(regvar, bitname, val)
 

Typedefs

typedef signed short int s16
 
typedef signed int s32
 
typedef signed long long int s64
 
typedef signed char s8
 If your machine support 16 bit define the MACHINE_16_BIT. More...
 
typedef unsigned short int u16
 
typedef unsigned int u32
 
typedef unsigned long long int u64
 
typedef unsigned char u8
 

Functions

FUNCTION FOR BMI160 INITIALIZE
BMI160_RETURN_FUNCTION_TYPE bmi160_init (struct bmi160_t *bmi160)
 This function is used for initialize bus read and bus write functions assign the chip id and device address chip id is read in the register 0x00 bit from 0 to 7. More...
 
FUNCTION FOR READ AND WRITE REGISTERS
BMI160_RETURN_FUNCTION_TYPE bmi160_write_reg (u8 v_addr_u8, u8 *v_data_u8, u8 v_len_u8)
 This API write the data to the given register. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_reg (u8 v_addr_u8, u8 *v_data_u8, u8 v_len_u8)
 This API reads the data from the given register. More...
 
FUNCTION FOR ERROR CODES
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fatal_err (u8 *v_fatal_err_u8)
 This API used to reads the fatal error from the Register 0x02 bit 0 This flag will be reset only by power-on-reset and soft reset. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_err_code (u8 *v_error_code_u8)
 This API used to read the error code from register 0x02 bit 1 to 4. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_i2c_fail_err (u8 *v_i2c_error_code_u8)
 This API Reads the i2c error code from the Register 0x02 bit 5. This error occurred in I2C master detected. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_drop_cmd_err (u8 *v_drop_cmd_err_u8)
 This API Reads the dropped command error from the register 0x02 bit 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_data_rdy_err (u8 *v_mag_data_rdy_err_u8)
 This API reads the magnetometer data ready interrupt not active. It reads from the error register 0x0x2 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_error_status (u8 *v_fatal_er_u8r, u8 *v_err_code_u8, u8 *v_i2c_fail_err_u8, u8 *v_drop_cmd_err_u8, u8 *v_mag_data_rdy_err_u8)
 This API reads the error status from the error register 0x02 bit 0 to 7. More...
 
FUNCTIONS FOR MAG,ACCEL AND GYRO POWER MODE STATUS
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_power_mode_stat (u8 *v_mag_power_mode_stat_u8)
 This API reads the magnetometer power mode from PMU status register 0x03 bit 0 and 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_power_mode_stat (u8 *v_gyro_power_mode_stat_u8)
 This API reads the gyroscope power mode from PMU status register 0x03 bit 2 and 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_power_mode_stat (u8 *v_accel_power_mode_stat_u8)
 This API reads the accelerometer power mode from PMU status register 0x03 bit 4 and 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_interface_normal (void)
 This API switch mag interface to normal mode and confirm whether the mode switching done successfully or not. More...
 
FUNCTION FOR Mag XYZ data read
BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_x (s16 *v_mag_x_s16, u8 v_sensor_select_u8)
 This API reads magnetometer data X values from the register 0x04 and 0x05. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_y (s16 *v_mag_y_s16, u8 v_sensor_select_u8)
 This API reads magnetometer data Y values from the register 0x06 and 0x07. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_z (s16 *v_mag_z_s16, u8 v_sensor_select_u8)
 This API reads magnetometer data Z values from the register 0x08 and 0x09. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_r (s16 *v_mag_r_s16)
 This API reads magnetometer data RHALL values from the register 0x0A and 0x0B. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_xyz (struct bmi160_mag_t *mag, u8 v_sensor_select_u8)
 This API reads magnetometer data X,Y,Z values from the register 0x04 to 0x09. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_xyzr (struct bmi160_mag_xyzr_t *mag)
 This API reads magnetometer data X,Y,Z,r values from the register 0x04 to 0x0B. More...
 
FUNCTION FOR GYRO XYZ DATA READ
BMI160_RETURN_FUNCTION_TYPE bmi160_read_gyro_x (s16 *v_gyro_x_s16)
 This API reads gyro data X values form the register 0x0C and 0x0D. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_gyro_y (s16 *v_gyro_y_s16)
 This API reads gyro data Y values form the register 0x0E and 0x0F. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_gyro_z (s16 *v_gyro_z_s16)
 This API reads gyro data Z values form the register 0x10 and 0x11. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_gyro_xyz (struct bmi160_gyro_t *gyro)
 This API reads gyro data X,Y,Z values from the register 0x0C to 0x11. More...
 
FUNCTION FOR ACCEL XYZ DATA READ
BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_x (s16 *v_accel_x_s16)
 This API reads accelerometer data X values form the register 0x12 and 0x13. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_y (s16 *v_accel_y_s16)
 This API reads accelerometer data Y values form the register 0x14 and 0x15. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_z (s16 *v_accel_z_s16)
 This API reads accelerometer data Z values form the register 0x16 and 0x17. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_xyz (struct bmi160_accel_t *accel)
 This API reads accelerometer data X,Y,Z values from the register 0x12 to 0x17. More...
 
FUNCTION FOR SENSOR TIME
BMI160_RETURN_FUNCTION_TYPE bmi160_get_sensor_time (u32 *v_sensor_time_u32)
 This API reads sensor_time from the register 0x18 to 0x1A. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_gyro_sensor_time (u8 accel_gyro_sensortime_select, struct bmi160_sensortime_accel_gyro_data *accel_gyro_sensor_time)
 This API reads sensor_time ,Accel data ,Gyro data from the register 0x0C to 0x1A. More...
 
FUNCTION FOR GYRO SLEF TEST
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_selftest (u8 *v_gyro_selftest_u8)
 This API reads the Gyroscope self test status from the register 0x1B bit 1. More...
 
FUNCTION FOR MANUAL INTERFACE
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_manual_operation_stat (u8 *v_mag_manual_stat_u8)
 This API reads the status of mag manual interface operation form the register 0x1B bit 2. More...
 
FUNCTION FOR FAST OFFSET READY
BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_rdy (u8 *v_foc_rdy_u8)
 This API reads the fast offset compensation status form the register 0x1B bit 3. More...
 
FUNCTION FOR NVM READY
BMI160_RETURN_FUNCTION_TYPE bmi160_get_nvm_rdy (u8 *v_nvm_rdy_u8)
 This API Reads the nvm_rdy status from the resister 0x1B bit 4. More...
 
FUNCTION FOR DATA READY FOR MAG, GYRO, AND ACCEL
BMI160_RETURN_FUNCTION_TYPE bmi160_get_data_rdy_mag (u8 *v_data_rdy_u8)
 This API reads the status of mag data ready from the register 0x1B bit 5 The status get reset when one mag data register is read out. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_data_rdy (u8 *v_data_rdy_u8)
 This API reads the status of gyro data ready form the register 0x1B bit 6 The status get reset when gyro data register read out. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_data_rdy (u8 *drdy_acc)
 This API reads the status of accel data ready form the register 0x1B bit 7 The status get reset when accel data register read out. More...
 
FUNCTION FOR STEP INTERRUPT STATUS
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_step_intr (u8 *v_step_intr_u8)
 This API reads the step detector interrupt status from the register 0x1C bit 0 flag is associated with a specific interrupt function. It is set when the single tab interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
FUNCTION FOR SIGNIFICANT INTERRUPT STATUS
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_significant_intr (u8 *sigmot_intr)
 This API reads the significant motion interrupt status from the register 0x1C bit 1 flag is associated with a specific interrupt function. It is set when the single tab interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
FUNCTION FOR ANY MOTION INTERRUPT STATUS
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_any_motion_intr (u8 *v_any_motion_intr_u8)
 This API reads the any motion interrupt status from the register 0x1C bit 2 flag is associated with a specific interrupt function. It is set when the single tab interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
FUNCTION FOR PMU TRIGGER INTERRUPT STATUS
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_pmu_trigger_intr (u8 *v_pmu_trigger_intr_u8)
 This API reads the power mode trigger interrupt status from the register 0x1C bit 3 flag is associated with a specific interrupt function. It is set when the single tab interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
FUNCTION FOR DOUBLE TAB STATUS
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_double_tap_intr (u8 *v_double_tap_intr_u8)
 This API reads the double tab status from the register 0x1C bit 4 flag is associated with a specific interrupt function. It is set when the single tab interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
FUNCTION FOR SINGLE TAB STATUS
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_single_tap_intr (u8 *v_single_tap_intr_u8)
 This API reads the single tab status from the register 0x1C bit 5 flag is associated with a specific interrupt function. It is set when the single tab interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
FUNCTION FOR ORIENT INTERRUPT STATUS
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_orient_intr (u8 *v_orient_intr_u8)
 This API reads the orient status from the register 0x1C bit 6 flag is associated with a specific interrupt function. It is set when the orient interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
FUNCTION FOR FLAT INTERRUPT STATUS
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_flat_intr (u8 *v_flat_intr_u8)
 This API reads the flat interrupt status from the register 0x1C bit 7 flag is associated with a specific interrupt function. It is set when the flat interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
FUNCTION FOR HIGH_G INTERRUPT STATUS
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_high_g_intr (u8 *v_high_g_intr_u8)
 This API reads the high_g interrupt status from the register 0x1D bit 2 flag is associated with a specific interrupt function. It is set when the high g interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
FUNCTION FOR LOW_G INTERRUPT STATUS
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_low_g_intr (u8 *v_low_g_intr_u8)
 This API reads the low g interrupt status from the register 0x1D bit 3 flag is associated with a specific interrupt function. It is set when the low g interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
FUNCTION FOR DATA READY INTERRUPT STATUS
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_data_rdy_intr (u8 *v_data_rdy_intr_u8)
 This API reads data ready interrupt status from the register 0x1D bit 4 flag is associated with a specific interrupt function. It is set when the data ready interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
FUNCTIONS FOR FIFO FULL AND WATER MARK INTERRUPT STATUS
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_fifo_full_intr (u8 *v_fifo_full_intr_u8)
 This API reads data ready FIFO full interrupt status from the register 0x1D bit 5 flag is associated with a specific interrupt function. It is set when the FIFO full interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_fifo_wm_intr (u8 *v_fifo_wm_intr_u8)
 This API reads data ready FIFO watermark interrupt status from the register 0x1D bit 6 flag is associated with a specific interrupt function. It is set when the FIFO watermark interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
FUNCTIONS FOR NO MOTION INTERRUPT STATUS
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_nomotion_intr (u8 *nomo_intr)
 This API reads data ready no motion interrupt status from the register 0x1D bit 7 flag is associated with a specific interrupt function. It is set when the no motion interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
FUNCTIONS FOR ANY MOTION FIRST XYZ AND SIGN INTERRUPT STATUS
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_any_motion_first_x (u8 *v_anymotion_first_x_u8)
 This API reads the status of any motion first x from the register 0x1E bit 0. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_any_motion_first_y (u8 *v_any_motion_first_y_u8)
 This API reads the status of any motion first y interrupt from the register 0x1E bit 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_any_motion_first_z (u8 *v_any_motion_first_z_u8)
 This API reads the status of any motion first z interrupt from the register 0x1E bit 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_any_motion_sign (u8 *v_anymotion_sign_u8)
 This API reads the any motion sign status from the register 0x1E bit 3. More...
 
FUNCTIONS FOR TAP FIRST XYZ AND SIGN INTERRUPT STATUS
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_tap_first_x (u8 *v_tap_first_x_u8)
 This API reads the any motion tap first x status from the register 0x1E bit 4. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_tap_first_y (u8 *v_tap_first_y_u8)
 This API reads the tap first y interrupt status from the register 0x1E bit 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_tap_first_z (u8 *v_tap_first_z_u8)
 This API reads the tap first z interrupt status from the register 0x1E bit 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_tap_sign (u8 *tap_sign)
 This API reads the tap sign status from the register 0x1E bit 7. More...
 
FUNCTIONS FOR HIGH_G FIRST XYZ AND SIGN INTERRUPT STATUS
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_high_g_first_x (u8 *v_high_g_first_x_u8)
 This API reads the high_g first x status from the register 0x1F bit 0. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_high_g_first_y (u8 *v_high_g_first_y_u8)
 This API reads the high_g first y status from the register 0x1F bit 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_high_g_first_z (u8 *v_high_g_first_z_u8)
 This API reads the high_g first z status from the register 0x1F bit 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_high_g_sign (u8 *v_high_g_sign_u8)
 This API reads the high sign status from the register 0x1F bit 3. More...
 
FUNCTIONS FOR ORIENT XY AND Z INTERRUPT STATUS
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_orient_xy (u8 *v_orient_xy_u8)
 This API reads the status of orient_xy plane from the register 0x1F bit 4 and 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_orient_z (u8 *v_orient_z_u8)
 This API reads the status of orient z plane from the register 0x1F bit 6. More...
 
FUNCTIONS FOR FLAT INTERRUPT STATUS
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_flat (u8 *flat)
 This API reads the flat status from the register 0x1F bit 7. More...
 
FUNCTION FOR TEMPERATUE READ
BMI160_RETURN_FUNCTION_TYPE bmi160_get_temp (s16 *v_temp_s16)
 This API reads the temperature of the sensor from the register 0x21 bit 0 to 7. More...
 
FUNCTION FOR FIFO LENGTH AND FIFO DATA READ
BMI160_RETURN_FUNCTION_TYPE bmi160_fifo_length (u32 *v_fifo_length_u32)
 This API reads the of the sensor form the register 0x23 and 0x24 bit 0 to 7 and 0 to 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_fifo_data (u8 *v_fifodata_u8, u16 v_fifo_length_u16)
 This API reads the fifo data of the sensor from the register 0x24. More...
 
FUNCTION FOR ACCEL CONFIGURATIONS
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_output_data_rate (u8 *v_output_data_rate_u8)
 This API is used to get the accel output date rate form the register 0x40 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_output_data_rate (u8 v_output_data_rate_u8, u8 v_accel_bw_u8)
 This API is used to set the accel output date rate form the register 0x40 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_bw (u8 *v_bw_u8)
 This API is used to get the accel bandwidth from the register 0x40 bit 4 to 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_bw (u8 v_bw_u8)
 This API is used to set the accel bandwidth from the register 0x40 bit 4 to 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_under_sampling_parameter (u8 *v_accel_under_sampling_u8)
 This API is used to get the accel under sampling parameter form the register 0x40 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_under_sampling_parameter (u8 v_accel_under_sampling_u8)
 This API is used to set the accel under sampling parameter form the register 0x40 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_range (u8 *v_range_u8)
 This API is used to get the ranges (g values) of the accel from the register 0x41 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_range (u8 v_range_u8)
 This API is used to set the ranges (g values) of the accel from the register 0x41 bit 0 to 3. More...
 
FUNCTION FOR GYRO CONFIGURATIONS
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_output_data_rate (u8 *gyro_output_typer)
 This API is used to get the gyroscope output data rate from the register 0x42 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_output_data_rate (u8 gyro_output_typer)
 This API is used to set the gyroscope output data rate from the register 0x42 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_bw (u8 *v_bw_u8)
 This API is used to get the data of gyro from the register 0x42 bit 4 to 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_bw (u8 v_bw_u8)
 This API is used to set the data of gyro from the register 0x42 bit 4 to 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_range (u8 *v_range_u8)
 This API reads the range of gyro from the register 0x43 bit 0 to 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_range (u8 v_range_u8)
 This API set the range of gyro from the register 0x43 bit 0 to 2. More...
 
FUNCTION FOR MAG CONFIGURATIONS
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_output_data_rate (u8 *odr)
 This API is used to get the output data rate of magnetometer from the register 0x44 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_output_data_rate (u8 odr)
 This API is used to set the output data rate of magnetometer from the register 0x44 bit 0 to 3. More...
 
FUNCTION FOR FIFO CONFIGURATIONS
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_down_gyro (u8 *v_fifo_down_gyro_u8)
 This API is used to read Down sampling for gyro (2**downs_gyro) in the register 0x45 bit 0 to 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_down_gyro (u8 v_fifo_down_gyro_u8)
 This API is used to set Down sampling for gyro (2**downs_gyro) in the register 0x45 bit 0 to 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_fifo_filter_data (u8 *v_gyro_fifo_filter_data_u8)
 This API is used to read gyro fifo filter data from the register 0x45 bit 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_fifo_filter_data (u8 v_gyro_fifo_filter_data_u8)
 This API is used to set gyro fifo filter data from the register 0x45 bit 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_down_accel (u8 *v_fifo_down_u8)
 This API is used to read Down sampling for accel (2*downs_accel) from the register 0x45 bit 4 to 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_down_accel (u8 v_fifo_down_u8)
 This API is used to set Down sampling for accel (2*downs_accel) from the register 0x45 bit 4 to 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_fifo_filter_data (u8 *accel_fifo_filter_u8)
 This API is used to read accel fifo filter data from the register 0x45 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_fifo_filter_data (u8 v_accel_fifo_filter_u8)
 This API is used to set accel fifo filter data from the register 0x45 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_time_enable (u8 *v_fifo_time_enable_u8)
 This API reads fifo sensor time frame after the last valid data frame form the register 0x47 bit 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_time_enable (u8 v_fifo_time_enable_u8)
 This API set fifo sensor time frame after the last valid data frame form the register 0x47 bit 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_tag_intr2_enable (u8 *v_fifo_tag_intr2_u8)
 This API reads FIFO tag interrupt2 enable status from the resister 0x47 bit 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_tag_intr2_enable (u8 v_fifo_tag_intr2_u8)
 This API set FIFO tag interrupt2 enable status from the resister 0x47 bit 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_tag_intr1_enable (u8 *v_fifo_tag_intr1_u8)
 This API get FIFO tag interrupt1 enable status from the resister 0x47 bit 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_tag_intr1_enable (u8 v_fifo_tag_intr1_u8)
 This API set FIFO tag interrupt1 enable status from the resister 0x47 bit 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_header_enable (u8 *v_fifo_header_u8)
 This API reads FIFO frame header enable from the register 0x47 bit 4. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_header_enable (u8 v_fifo_header_u8)
 This API set FIFO frame header enable from the register 0x47 bit 4. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_mag_enable (u8 *v_fifo_mag_u8)
 This API is used to read stored magnetometer data in FIFO (all 3 axes) from the register 0x47 bit 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_mag_enable (u8 v_fifo_mag_u8)
 This API is used to set stored magnetometer data in FIFO (all 3 axes) from the register 0x47 bit 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_accel_enable (u8 *v_fifo_accel_u8)
 This API is used to read stored accel data in FIFO (all 3 axes) from the register 0x47 bit 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_accel_enable (u8 v_fifo_accel_u8)
 This API is used to set stored accel data in FIFO (all 3 axes) from the register 0x47 bit 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_gyro_enable (u8 *v_fifo_gyro_u8)
 This API is used to read stored gyro data in FIFO (all 3 axes) from the resister 0x47 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_gyro_enable (u8 v_fifo_gyro_u8)
 This API is used to set stored gyro data in FIFO (all 3 axes) from the resister 0x47 bit 7. More...
 
FUNCTION FOR FIFO WATER MARK ENABLE
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_wm (u8 *v_fifo_wm_u8)
 This API is used to Trigger an interrupt when FIFO contains water mark level from the register 0x46 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_wm (u8 v_fifo_wm_u8)
 This API is used to Trigger an interrupt when FIFO contains water mark level from the register 0x46 bit 0 to 7. More...
 
FUNCTION FOR MAG I2C ADDRESS SELECTION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_i2c_device_addr (u8 *v_i2c_device_addr_u8)
 This API is used to read I2C device address of auxiliary mag from the register 0x4B bit 1 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_i2c_device_addr (u8 v_i2c_device_addr_u8)
 This API is used to set I2C device address of auxiliary mag from the register 0x4B bit 1 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_burst (u8 *v_mag_burst_u8)
 This API is used to read Burst data length (1,2,6,8 byte) from the register 0x4C bit 0 to 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_burst (u8 v_mag_burst_u8)
 This API is used to set Burst data length (1,2,6,8 byte) from the register 0x4C bit 0 to 1. More...
 
FUNCTION FOR MAG OFFSET
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_offset (u8 *v_mag_offset_u8)
 This API is used to read trigger-readout offset in units of 2.5 ms. If set to zero, the offset is maximum, i.e. after readout a trigger is issued immediately. from the register 0x4C bit 2 to 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_offset (u8 v_mag_offset_u8)
 This API is used to set trigger-readout offset in units of 2.5 ms. If set to zero, the offset is maximum, i.e. after readout a trigger is issued immediately. from the register 0x4C bit 2 to 5. More...
 
FUNCTION FOR MAG MANUAL/AUTO MODE SELECTION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_manual_enable (u8 *v_mag_manual_u8)
 This API is used to read Enable register access on MAG_IF[2] or MAG_IF[3] writes. This implies that the DATA registers are not updated with magnetometer values. Accessing magnetometer requires the magnetometer in normal mode in PMU_STATUS. from the register 0x4C bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_manual_enable (u8 v_mag_manual_u8)
 This API is used to set Enable register access on MAG_IF[2] or MAG_IF[3] writes. This implies that the DATA registers are not updated with magnetometer values. Accessing magnetometer requires the magnetometer in normal mode in PMU_STATUS. from the register 0x4C bit 7. More...
 
FUNCTIONS FOR MAG READ, WRITE AND WRITE DATA ADDRESS
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_read_addr (u8 *v_mag_read_addr_u8)
 This API is used to read data magnetometer address to read from the register 0x4D bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_read_addr (u8 v_mag_read_addr_u8)
 This API is used to set magnetometer write address from the register 0x4D bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_write_addr (u8 *v_mag_write_addr_u8)
 This API is used to read magnetometer write address from the register 0x4E bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_write_addr (u8 v_mag_write_addr_u8)
 This API is used to set magnetometer write address from the register 0x4E bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_write_data (u8 *v_mag_write_data_u8)
 This API is used to read magnetometer write data form the resister 0x4F bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_write_data (u8 v_mag_write_data_u8)
 This API is used to set magnetometer write data form the resister 0x4F bit 0 to 7. More...
 
FUNCTION FOR INTERRUPT ENABLE OF

STEP DETECTOR

BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_enable_0 (u8 enable, u8 *v_intr_enable_zero_u8)
 This API is used to read interrupt enable from the register 0x50 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_enable_0 (u8 enable, u8 v_intr_enable_zero_u8)
 This API is used to set interrupt enable from the register 0x50 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_enable_1 (u8 enable, u8 *v_intr_enable_1_u8)
 This API is used to read interrupt enable byte1 from the register 0x51 bit 0 to 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_enable_1 (u8 enable, u8 v_intr_enable_1_u8)
 This API is used to set interrupt enable byte1 from the register 0x51 bit 0 to 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_enable_2 (u8 enable, u8 *v_intr_enable_2_u8)
 This API is used to read interrupt enable byte2 from the register bit 0x52 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_enable_2 (u8 enable, u8 v_intr_enable_2_u8)
 This API is used to set interrupt enable byte2 from the register bit 0x52 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_step_detector_enable (u8 *v_step_intr_u8)
 This API is used to read interrupt enable step detector interrupt from the register bit 0x52 bit 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_step_detector_enable (u8 v_step_intr_u8)
 This API is used to set interrupt enable step detector interrupt from the register bit 0x52 bit 3. More...
 
FUNCTION FOR INTERRUPT CONTROL
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_edge_ctrl (u8 v_channel_u8, u8 *v_intr_edge_ctrl_u8)
 Configure trigger condition of interrupt1 and interrupt2 pin from the register 0x53. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_edge_ctrl (u8 v_channel_u8, u8 v_intr_edge_ctrl_u8)
 Configure trigger condition of interrupt1 and interrupt2 pin from the register 0x53. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_level (u8 v_channel_u8, u8 *v_intr_level_u8)
 API used for get the Configure level condition of interrupt1 and interrupt2 pin form the register 0x53. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_level (u8 v_channel_u8, u8 v_intr_level_u8)
 API used for set the Configure level condition of interrupt1 and interrupt2 pin form the register 0x53. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_output_type (u8 v_channel_u8, u8 *v_intr_output_type_u8)
 API used to get configured output enable of interrupt1 and interrupt2 from the register 0x53. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_output_type (u8 v_channel_u8, u8 v_intr_output_type_u8)
 API used to set output enable of interrupt1 and interrupt2 from the register 0x53. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_output_enable (u8 v_channel_u8, u8 *v_output_enable_u8)
 API used to get the Output enable for interrupt1 and interrupt2 pin from the register 0x53. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_output_enable (u8 v_channel_u8, u8 v_output_enable_u8)
 API used to set the Output enable for interrupt1 and interrupt2 pin from the register 0x53. More...
 
FUNCTION FOR INTERRUPT LATCH INTERRUPT
BMI160_RETURN_FUNCTION_TYPE bmi160_get_latch_intr (u8 *v_latch_intr_u8)
 This API is used to get the latch duration from the register 0x54 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_latch_intr (u8 v_latch_intr_u8)
 This API is used to set the latch duration from the register 0x54 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_input_enable (u8 v_channel_u8, u8 *v_input_en_u8)
 API used to get input enable for interrupt1 and interrupt2 pin from the register 0x54. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_input_enable (u8 v_channel_u8, u8 v_input_en_u8)
 API used to set input enable for interrupt1 and interrupt2 pin from the register 0x54. More...
 
FUNCTION FOR INTERRUPT1 AND INTERRUPT2 MAPPING
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g (u8 v_channel_u8, u8 *v_intr_low_g_u8)
 reads the Low g interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57 More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g (u8 v_channel_u8, u8 v_intr_low_g_u8)
 set the Low g interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57 More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_high_g (u8 v_channel_u8, u8 *v_intr_high_g_u8)
 Reads the HIGH g interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_high_g (u8 v_channel_u8, u8 v_intr_high_g_u8)
 Write the HIGH g interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_any_motion (u8 v_channel_u8, u8 *v_intr_any_motion_u8)
 Reads the Any motion interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_any_motion (u8 v_channel_u8, u8 v_intr_any_motion_u8)
 Write the Any motion interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_nomotion (u8 v_channel_u8, u8 *v_intr_nomotion_u8)
 Reads the No motion interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_nomotion (u8 v_channel_u8, u8 v_intr_nomotion_u8)
 Write the No motion interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_double_tap (u8 v_channel_u8, u8 *v_intr_double_tap_u8)
 Reads the Double Tap interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_double_tap (u8 v_channel_u8, u8 v_intr_double_tap_u8)
 Write the Double Tap interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_single_tap (u8 v_channel_u8, u8 *v_intr_single_tap_u8)
 Reads the Single Tap interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_single_tap (u8 v_channel_u8, u8 v_intr_single_tap_u8)
 Write the Single Tap interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient (u8 v_channel_u8, u8 *v_intr_orient_u8)
 Reads the Orient interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient (u8 v_channel_u8, u8 v_intr_orient_u8)
 Write the Orient interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_flat (u8 v_channel_u8, u8 *v_intr_flat_u8)
 Reads the Flat interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_flat (u8 v_channel_u8, u8 v_intr_flat_u8)
 Write the Flat interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_pmu_trig (u8 v_channel_u8, u8 *v_intr_pmu_trig_u8)
 Reads PMU trigger interrupt mapped to interrupt1 and interrupt2 form the register 0x56 bit 0 and 4. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_pmu_trig (u8 v_channel_u8, u8 v_intr_pmu_trig_u8)
 Write PMU trigger interrupt mapped to interrupt1 and interrupt2 form the register 0x56 bit 0 and 4. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_fifo_full (u8 v_channel_u8, u8 *v_intr_fifo_full_u8)
 Reads FIFO Full interrupt mapped to interrupt1 and interrupt2 form the register 0x56 bit 5 and 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_fifo_full (u8 v_channel_u8, u8 v_intr_fifo_full_u8)
 Write FIFO Full interrupt mapped to interrupt1 and interrupt2 form the register 0x56 bit 5 and 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_fifo_wm (u8 v_channel_u8, u8 *v_intr_fifo_wm_u8)
 Reads FIFO Watermark interrupt mapped to interrupt1 and interrupt2 form the register 0x56 bit 6 and 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_fifo_wm (u8 v_channel_u8, u8 v_intr_fifo_wm_u8)
 Write FIFO Watermark interrupt mapped to interrupt1 and interrupt2 form the register 0x56 bit 6 and 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_data_rdy (u8 v_channel_u8, u8 *v_intr_data_rdy_u8)
 Reads Data Ready interrupt mapped to interrupt1 and interrupt2 form the register 0x56. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_data_rdy (u8 v_channel_u8, u8 v_intr_data_rdy_u8)
 Write Data Ready interrupt mapped to interrupt1 and interrupt2 form the register 0x56. More...
 
FUNCTION FOR TAP SOURCE CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_source (u8 *v_tap_source_u8)
 This API reads data source for the interrupt engine for the single and double tap interrupts from the register 0x58 bit 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_source (u8 v_tap_source_u8)
 This API write data source for the interrupt engine for the single and double tap interrupts from the register 0x58 bit 3. More...
 
FUNCTION FOR LOW_G AND HIGH_G SOURCE CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_high_source (u8 *v_low_high_source_u8)
 This API Reads Data source for the interrupt engine for the low and high g interrupts from the register 0x58 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_high_source (u8 v_low_high_source_u8)
 This API write Data source for the interrupt engine for the low and high g interrupts from the register 0x58 bit 7. More...
 
FUNCTION FOR MOTION SOURCE CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_motion_source (u8 *v_motion_source_u8)
 This API reads Data source for the interrupt engine for the nomotion and anymotion interrupts from the register 0x59 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_motion_source (u8 v_motion_source_u8)
 This API write Data source for the interrupt engine for the nomotion and anymotion interrupts from the register 0x59 bit 7. More...
 
FUNCTION FOR LOW_G DURATION CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g_durn (u8 *v_low_durn_u8)
 This API is used to read the low_g duration from register 0x5A bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g_durn (u8 v_low_durn_u8)
 This API is used to write the low_g duration from register 0x5A bit 0 to 7. More...
 
FUNCTION FOR LOW_G THRESH CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g_thres (u8 *v_low_g_thres_u8)
 This API is used to read Threshold definition for the low-g interrupt from the register 0x5B bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g_thres (u8 v_low_g_thres_u8)
 This API is used to write Threshold definition for the low-g interrupt from the register 0x5B bit 0 to 7. More...
 
FUNCTION FOR LOW_G HYSTERESIS CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g_hyst (u8 *v_low_hyst_u8)
 This API Reads Low-g interrupt hysteresis from the register 0x5C bit 0 to 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g_hyst (u8 v_low_hyst_u8)
 This API write Low-g interrupt hysteresis from the register 0x5C bit 0 to 1. More...
 
FUNCTION FOR LOW_G MODE CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g_mode (u8 *v_low_g_mode_u8)
 This API reads Low-g interrupt mode from the register 0x5C bit 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g_mode (u8 v_low_g_mode_u8)
 This API write Low-g interrupt mode from the register 0x5C bit 2. More...
 
FUNCTION FOR HIGH_G HYST CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_high_g_hyst (u8 *v_high_g_hyst_u8)
 This API reads High-g interrupt hysteresis from the register 0x5C bit 6 and 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_high_g_hyst (u8 v_high_g_hyst_u8)
 This API write High-g interrupt hysteresis from the register 0x5C bit 6 and 7. More...
 
FUNCTION FOR HIGH_G DURATION CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_high_g_durn (u8 *v_high_g_durn_u8)
 This API is used to read Delay time definition for the high-g interrupt from the register 0x5D bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_high_g_durn (u8 v_high_g_durn_u8)
 This API is used to write Delay time definition for the high-g interrupt from the register 0x5D bit 0 to 7. More...
 
FUNCTION FOR HIGH_G THRESHOLD CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_high_g_thres (u8 *v_high_g_thres_u8)
 This API is used to read Threshold definition for the high-g interrupt from the register 0x5E 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_high_g_thres (u8 v_high_g_thres_u8)
 This API is used to write Threshold definition for the high-g interrupt from the register 0x5E 0 to 7. More...
 
FUNCTION FOR ANY MOTION DURATION CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_any_motion_durn (u8 *v_any_motion_durn_u8)
 This API reads any motion duration from the register 0x5F bit 0 and 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_any_motion_durn (u8 nomotion)
 This API write any motion duration from the register 0x5F bit 0 and 1. More...
 
FUNCTION FOR SLOW NO MOTION DURATION CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_slow_no_motion_durn (u8 *v_slow_no_motion_u8)
 This API read Slow/no-motion interrupt trigger delay duration from the register 0x5F bit 2 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_slow_no_motion_durn (u8 v_slow_no_motion_u8)
 This API write Slow/no-motion interrupt trigger delay duration from the register 0x5F bit 2 to 7. More...
 
FUNCTION FOR ANY MOTION THRESHOLD CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_any_motion_thres (u8 *v_any_motion_thres_u8)
 This API is used to read threshold definition for the any-motion interrupt from the register 0x60 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_any_motion_thres (u8 v_any_motion_thres_u8)
 This API is used to write threshold definition for the any-motion interrupt from the register 0x60 bit 0 to 7. More...
 
FUNCTION FOR SLO/NO MOTION THRESHOLD CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_slow_no_motion_thres (u8 *v_slow_no_motion_thres_u8)
 This API is used to read threshold for the slow/no-motion interrupt from the register 0x61 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_slow_no_motion_thres (u8 v_slow_no_motion_thres_u8)
 This API is used to write threshold for the slow/no-motion interrupt from the register 0x61 bit 0 to 7. More...
 
FUNCTION FOR SLO/NO MOTION SELECT CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_slow_no_motion_select (u8 *v_intr_slow_no_motion_select_u8)
 This API is used to read the slow/no-motion selection from the register 0x62 bit 0. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_slow_no_motion_select (u8 v_intr_slow_no_motion_select_u8)
 This API is used to write the slow/no-motion selection from the register 0x62 bit 0. More...
 
FUNCTION FOR SIGNIFICANT MOTION SELECT CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_significant_motion_select (u8 *int_sig_mot_sel)
 This API is used to select the significant or any motion interrupt from the register 0x62 bit 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_significant_motion_select (u8 int_sig_mot_sel)
 This API is used to write, select the significant or any motion interrupt from the register 0x62 bit 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_unmap_significant_motion_intr (u8 v_significant_u8)
 This API used to unmap the signification motion interrupt. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_significant_motion_skip (u8 *v_int_sig_mot_skip_u8)
 This API is used to read the significant skip time from the register 0x62 bit 2 and 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_significant_motion_skip (u8 v_int_sig_mot_skip_u8)
 This API is used to write the significant skip time from the register 0x62 bit 2 and 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_significant_motion_proof (u8 *int_sig_mot_proof)
 This API is used to read the significant proof time from the register 0x62 bit 4 and 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_significant_motion_proof (u8 int_sig_mot_proof)
 This API is used to write the significant proof time from the register 0x62 bit 4 and 5. More...
 
FUNCTION FOR TAP DURATION CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_durn (u8 *v_tap_durn_u8)
 This API is used to get the tap duration from the register 0x63 bit 0 to 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_durn (u8 v_tap_durn_u8)
 This API is used to write the tap duration from the register 0x63 bit 0 to 2. More...
 
FUNCTION FOR TAP SHOCK CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_shock (u8 *v_tap_shock_u8)
 This API read the tap shock duration from the register 0x63 bit 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_shock (u8 v_tap_shock_u8)
 This API write the tap shock duration from the register 0x63 bit 2. More...
 
FUNCTION FOR TAP QUIET CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_quiet (u8 *v_tap_quiet_u8)
 This API read tap quiet duration from the register 0x63 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_quiet (u8 v_tap_quiet_u8)
 This API write tap quiet duration from the register 0x63 bit 7. More...
 
FUNCTION FOR TAP THRESHOLD CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_thres (u8 *v_tap_thres_u8)
 This API read Threshold of the single/double tap interrupt from the register 0x64 bit 0 to 4. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_thres (u8 v_tap_thres_u8)
 This API write Threshold of the single/double tap interrupt from the register 0x64 bit 0 to 4. More...
 
FUNCTION FOR ORIENT MODE CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_mode (u8 *v_orient_mode_u8)
 This API read the threshold for orientation interrupt from the register 0x65 bit 0 and 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_mode (u8 v_orient_mode_u8)
 This API write the threshold for orientation interrupt from the register 0x65 bit 0 and 1. More...
 
FUNCTION FOR ORIENT BLOCKING CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_blocking (u8 *v_orient_blocking_u8)
 This API read the orient blocking mode that is used for the generation of the orientation interrupt. from the register 0x65 bit 2 and 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_blocking (u8 v_orient_blocking_u8)
 This API write the orient blocking mode that is used for the generation of the orientation interrupt. from the register 0x65 bit 2 and 3. More...
 
FUNCTION FOR ORIENT HYSTERESIS CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_hyst (u8 *v_orient_hyst_u8)
 This API read Orient interrupt hysteresis, from the register 0x64 bit 4 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_hyst (u8 v_orient_hyst_u8)
 This API write Orient interrupt hysteresis, from the register 0x64 bit 4 to 7. More...
 
FUNCTION FOR ORIENT THETA CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_theta (u8 *v_orient_theta_u8)
 This API read Orient blocking angle (0 to 44.8) from the register 0x66 bit 0 to 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_theta (u8 v_orient_theta_u8)
 This API write Orient blocking angle (0 to 44.8) from the register 0x66 bit 0 to 5. More...
 
FUNCTION FOR ORIENT OUTPUT ENABLE CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_ud_enable (u8 *v_orient_ud_u8)
 This API read orient change of up/down bit from the register 0x66 bit 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_ud_enable (u8 v_orient_ud_u8)
 This API write orient change of up/down bit from the register 0x66 bit 6. More...
 
FUNCTION FOR ORIENT AXIS ENABLE CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_axes_enable (u8 *v_orient_axes_u8)
 This API read orientation axes changes from the register 0x66 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_axes_enable (u8 v_orient_axes_u8)
 This API write orientation axes changes from the register 0x66 bit 7. More...
 
FUNCTION FOR FLAT THETA CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_flat_theta (u8 *v_flat_theta_u8)
 This API read Flat angle (0 to 44.8) for flat interrupt from the register 0x67 bit 0 to 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_flat_theta (u8 v_flat_theta_u8)
 This API write Flat angle (0 to 44.8) for flat interrupt from the register 0x67 bit 0 to 5. More...
 
FUNCTION FOR FLAT HOLD CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_flat_hold (u8 *v_flat_hold_u8)
 This API read Flat interrupt hold time; from the register 0x68 bit 4 and 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_flat_hold (u8 v_flat_hold_u8)
 This API write Flat interrupt hold time; from the register 0x68 bit 4 and 5. More...
 
FUNCTION FOR FLAT HYSTERESIS CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_flat_hyst (u8 *v_flat_hyst_u8)
 This API read flat interrupt hysteresis from the register 0x68 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_flat_hyst (u8 v_flat_hyst_u8)
 This API write flat interrupt hysteresis from the register 0x68 bit 0 to 3. More...
 
FUNCTION FAST OFFSET COMPENSATION FOR ACCEL
BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_accel_z (u8 *v_foc_accel_z_u8)
 This API read accel offset compensation target value for z-axis from the register 0x69 bit 0 and 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_foc_accel_z (u8 v_foc_accel_z_u8)
 This API write accel offset compensation target value for z-axis from the register 0x69 bit 0 and 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_accel_y (u8 *v_foc_accel_y_u8)
 This API read accel offset compensation target value for y-axis from the register 0x69 bit 2 and 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_foc_accel_y (u8 v_foc_accel_y_u8)
 This API write accel offset compensation target value for y-axis from the register 0x69 bit 2 and 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_accel_x (u8 *v_foc_accel_x_u8)
 This API read accel offset compensation target value for x-axis is from the register 0x69 bit 4 and 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_foc_accel_x (u8 v_foc_accel_x_u8)
 This API write accel offset compensation target value for x-axis is from the register 0x69 bit 4 and 5. More...
 
FUNCTION FAST OFFSET COMPENSATION FOR GYRO
BMI160_RETURN_FUNCTION_TYPE bmi160_set_foc_gyro_enable (u8 v_foc_gyro_u8, s16 *v_gyro_off_x_s16, s16 *v_gyro_off_y_s16, s16 *v_gyro_off_z_s16)
 This API write gyro fast offset enable from the register 0x69 bit 6. More...
 
FUNCTION FOR NVM
BMI160_RETURN_FUNCTION_TYPE bmi160_get_nvm_prog_enable (u8 *v_nvm_prog_u8)
 This API read NVM program enable from the register 0x6A bit 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_nvm_prog_enable (u8 v_nvm_prog_u8)
 This API write NVM program enable from the register 0x6A bit 1. More...
 
FUNCTION FOR SPI MODE
BMI160_RETURN_FUNCTION_TYPE bmi160_get_spi3 (u8 *v_spi3_u8)
 This API read to configure SPI Interface Mode for primary and OIS interface from the register 0x6B bit 0. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_spi3 (u8 v_spi3_u8)
 This API write to configure SPI Interface Mode for primary and OIS interface from the register 0x6B bit 0. More...
 
FUNCTION FOR FOC GYRO
BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_gyro_enable (u8 *v_foc_gyro_u8)
 This API read gyro fast offset enable from the register 0x69 bit 6. More...
 
FUNCTION FOR I2C WATCHDOG TIMBER
BMI160_RETURN_FUNCTION_TYPE bmi160_get_i2c_wdt_select (u8 *v_i2c_wdt_u8)
 This API read I2C Watchdog timer from the register 0x70 bit 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_i2c_wdt_select (u8 v_i2c_wdt_u8)
 This API write I2C Watchdog timer from the register 0x70 bit 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_i2c_wdt_enable (u8 *v_i2c_wdt_u8)
 This API read I2C watchdog enable from the register 0x70 bit 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_i2c_wdt_enable (u8 v_i2c_wdt_u8)
 This API write I2C watchdog enable from the register 0x70 bit 2. More...
 
FUNCTION FOR IF MODE
BMI160_RETURN_FUNCTION_TYPE bmi160_get_if_mode (u8 *v_if_mode_u8)
 This API read I2C interface configuration(if) moe from the register 0x6B bit 4 and 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_if_mode (u8 v_if_mode_u8)
 This API write I2C interface configuration(if) moe from the register 0x6B bit 4 and 5. More...
 
FUNCTION FOR GYRO SLEEP TRIGGER INTERRUPT CONFIGURATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_sleep_trigger (u8 *v_gyro_sleep_trigger_u8)
 This API read gyro sleep trigger from the register 0x6C bit 0 to 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_sleep_trigger (u8 v_gyro_sleep_trigger_u8)
 This API write gyro sleep trigger from the register 0x6C bit 0 to 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_wakeup_trigger (u8 *v_gyro_wakeup_trigger_u8)
 This API read gyro wakeup trigger from the register 0x6C bit 3 and 4. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_wakeup_trigger (u8 v_gyro_wakeup_trigger_u8)
 This API write gyro wakeup trigger from the register 0x6C bit 3 and 4. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_sleep_state (u8 *v_gyro_sleep_state_u8)
 This API read Target state for gyro sleep mode from the register 0x6C bit 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_sleep_state (u8 v_gyro_sleep_state_u8)
 This API write Target state for gyro sleep mode from the register 0x6C bit 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_wakeup_intr (u8 *v_gyro_wakeup_intr_u8)
 This API read gyro wakeup interrupt from the register 0x6C bit 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_wakeup_intr (u8 v_gyro_wakeup_intr_u8)
 This API write gyro wakeup interrupt from the register 0x6C bit 6. More...
 
FUNCTION FOR ACCEL SELF TEST
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_selftest_axis (u8 *acc_selftest_axis)
 This API read accel select axis to be self-test. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_selftest_axis (u8 acc_selftest_axis)
 This API write accel select axis to be self-test. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_selftest_sign (u8 *acc_selftest_sign)
 This API read accel self test axis sign from the register 0x6D bit 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_selftest_sign (u8 acc_selftest_sign)
 This API write accel self test axis sign from the register 0x6D bit 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_selftest_amp (u8 *acc_selftest_amp)
 This API read accel self test amplitude from the register 0x6D bit 3 select amplitude of the selftest deflection: More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_selftest_amp (u8 acc_selftest_amp)
 This API write accel self test amplitude from the register 0x6D bit 3 select amplitude of the selftest deflection: More...
 
FUNCTION FOR GYRO SELF TEST
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_selftest_start (u8 *v_gyro_selftest_start_u8)
 This API read gyro self test trigger. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_selftest_start (u8 v_gyro_selftest_start_u8)
 This API write gyro self test trigger. More...
 
FUNCTION FOR SPI/I2C ENABLE
BMI160_RETURN_FUNCTION_TYPE bmi160_get_spi_enable (u8 *v_spi_enable_u8)
 This API read primary interface selection I2C or SPI from the register 0x70 bit 0. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_spi_enable (u8 v_spi_enable_u8)
 This API write primary interface selection I2C or SPI from the register 0x70 bit 0. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_spare0_trim (u8 *v_spare0_trim_u8)
 This API read the spare zero form register 0x70 bit 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_spare0_trim (u8 v_spare0_trim_u8)
 This API write the spare zero form register 0x70 bit 3. More...
 
FUNCTION FOR NVM COUNTER
BMI160_RETURN_FUNCTION_TYPE bmi160_get_nvm_counter (u8 *v_nvm_counter_u8)
 This API read the NVM counter form register 0x70 bit 4 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_nvm_counter (u8 v_nvm_counter_u8)
 This API write the NVM counter form register 0x70 bit 4 to 7. More...
 
FUNCTION FOR ACCEL MANUAL OFFSET COMPENSATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_offset_compensation_xaxis (s8 *v_accel_off_x_s8)
 This API read accel manual offset compensation of x axis from the register 0x71 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_offset_compensation_xaxis (s8 v_accel_off_x_s8)
 This API write accel manual offset compensation of x axis from the register 0x71 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_offset_compensation_yaxis (s8 *v_accel_off_y_s8)
 This API read accel manual offset compensation of y axis from the register 0x72 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_offset_compensation_yaxis (s8 v_accel_off_y_s8)
 This API write accel manual offset compensation of y axis from the register 0x72 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_offset_compensation_zaxis (s8 *v_accel_off_z_s8)
 This API read accel manual offset compensation of z axis from the register 0x73 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_offset_compensation_zaxis (s8 v_accel_off_z_s8)
 This API write accel manual offset compensation of z axis from the register 0x73 bit 0 to 7. More...
 
FUNCTION FOR GYRO MANUAL OFFSET COMPENSATION
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_offset_compensation_xaxis (s16 *v_gyro_off_x_s16)
 This API read gyro manual offset compensation of x axis from the register 0x74 bit 0 to 7 and 0x77 bit 0 and 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_offset_compensation_xaxis (s16 v_gyro_off_x_s16)