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

Header for BMG160 API. More...

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

Data Structures

struct  bmg160_data_t
 Structure containing gyro xyz data. More...
 
struct  bmg160_offset_t
 Structure containing gyro offset xyz data. More...
 
struct  bmg160_t
 bmg160_t structure This structure holds all relevant information about bmg160 More...
 

Macros

#define MACHINE_32_BIT
 The following definition uses for define the data types. More...
 
BUS READ AND WRITE FUNCTION POINTERS
#define BMG160_BUS_WR_RETURN_TYPE   s8
 Define the calling convention of YOUR bus communication routine. More...
 
#define BMG160_BUS_WR_PARAM_TYPES
 
#define BMG160_BUS_WR_PARAM_ORDER(device_addr, register_addr, register_data, wr_len)
 
#define BMG160_BUS_WRITE_FUNC(device_addr, register_addr, register_data, wr_len)
 
#define BMG160_BUS_RD_RETURN_TYPE   s8
 
#define BMG160_BUS_RD_PARAM_TYPES
 
#define BMG160_BUS_RD_PARAM_ORDER
 
#define BMG160_BUS_READ_FUNC(device_addr, register_addr, register_data, rd_len)
 
#define BMG160_BURST_RD_RETURN_TYPE   s8
 
#define BMG160_BURST_RD_PARAM_TYPES
 
#define BMG160_BURST_RD_PARAM_ORDER
 
#define BMG160_BURST_READ_FUNC(device_addr, register_addr, register_data, rd_len)
 
#define BMG160_DELAY_RETURN_TYPE   void
 defines the return parameter type of the BMG160_DELAY_FUNCTION More...
 
#define BMG160_DELAY_FUNC(delay_in_msec)   delay_func(delay_in_msec)
 
#define BMG160_RETURN_FUNCTION_TYPE   s8
 
DEVICE ADDRESS OF BMG160
#define BMG160_I2C_ADDR1   (0x68)
 
#define BMG160_I2C_ADDR2   (0x69)
 
CHIP ID
#define BMG160_CHIP_ID_ADDR   (0x00)
 
DATA REGISTER
#define BMG160_RATE_X_LSB_ADDR   (0x02)
 
#define BMG160_RATE_X_MSB_ADDR   (0x03)
 
#define BMG160_RATE_Y_LSB_ADDR   (0x04)
 
#define BMG160_RATE_Y_MSB_ADDR   (0x05)
 
#define BMG160_RATE_Z_LSB_ADDR   (0x06)
 
#define BMG160_RATE_Z_MSB_ADDR   (0x07)
 
#define BMG160_TEMP_ADDR   (0x08)
 
STATUS REGISTER
#define BMG160_INTR_STAT0_ADDR   (0x09)
 
#define BMG160_INTR_STAT1_ADDR   (0x0A)
 
#define BMG160_INTR_STAT2_ADDR   (0x0B)
 
#define BMG160_INTR_STAT3_ADDR   (0x0C)
 
#define BMG160_FIFO_STAT_ADDR   (0x0E)
 
CONTROL REGISTER
#define BMG160_RANGE_ADDR   (0x0F)
 
#define BMG160_BW_ADDR   (0x10)
 
#define BMG160_MODE_LPM1_ADDR   (0x11)
 
#define BMG160_MODE_LPM2_ADDR   (0x12)
 
#define BMG160_HIGH_BW_ADDR   (0x13)
 
#define BMG160_BGW_SOFT_RST_ADDR   (0x14)
 
INTERRUPT STATUS REGISTERS
#define BMG160_INTR_ENABLE0_ADDR   (0x15)
 
#define BMG160_INTR_ENABLE1_ADDR   (0x16)
 
#define BMG160_INTR_MAP_ZERO_ADDR   (0x17)
 
#define BMG160_INTR_MAP_ONE_ADDR   (0x18)
 
#define BMG160_INTR_MAP_TWO_ADDR   (0x19)
 
#define BMG160_INTR_ZERO_ADDR   (0x1A)
 
#define BMG160_INTR_ONE_ADDR   (0x1B)
 
#define BMG160_INTR_TWO_ADDR   (0x1C)
 
#define BMG160_INTR_4_ADDR   (0x1E)
 
#define BMG160_RST_LATCH_ADDR   (0x21)
 
INTERRUPT HIGH RATE CONFIGURATION REGISTER
#define BMG160_HIGHRATE_THRES_X_ADDR   (0x22)
 
#define BMG160_HIGHRATE_DURN_X_ADDR   (0x23)
 
#define BMG160_HIGHRATE_THRES_Y_ADDR   (0x24)
 
#define BMG160_HIGHRATE_DURN_Y_ADDR   (0x25)
 
#define BMG160_HIGHRATE_THRES_Z_ADDR   (0x26)
 
#define BMG160_HIGHRATE_DURN_Z_ADDR   (0x27)
 
#define BMG160_SOC_ADDR   (0x31)
 
OFFSET REGISTER
#define BMG160_A_FOC_ADDR   (0x32)
 
NVM CONTROL REGISTER
#define BMG160_TRIM_NVM_CTRL_ADDR   (0x33)
 
#define BMG160_BGW_SPI3_WDT_ADDR   (0x34)
 
OFFSET OCNFIGURATION REGISTER
#define BMG160_OFFSET_OFC1_ADDR   (0x36)
 
#define BMG160_OFC2_ADDR   (0x37)
 
#define BMG160_OFC3_ADDR   (0x38)
 
#define BMG160_OFC4_ADDR   (0x39)
 
#define BMG160_TRIM_GP0_ADDR   (0x3A)
 
#define BMG160_TRIM_GP1_ADDR   (0x3B)
 
SELFTEST REGISTER
#define BMG160_SELFTEST_ADDR   (0x3C)
 
FIFO REGISTER
#define BMG160_FIFO_CGF1_ADDR   (0x3D)
 
#define BMG160_FIFO_CGF0_ADDR   (0x3E)
 
#define BMG160_FIFO_DATA_ADDR   (0x3F)
 
BIT LENGTH, MASK, POSITION FOR THE DATA REGISTERS
#define BMG160_RATE_X_LSB_BIT__POS   (0)
 
#define BMG160_RATE_X_LSB_BIT__LEN   (8)
 
#define BMG160_RATE_X_LSB_BIT__MSK   (0xFF)
 
#define BMG160_RATE_X_LSB_BIT__REG   (BMG160_RATE_X_LSB_ADDR)
 
#define BMG160_RATE_Y_LSB_BIT__POS   (0)
 
#define BMG160_RATE_Y_LSB_BIT__LEN   (8)
 
#define BMG160_RATE_Y_LSB_BIT__MSK   (0xFF)
 
#define BMG160_RATE_Y_LSB_BIT__REG   (BMG160_RATE_Y_LSB_ADDR)
 
#define BMG160_RATE_Z_LSB_BIT__POS   (0)
 
#define BMG160_RATE_Z_LSB_BIT__LEN   (8)
 
#define BMG160_RATE_Z_LSB_BIT__MSK   (0xFF)
 
#define BMG160_RATE_Z_LSB_BIT__REG   (BMG160_RATE_Z_LSB_ADDR)
 
BIT LENGTH, MASK,

POSITION FOR THE INTERRUPT STATUS REGISTERS

#define BMG160_INTR_STAT0_ANY_MOTION_INTR__POS   (2)
 
#define BMG160_INTR_STAT0_ANY_MOTION_INTR__LEN   (1)
 
#define BMG160_INTR_STAT0_ANY_MOTION_INTR__MSK   (0x04)
 
#define BMG160_INTR_STAT0_ANY_MOTION_INTR__REG   (BMG160_INTR_STAT0_ADDR)
 
#define BMG160_INTR_STAT0_HIGHRATE_INTR__POS   (1)
 
#define BMG160_INTR_STAT0_HIGHRATE_INTR__LEN   (1)
 
#define BMG160_INTR_STAT0_HIGHRATE_INTR__MSK   (0x02)
 
#define BMG160_INTR_STAT0_HIGHRATE_INTR__REG   (BMG160_INTR_STAT0_ADDR)
 
#define BMG160_INTR_STAT_ZERO__POS   (1)
 
#define BMG160_INTR_STAT_ZERO__LEN   (2)
 
#define BMG160_INTR_STAT_ZERO__MSK   (0x06)
 
#define BMG160_INTR_STAT_ZERO__REG   (BMG160_INTR_STAT0_ADDR)
 
#define BMG160_INTR_STAT1_DATA_INTR__POS   (7)
 
#define BMG160_INTR_STAT1_DATA_INTR__LEN   (1)
 
#define BMG160_INTR_STAT1_DATA_INTR__MSK   (0x80)
 
#define BMG160_INTR_STAT1_DATA_INTR__REG   (BMG160_INTR_STAT1_ADDR)
 
BIT LENGTH, MASK, POSITION FOR THE OFFSET STATUS REGISTERS
#define BMG160_INTR_STAT1_AUTO_OFFSET_INTR__POS   (6)
 
#define BMG160_INTR_STAT1_AUTO_OFFSET_INTR__LEN   (1)
 
#define BMG160_INTR_STAT1_AUTO_OFFSET_INTR__MSK   (0x40)
 
#define BMG160_INTR_STAT1_AUTO_OFFSET_INTR__REG   (BMG160_INTR_STAT1_ADDR)
 
#define BMG160_INTR_STAT1_FAST_OFFSET_INTR__POS   (5)
 
#define BMG160_INTR_STAT1_FAST_OFFSET_INTR__LEN   (1)
 
#define BMG160_INTR_STAT1_FAST_OFFSET_INTR__MSK   (0x20)
 
#define BMG160_INTR_STAT1_FAST_OFFSET_INTR__REG   (BMG160_INTR_STAT1_ADDR)
 
BIT LENGTH, MASK, POSITION FOR THE FIFO STATUS REGISTERS
#define BMG160_INTR_STAT1_FIFO_INTR__POS   (4)
 
#define BMG160_INTR_STAT1_FIFO_INTR__LEN   (1)
 
#define BMG160_INTR_STAT1_FIFO_INTR__MSK   (0x10)
 
#define BMG160_INTR_STAT1_FIFO_INTR__REG   (BMG160_INTR_STAT1_ADDR)
 
#define BMG160_INTR_STAT_ONE__POS   (4)
 
#define BMG160_INTR_STAT_ONE__LEN   (4)
 
#define BMG160_INTR_STAT_ONE__MSK   (0xF0)
 
#define BMG160_INTR_STAT_ONE__REG   (BMG160_INTR_STAT1_ADDR)
 
BIT LENGTH, MASK, POSITION FOR

THE HIGH RATE XYZ SIGN REGISTERS

#define BMG160_INTR_STAT2_ANY_MOTION_SIGN_INTR__POS   (3)
 
#define BMG160_INTR_STAT2_ANY_MOTION_SIGN_INTR__LEN   (1)
 
#define BMG160_INTR_STAT2_ANY_MOTION_SIGN_INTR__MSK   (0x08)
 
#define BMG160_INTR_STAT2_ANY_MOTION_SIGN_INTR__REG   (BMG160_INTR_STAT2_ADDR)
 
#define BMG160_INTR_STAT2_ANY_MOTION_FIRSTZ_INTR__POS   (2)
 
#define BMG160_INTR_STAT2_ANY_MOTION_FIRSTZ_INTR__LEN   (1)
 
#define BMG160_INTR_STAT2_ANY_MOTION_FIRSTZ_INTR__MSK   (0x04)
 
#define BMG160_INTR_STAT2_ANY_MOTION_FIRSTZ_INTR__REG   (BMG160_INTR_STAT2_ADDR)
 
#define BMG160_INTR_STAT2_ANY_MOTION_FIRSTY_INTR__POS   (1)
 
#define BMG160_INTR_STAT2_ANY_MOTION_FIRSTY_INTR__LEN   (1)
 
#define BMG160_INTR_STAT2_ANY_MOTION_FIRSTY_INTR__MSK   (0x02)
 
#define BMG160_INTR_STAT2_ANY_MOTION_FIRSTY_INTR__REG   (BMG160_INTR_STAT2_ADDR)
 
#define BMG160_INTR_STAT2_ANY_MOTION_FIRSTX_INTR__POS   (0)
 
#define BMG160_INTR_STAT2_ANY_MOTION_FIRSTX_INTR__LEN   (1)
 
#define BMG160_INTR_STAT2_ANY_MOTION_FIRSTX_INTR__MSK   (0x01)
 
#define BMG160_INTR_STAT2_ANY_MOTION_FIRSTX_INTR__REG   (BMG160_INTR_STAT2_ADDR)
 
#define BMG160_INTR_STAT_TWO__POS   (0)
 
#define BMG160_INTR_STAT_TWO__LEN   (4)
 
#define BMG160_INTR_STAT_TWO__MSK   (0x0F)
 
#define BMG160_INTR_STAT_TWO__REG   (BMG160_INTR_STAT2_ADDR)
 
#define BMG160_INTR_STAT3_HIGHRATE_SIGN_INTR__POS   (3)
 
#define BMG160_INTR_STAT3_HIGHRATE_SIGN_INTR__LEN   (1)
 
#define BMG160_INTR_STAT3_HIGHRATE_SIGN_INTR__MSK   (0x08)
 
#define BMG160_INTR_STAT3_HIGHRATE_SIGN_INTR__REG   (BMG160_INTR_STAT3_ADDR)
 
#define BMG160_INTR_STAT3_HIGHRATE_FIRSTZ_INTR__POS   (2)
 
#define BMG160_INTR_STAT3_HIGHRATE_FIRSTZ_INTR__LEN   (1)
 
#define BMG160_INTR_STAT3_HIGHRATE_FIRSTZ_INTR__MSK   (0x04)
 
#define BMG160_INTR_STAT3_HIGHRATE_FIRSTZ_INTR__REG   (BMG160_INTR_STAT3_ADDR)
 
#define BMG160_INTR_STAT3_HIGHRATE_FIRSTY_INTR__POS   (1)
 
#define BMG160_INTR_STAT3_HIGHRATE_FIRSTY_INTR__LEN   (1)
 
#define BMG160_INTR_STAT3_HIGHRATE_FIRSTY_INTR__MSK   (0x02)
 
#define BMG160_INTR_STAT3_HIGHRATE_FIRSTY_INTR__REG   (BMG160_INTR_STAT3_ADDR)
 
#define BMG160_INTR_STAT3_HIGHRATE_FIRSTX_INTR__POS   (0)
 
#define BMG160_INTR_STAT3_HIGHRATE_FIRSTX_INTR__LEN   (1)
 
#define BMG160_INTR_STAT3_HIGHRATE_FIRSTX_INTR__MSK   (0x01)
 
#define BMG160_INTR_STAT3_HIGHRATE_FIRSTX_INTR__REG   (BMG160_INTR_STAT3_ADDR)
 
#define BMG160_INTR_STAT_THREE__POS   (0)
 
#define BMG160_INTR_STAT_THREE__LEN   (4)
 
#define BMG160_INTR_STAT_THREE__MSK   (0x0F)
 
#define BMG160_INTR_STAT_THREE__REG   (BMG160_INTR_STAT3_ADDR)
 
BIT LENGTH, MASK, POSITION FOR THE FIFO OVERRUN
#define BMG160_FIFO_STAT_OVERRUN__POS   (7)
 
#define BMG160_FIFO_STAT_OVERRUN__LEN   (1)
 
#define BMG160_FIFO_STAT_OVERRUN__MSK   (0x80)
 
#define BMG160_FIFO_STAT_OVERRUN__REG   (BMG160_FIFO_STAT_ADDR)
 
BIT LENGTH, MASK, POSITION FOR THE FIFO FRAME COUNT
#define BMG160_FIFO_STAT_FRAME_COUNTER__POS   (0)
 
#define BMG160_FIFO_STAT_FRAME_COUNTER__LEN   (7)
 
#define BMG160_FIFO_STAT_FRAME_COUNTER__MSK   (0x7F)
 
#define BMG160_FIFO_STAT_FRAME_COUNTER__REG   (BMG160_FIFO_STAT_ADDR)
 
BIT LENGTH, MASK, POSITION FOR THE RANGE
#define BMG160_RANGE_ADDR_RANGE__POS   (0)
 
#define BMG160_RANGE_ADDR_RANGE__LEN   (3)
 
#define BMG160_RANGE_ADDR_RANGE__MSK   (0x07)
 
#define BMG160_RANGE_ADDR_RANGE__REG   (BMG160_RANGE_ADDR)
 
BIT LENGTH, MASK, POSITION FOR THE BANDWIDTH
#define BMG160_BW_ADDR__POS   (0)
 
#define BMG160_BW_ADDR__LEN   (3)
 
#define BMG160_BW_ADDR__MSK   (0x07)
 
#define BMG160_BW_ADDR__REG   (BMG160_BW_ADDR)
 
#define BMG160_MODE_LPM1__POS   (5)
 
#define BMG160_MODE_LPM1__LEN   (3)
 
#define BMG160_MODE_LPM1__MSK   (0xA0)
 
#define BMG160_MODE_LPM1__REG   (BMG160_MODE_LPM1_ADDR)
 
BIT LENGTH, MASK, POSITION FOR THE POWER MODE
#define BMG160_MODELPM1_ADDR_SLEEP_DURN__POS   (1)
 
#define BMG160_MODELPM1_ADDR_SLEEP_DURN__LEN   (3)
 
#define BMG160_MODELPM1_ADDR_SLEEP_DURN__MSK   (0x0E)
 
#define BMG160_MODELPM1_ADDR_SLEEP_DURN__REG   (BMG160_MODE_LPM1_ADDR)
 
#define BMG160_MODE_LPM2_ADDR_FAST_POWERUP__POS   (7)
 
#define BMG160_MODE_LPM2_ADDR_FAST_POWERUP__LEN   (1)
 
#define BMG160_MODE_LPM2_ADDR_FAST_POWERUP__MSK   (0x80)
 
#define BMG160_MODE_LPM2_ADDR_FAST_POWERUP__REG   (BMG160_MODE_LPM2_ADDR)
 
#define BMG160_MODE_LPM2_ADDR_ADV_POWERSAVING__POS   (6)
 
#define BMG160_MODE_LPM2_ADDR_ADV_POWERSAVING__LEN   (1)
 
#define BMG160_MODE_LPM2_ADDR_ADV_POWERSAVING__MSK   (0x40)
 
#define BMG160_MODE_LPM2_ADDR_ADV_POWERSAVING__REG   (BMG160_MODE_LPM2_ADDR)
 
#define BMG160_MODE_LPM2_ADDR_EXT_TRI_SELECT__POS   (4)
 
#define BMG160_MODE_LPM2_ADDR_EXT_TRI_SELECT__LEN   (2)
 
#define BMG160_MODE_LPM2_ADDR_EXT_TRI_SELECT__MSK   (0x30)
 
#define BMG160_MODE_LPM2_ADDR_EXT_TRI_SELECT__REG   (BMG160_MODE_LPM2_ADDR)
 
BIT LENGTH, MASK, POSITION FOR THE AUTO SLEEP DURATION
#define BMG160_MODE_LPM2_ADDR_AUTO_SLEEP_DURN__POS   (0)
 
#define BMG160_MODE_LPM2_ADDR_AUTO_SLEEP_DURN__LEN   (3)
 
#define BMG160_MODE_LPM2_ADDR_AUTO_SLEEP_DURN__MSK   (0x07)
 
#define BMG160_MODE_LPM2_ADDR_AUTO_SLEEP_DURN__REG   (BMG160_MODE_LPM2_ADDR)
 
BIT LENGTH, MASK, POSITION FOR THE HIGH BANDWIDTH
#define BMG160_HIGH_BW__POS   (7)
 
#define BMG160_HIGH_BW__LEN   (1)
 
#define BMG160_HIGH_BW__MSK   (0x80)
 
#define BMG160_HIGH_BW__REG   (BMG160_HIGH_BW_ADDR)
 
#define BMG160_SHADOW_DIS__POS   (6)
 
#define BMG160_SHADOW_DIS__LEN   (1)
 
#define BMG160_SHADOW_DIS__MSK   (0x40)
 
#define BMG160_SHADOW_DIS__REG   (BMG160_HIGH_BW_ADDR)
 
BIT LENGTH, MASK, POSITION FOR THE DATA INTERRUPT
#define BMG160_INTR_ENABLE0_DATA__POS   (7)
 
#define BMG160_INTR_ENABLE0_DATA__LEN   (1)
 
#define BMG160_INTR_ENABLE0_DATA__MSK   (0x80)
 
#define BMG160_INTR_ENABLE0_DATA__REG   (BMG160_INTR_ENABLE0_ADDR)
 
BIT LENGTH, MASK, POSITION FOR THE FIFO INTERRUPT
#define BMG160_INTR_ENABLE0_FIFO__POS   (6)
 
#define BMG160_INTR_ENABLE0_FIFO__LEN   (1)
 
#define BMG160_INTR_ENABLE0_FIFO__MSK   (0x40)
 
#define BMG160_INTR_ENABLE0_FIFO__REG   (BMG160_INTR_ENABLE0_ADDR)
 
BIT LENGTH, MASK, POSITION

FOR THE AUTO OFFSET INTERRUPT

#define BMG160_INTR_ENABLE0_AUTO_OFFSET__POS   (2)
 
#define BMG160_INTR_ENABLE0_AUTO_OFFSET__LEN   (1)
 
#define BMG160_INTR_ENABLE0_AUTO_OFFSET__MSK   (0x04)
 
#define BMG160_INTR_ENABLE0_AUTO_OFFSET__REG   (BMG160_INTR_ENABLE0_ADDR)
 
BIT LENGTH, MASK, POSITION FOR THE OUTPUT TYPE
#define BMG160_INTR_ENABLE1_IT2_OUTPUT_TYPE__POS   (3)
 
#define BMG160_INTR_ENABLE1_IT2_OUTPUT_TYPE__LEN   (1)
 
#define BMG160_INTR_ENABLE1_IT2_OUTPUT_TYPE__MSK   (0x08)
 
#define BMG160_INTR_ENABLE1_IT2_OUTPUT_TYPE__REG   (BMG160_INTR_ENABLE1_ADDR)
 
#define BMG160_INTR_ENABLE1_IT1_OUTPUT_TYPE__POS   (1)
 
#define BMG160_INTR_ENABLE1_IT1_OUTPUT_TYPE__LEN   (1)
 
#define BMG160_INTR_ENABLE1_IT1_OUTPUT_TYPE__MSK   (0x02)
 
#define BMG160_INTR_ENABLE1_IT1_OUTPUT_TYPE__REG   (BMG160_INTR_ENABLE1_ADDR)
 
BIT LENGTH, MASK, POSITION FOR THE LEVEL
#define BMG160_INTR_ENABLE1_IT2_LEVEL__POS   (2)
 
#define BMG160_INTR_ENABLE1_IT2_LEVEL__LEN   (1)
 
#define BMG160_INTR_ENABLE1_IT2_LEVEL__MSK   (0x04)
 
#define BMG160_INTR_ENABLE1_IT2_LEVEL__REG   (BMG160_INTR_ENABLE1_ADDR)
 
#define BMG160_INTR_ENABLE1_IT1_LEVEL__POS   (0)
 
#define BMG160_INTR_ENABLE1_IT1_LEVEL__LEN   (1)
 
#define BMG160_INTR_ENABLE1_IT1_LEVEL__MSK   (0x01)
 
#define BMG160_INTR_ENABLE1_IT1_LEVEL__REG   (BMG160_INTR_ENABLE1_ADDR)
 
BIT LENGTH, MASK, POSITION FOR HIGH RATE INTERRUPT
#define BMG160_INTR_MAP_ZERO_INTR1_HIGHRATE__POS   (3)
 
#define BMG160_INTR_MAP_ZERO_INTR1_HIGHRATE__LEN   (1)
 
#define BMG160_INTR_MAP_ZERO_INTR1_HIGHRATE__MSK   (0x08)
 
#define BMG160_INTR_MAP_ZERO_INTR1_HIGHRATE__REG   (BMG160_INTR_MAP_ZERO_ADDR)
 
#define BMG160_INTR_MAP_TWO_INTR2_HIGHRATE__POS   (3)
 
#define BMG160_INTR_MAP_TWO_INTR2_HIGHRATE__LEN   (1)
 
#define BMG160_INTR_MAP_TWO_INTR2_HIGHRATE__MSK   (0x08)
 
#define BMG160_INTR_MAP_TWO_INTR2_HIGHRATE__REG   (BMG160_INTR_MAP_TWO_ADDR)
 
BIT LENGTH, MASK, POSITION FOR ANY_MOTION INTERRUPT
#define BMG160_INTR_MAP_ZERO_INTR1_ANY_MOTION__POS   (1)
 
#define BMG160_INTR_MAP_ZERO_INTR1_ANY_MOTION__LEN   (1)
 
#define BMG160_INTR_MAP_ZERO_INTR1_ANY_MOTION__MSK   (0x02)
 
#define BMG160_INTR_MAP_ZERO_INTR1_ANY_MOTION__REG   (BMG160_INTR_MAP_ZERO_ADDR)
 
#define BMG160_MAP_ONE_INTR2_DATA__POS   (7)
 
#define BMG160_MAP_ONE_INTR2_DATA__LEN   (1)
 
#define BMG160_MAP_ONE_INTR2_DATA__MSK   (0x80)
 
#define BMG160_MAP_ONE_INTR2_DATA__REG   (BMG160_INTR_MAP_ONE_ADDR)
 
BIT LENGTH, MASK, POSITION FOR FAST OFFSET INTERRUPT
#define BMG160_MAP_ONE_INTR2_FAST_OFFSET__POS   (6)
 
#define BMG160_MAP_ONE_INTR2_FAST_OFFSET__LEN   (1)
 
#define BMG160_MAP_ONE_INTR2_FAST_OFFSET__MSK   (0x40)
 
#define BMG160_MAP_ONE_INTR2_FAST_OFFSET__REG   (BMG160_INTR_MAP_ONE_ADDR)
 
#define BMG160_MAP_ONE_INTR1_FAST_OFFSET__POS   (1)
 
#define BMG160_MAP_ONE_INTR1_FAST_OFFSET__LEN   (1)
 
#define BMG160_MAP_ONE_INTR1_FAST_OFFSET__MSK   (0x02)
 
#define BMG160_MAP_ONE_INTR1_FAST_OFFSET__REG   (BMG160_INTR_MAP_ONE_ADDR)
 
BIT LENGTH, MASK, POSITION FOR FIFO INTERRUPT
#define BMG160_MAP_ONE_INTR2_FIFO__POS   (5)
 
#define BMG160_MAP_ONE_INTR2_FIFO__LEN   (1)
 
#define BMG160_MAP_ONE_INTR2_FIFO__MSK   (0x20)
 
#define BMG160_MAP_ONE_INTR2_FIFO__REG   (BMG160_INTR_MAP_ONE_ADDR)
 
#define BMG160_MAP_ONE_INTR1_FIFO__POS   (2)
 
#define BMG160_MAP_ONE_INTR1_FIFO__LEN   (1)
 
#define BMG160_MAP_ONE_INTR1_FIFO__MSK   (0x04)
 
#define BMG160_MAP_ONE_INTR1_FIFO__REG   (BMG160_INTR_MAP_ONE_ADDR)
 
BIT LENGTH, MASK, POSITION FOR AUTO OFFSET INTERRUPT
#define BMG160_MAP_ONE_INTR2_AUTO_OFFSET__POS   (4)
 
#define BMG160_MAP_ONE_INTR2_AUTO_OFFSET__LEN   (1)
 
#define BMG160_MAP_ONE_INTR2_AUTO_OFFSET__MSK   (0x10)
 
#define BMG160_MAP_ONE_INTR2_AUTO_OFFSET__REG   (BMG160_INTR_MAP_ONE_ADDR)
 
#define BMG160_MAP_ONE_INTR1_AUTO_OFFSET__POS   (3)
 
#define BMG160_MAP_ONE_INTR1_AUTO_OFFSET__LEN   (1)
 
#define BMG160_MAP_ONE_INTR1_AUTO_OFFSET__MSK   (0x08)
 
#define BMG160_MAP_ONE_INTR1_AUTO_OFFSET__REG   (BMG160_INTR_MAP_ONE_ADDR)
 
BIT LENGTH, MASK, POSITION FOR DATA INTERRUPT
#define BMG160_MAP_ONE_INTR1_DATA__POS   (0)
 
#define BMG160_MAP_ONE_INTR1_DATA__LEN   (1)
 
#define BMG160_MAP_ONE_INTR1_DATA__MSK   (0x01)
 
#define BMG160_MAP_ONE_INTR1_DATA__REG   (BMG160_INTR_MAP_ONE_ADDR)
 
BIT LENGTH, MASK, POSITION FOR ANY MOTION INTERRUPT
#define BMG160_INTR_MAP_TWO_INTR2_ANY_MOTION__POS   (1)
 
#define BMG160_INTR_MAP_TWO_INTR2_ANY_MOTION__LEN   (1)
 
#define BMG160_INTR_MAP_TWO_INTR2_ANY_MOTION__MSK   (0x02)
 
#define BMG160_INTR_MAP_TWO_INTR2_ANY_MOTION__REG   (BMG160_INTR_MAP_TWO_ADDR)
 
BIT LENGTH, MASK, POSITION FOR SLOW OFFSET UNFILT
#define BMG160_INTR_ZERO_ADDR_SLOW_OFFSET_UNFILT__POS   (5)
 
#define BMG160_INTR_ZERO_ADDR_SLOW_OFFSET_UNFILT__LEN   (1)
 
#define BMG160_INTR_ZERO_ADDR_SLOW_OFFSET_UNFILT__MSK   (0x20)
 
#define BMG160_INTR_ZERO_ADDR_SLOW_OFFSET_UNFILT__REG   (BMG160_INTR_ZERO_ADDR)
 
BIT LENGTH, MASK, POSITION FOR HIGH RATE UNFILT
#define BMG160_INTR_ZERO_ADDR_HIGHRATE_UNFILT_DATA__POS   (3)
 
#define BMG160_INTR_ZERO_ADDR_HIGHRATE_UNFILT_DATA__LEN   (1)
 
#define BMG160_INTR_ZERO_ADDR_HIGHRATE_UNFILT_DATA__MSK   (0x08)
 
#define BMG160_INTR_ZERO_ADDR_HIGHRATE_UNFILT_DATA__REG   (BMG160_INTR_ZERO_ADDR)
 
BIT LENGTH, MASK, POSITION FOR ANY MOTION UNFILT
#define BMG160_INTR_ZERO_ADDR_ANY_MOTION_UNFILT_DATA__POS   (1)
 
#define BMG160_INTR_ZERO_ADDR_ANY_MOTION_UNFILT_DATA__LEN   (1)
 
#define BMG160_INTR_ZERO_ADDR_ANY_MOTION_UNFILT_DATA__MSK   (0x02)
 
#define BMG160_INTR_ZERO_ADDR_ANY_MOTION_UNFILT_DATA__REG   (BMG160_INTR_ZERO_ADDR)
 
BIT LENGTH, MASK, POSITION FOR FAST OFFSET UNFILT
#define BMG160_INTR_ONE_ADDR_FAST_OFFSET_UNFILT__POS   (7)
 
#define BMG160_INTR_ONE_ADDR_FAST_OFFSET_UNFILT__LEN   (1)
 
#define BMG160_INTR_ONE_ADDR_FAST_OFFSET_UNFILT__MSK   (0x80)
 
#define BMG160_INTR_ONE_ADDR_FAST_OFFSET_UNFILT__REG   (BMG160_INTR_ONE_ADDR)
 
BIT LENGTH, MASK, POSITION FOR ANY MOTION THRESHOLD
#define BMG160_INTR_ONE_ADDR_ANY_MOTION_THRES__POS   (0)
 
#define BMG160_INTR_ONE_ADDR_ANY_MOTION_THRES__LEN   (7)
 
#define BMG160_INTR_ONE_ADDR_ANY_MOTION_THRES__MSK   (0x7F)
 
#define BMG160_INTR_ONE_ADDR_ANY_MOTION_THRES__REG   (BMG160_INTR_ONE_ADDR)
 
BIT LENGTH, MASK, POSITION FOR AWAKE DURATION
#define BMG160_INTR_TWO_ADDR_AWAKE_DURN__POS   (6)
 
#define BMG160_INTR_TWO_ADDR_AWAKE_DURN__LEN   (2)
 
#define BMG160_INTR_TWO_ADDR_AWAKE_DURN__MSK   (0xC0)
 
#define BMG160_INTR_TWO_ADDR_AWAKE_DURN__REG   (BMG160_INTR_TWO_ADDR)
 
BIT LENGTH, MASK, POSITION FOR ANY MOTION SAMPLE
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_DURN_SAMPLE__POS   (4)
 
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_DURN_SAMPLE__LEN   (2)
 
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_DURN_SAMPLE__MSK   (0x30)
 
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_DURN_SAMPLE__REG   (BMG160_INTR_TWO_ADDR)
 
BIT LENGTH, MASK, POSITION FOR ANY MOTION XYZ AXIS
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_ENABLE_Z__POS   (2)
 
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_ENABLE_Z__LEN   (1)
 
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_ENABLE_Z__MSK   (0x04)
 
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_ENABLE_Z__REG   (BMG160_INTR_TWO_ADDR)
 
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_ENABLE_Y__POS   (1)
 
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_ENABLE_Y__LEN   (1)
 
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_ENABLE_Y__MSK   (0x02)
 
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_ENABLE_Y__REG   (BMG160_INTR_TWO_ADDR)
 
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_ENABLE_X__POS   (0)
 
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_ENABLE_X__LEN   (1)
 
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_ENABLE_X__MSK   (0x01)
 
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_ENABLE_X__REG   (BMG160_INTR_TWO_ADDR)
 
BIT LENGTH, MASK, POSITION FOR FIFO WATER MARK
#define BMG160_INTR_4_FIFO_WM_ENABLE__POS   (7)
 
#define BMG160_INTR_4_FIFO_WM_ENABLE__LEN   (1)
 
#define BMG160_INTR_4_FIFO_WM_ENABLE__MSK   (0x80)
 
#define BMG160_INTR_4_FIFO_WM_ENABLE__REG   (BMG160_INTR_4_ADDR)
 
BIT LENGTH, MASK, POSITION FOR LATCH
#define BMG160_RST_LATCH_ADDR_RST_INTR__POS   (7)
 
#define BMG160_RST_LATCH_ADDR_RST_INTR__LEN   (1)
 
#define BMG160_RST_LATCH_ADDR_RST_INTR__MSK   (0x80)
 
#define BMG160_RST_LATCH_ADDR_RST_INTR__REG   (BMG160_RST_LATCH_ADDR)
 
#define BMG160_RST_LATCH_ADDR_OFFSET_RST__POS   (6)
 
#define BMG160_RST_LATCH_ADDR_OFFSET_RST__LEN   (1)
 
#define BMG160_RST_LATCH_ADDR_OFFSET_RST__MSK   (0x40)
 
#define BMG160_RST_LATCH_ADDR_OFFSET_RST__REG   (BMG160_RST_LATCH_ADDR)
 
#define BMG160_RST_LATCH_ADDR_LATCH_STAT__POS   (4)
 
#define BMG160_RST_LATCH_ADDR_LATCH_STAT__LEN   (1)
 
#define BMG160_RST_LATCH_ADDR_LATCH_STAT__MSK   (0x10)
 
#define BMG160_RST_LATCH_ADDR_LATCH_STAT__REG   (BMG160_RST_LATCH_ADDR)
 
#define BMG160_RST_LATCH_ADDR_LATCH_INTR__POS   (0)
 
#define BMG160_RST_LATCH_ADDR_LATCH_INTR__LEN   (4)
 
#define BMG160_RST_LATCH_ADDR_LATCH_INTR__MSK   (0x0F)
 
#define BMG160_RST_LATCH_ADDR_LATCH_INTR__REG   (BMG160_RST_LATCH_ADDR)
 
BIT LENGTH, MASK, POSITION FOR HIGH RATE CONFIGURATION
#define BMG160_HIGHRATE_HYST_X__POS   (6)
 
#define BMG160_HIGHRATE_HYST_X__LEN   (2)
 
#define BMG160_HIGHRATE_HYST_X__MSK   (0xC0)
 
#define BMG160_HIGHRATE_HYST_X__REG   (BMG160_HIGHRATE_THRES_X_ADDR)
 
#define BMG160_HIGHRATE_THRES_X__POS   (1)
 
#define BMG160_HIGHRATE_THRES_X__LEN   (5)
 
#define BMG160_HIGHRATE_THRES_X__MSK   (0x3E)
 
#define BMG160_HIGHRATE_THRES_X__REG   (BMG160_HIGHRATE_THRES_X_ADDR)
 
#define BMG160_HIGHRATE_ENABLE_X__POS   (0)
 
#define BMG160_HIGHRATE_ENABLE_X__LEN   (1)
 
#define BMG160_HIGHRATE_ENABLE_X__MSK   (0x01)
 
#define BMG160_HIGHRATE_ENABLE_X__REG   (BMG160_HIGHRATE_THRES_X_ADDR)
 
#define BMG160_HIGHRATE_HYST_Y__POS   (6)
 
#define BMG160_HIGHRATE_HYST_Y__LEN   (2)
 
#define BMG160_HIGHRATE_HYST_Y__MSK   (0xC0)
 
#define BMG160_HIGHRATE_HYST_Y__REG   (BMG160_HIGHRATE_THRES_Y_ADDR)
 
#define BMG160_HIGHRATE_THRES_Y__POS   (1)
 
#define BMG160_HIGHRATE_THRES_Y__LEN   (5)
 
#define BMG160_HIGHRATE_THRES_Y__MSK   (0x3E)
 
#define BMG160_HIGHRATE_THRES_Y__REG   (BMG160_HIGHRATE_THRES_Y_ADDR)
 
#define BMG160_HIGHRATE_ENABLE_Y__POS   (0)
 
#define BMG160_HIGHRATE_ENABLE_Y__LEN   (1)
 
#define BMG160_HIGHRATE_ENABLE_Y__MSK   (0x01)
 
#define BMG160_HIGHRATE_ENABLE_Y__REG   (BMG160_HIGHRATE_THRES_Y_ADDR)
 
#define BMG160_HIGHRATE_HYST_Z__POS   (6)
 
#define BMG160_HIGHRATE_HYST_Z__LEN   (2)
 
#define BMG160_HIGHRATE_HYST_Z__MSK   (0xC0)
 
#define BMG160_HIGHRATE_HYST_Z__REG   (BMG160_HIGHRATE_THRES_Z_ADDR)
 
#define BMG160_HIGHRATE_THRES_Z__POS   (1)
 
#define BMG160_HIGHRATE_THRES_Z__LEN   (5)
 
#define BMG160_HIGHRATE_THRES_Z__MSK   (0x3E)
 
#define BMG160_HIGHRATE_THRES_Z__REG   (BMG160_HIGHRATE_THRES_Z_ADDR)
 
#define BMG160_HIGHRATE_ENABLE_Z__POS   (0)
 
#define BMG160_HIGHRATE_ENABLE_Z__LEN   (1)
 
#define BMG160_HIGHRATE_ENABLE_Z__MSK   (0x01)
 
#define BMG160_HIGHRATE_ENABLE_Z__REG   (BMG160_HIGHRATE_THRES_Z_ADDR)
 
BIT LENGTH, MASK, POSITION FOR SLOW OFFSET
#define BMG160_SLOW_OFFSET_THRES__POS   (6)
 
#define BMG160_SLOW_OFFSET_THRES__LEN   (2)
 
#define BMG160_SLOW_OFFSET_THRES__MSK   (0xC0)
 
#define BMG160_SLOW_OFFSET_THRES__REG   (BMG160_SOC_ADDR)
 
#define BMG160_SLOW_OFFSET_DURN__POS   (3)
 
#define BMG160_SLOW_OFFSET_DURN__LEN   (3)
 
#define BMG160_SLOW_OFFSET_DURN__MSK   (0x38)
 
#define BMG160_SLOW_OFFSET_DURN__REG   (BMG160_SOC_ADDR)
 
#define BMG160_SLOW_OFFSET_ENABLE_Z__POS   (2)
 
#define BMG160_SLOW_OFFSET_ENABLE_Z__LEN   (1)
 
#define BMG160_SLOW_OFFSET_ENABLE_Z__MSK   (0x04)
 
#define BMG160_SLOW_OFFSET_ENABLE_Z__REG   (BMG160_SOC_ADDR)
 
#define BMG160_SLOW_OFFSET_ENABLE_Y__POS   (1)
 
#define BMG160_SLOW_OFFSET_ENABLE_Y__LEN   (1)
 
#define BMG160_SLOW_OFFSET_ENABLE_Y__MSK   (0x02)
 
#define BMG160_SLOW_OFFSET_ENABLE_Y__REG   (BMG160_SOC_ADDR)
 
#define BMG160_SLOW_OFFSET_ENABLE_X__POS   (0)
 
#define BMG160_SLOW_OFFSET_ENABLE_X__LEN   (1)
 
#define BMG160_SLOW_OFFSET_ENABLE_X__MSK   (0x01)
 
#define BMG160_SLOW_OFFSET_ENABLE_X__REG   (BMG160_SOC_ADDR)
 
BIT LENGTH, MASK, POSITION FOR AUTO OFFSET
#define BMG160_AUTO_OFFSET_WORD_LENGHTH__POS   (6)
 
#define BMG160_AUTO_OFFSET_WORD_LENGHTH__LEN   (2)
 
#define BMG160_AUTO_OFFSET_WORD_LENGHTH__MSK   (0xC0)
 
#define BMG160_AUTO_OFFSET_WORD_LENGHTH__REG   (BMG160_A_FOC_ADDR)
 
BIT LENGTH, MASK, POSITION FOR FATS OFFSET
#define BMG160_FAST_OFFSET_WORD_LENGHTH__POS   (4)
 
#define BMG160_FAST_OFFSET_WORD_LENGHTH__LEN   (2)
 
#define BMG160_FAST_OFFSET_WORD_LENGHTH__MSK   (0x30)
 
#define BMG160_FAST_OFFSET_WORD_LENGHTH__REG   (BMG160_A_FOC_ADDR)
 
#define BMG160_FAST_OFFSET_ENABLE__POS   (3)
 
#define BMG160_FAST_OFFSET_ENABLE__LEN   (1)
 
#define BMG160_FAST_OFFSET_ENABLE__MSK   (0x08)
 
#define BMG160_FAST_OFFSET_ENABLE__REG   (BMG160_A_FOC_ADDR)
 
#define BMG160_FAST_OFFSET_ENABLE_Z__POS   (2)
 
#define BMG160_FAST_OFFSET_ENABLE_Z__LEN   (1)
 
#define BMG160_FAST_OFFSET_ENABLE_Z__MSK   (0x04)
 
#define BMG160_FAST_OFFSET_ENABLE_Z__REG   (BMG160_A_FOC_ADDR)
 
#define BMG160_FAST_OFFSET_ENABLE_Y__POS   (1)
 
#define BMG160_FAST_OFFSET_ENABLE_Y__LEN   (1)
 
#define BMG160_FAST_OFFSET_ENABLE_Y__MSK   (0x02)
 
#define BMG160_FAST_OFFSET_ENABLE_Y__REG   (BMG160_A_FOC_ADDR)
 
#define BMG160_FAST_OFFSET_ENABLE_X__POS   (0)
 
#define BMG160_FAST_OFFSET_ENABLE_X__LEN   (1)
 
#define BMG160_FAST_OFFSET_ENABLE_X__MSK   (0x01)
 
#define BMG160_FAST_OFFSET_ENABLE_X__REG   (BMG160_A_FOC_ADDR)
 
#define BMG160_FAST_OFFSET_ENABLE_XYZ__POS   (0)
 
#define BMG160_FAST_OFFSET_ENABLE_XYZ__LEN   (3)
 
#define BMG160_FAST_OFFSET_ENABLE_XYZ__MSK   (0x07)
 
#define BMG160_FAST_OFFSET_ENABLE_XYZ__REG   (BMG160_A_FOC_ADDR)
 
BIT LENGTH, MASK, POSITION FOR NVM
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_REMAIN__POS   (4)
 
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_REMAIN__LEN   (4)
 
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_REMAIN__MSK   (0xF0)
 
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_REMAIN__REG   (BMG160_TRIM_NVM_CTRL_ADDR)
 
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_LOAD__POS   (3)
 
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_LOAD__LEN   (1)
 
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_LOAD__MSK   (0x08)
 
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_LOAD__REG   (BMG160_TRIM_NVM_CTRL_ADDR)
 
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_RDY__POS   (2)
 
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_RDY__LEN   (1)
 
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_RDY__MSK   (0x04)
 
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_RDY__REG   (BMG160_TRIM_NVM_CTRL_ADDR)
 
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_PROG_TRIG__POS   (1)
 
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_PROG_TRIG__LEN   (1)
 
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_PROG_TRIG__MSK   (0x02)
 
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_PROG_TRIG__REG   (BMG160_TRIM_NVM_CTRL_ADDR)
 
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_PROG_MODE__POS   (0)
 
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_PROG_MODE__LEN   (1)
 
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_PROG_MODE__MSK   (0x01)
 
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_PROG_MODE__REG   (BMG160_TRIM_NVM_CTRL_ADDR)
 
BIT LENGTH, MASK, POSITION FOR I2C CONFIGURATION
#define BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_ENABLE__POS   (2)
 
#define BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_ENABLE__LEN   (1)
 
#define BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_ENABLE__MSK   (0x04)
 
#define BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_ENABLE__REG   (BMG160_BGW_SPI3_WDT_ADDR)
 
#define BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_SELECT__POS   (1)
 
#define BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_SELECT__LEN   (1)
 
#define BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_SELECT__MSK   (0x02)
 
#define BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_SELECT__REG   (BMG160_BGW_SPI3_WDT_ADDR)
 
#define BMG160_BGW_SPI3_WDT_ADDR_SPI3__POS   (0)
 
#define BMG160_BGW_SPI3_WDT_ADDR_SPI3__LEN   (1)
 
#define BMG160_BGW_SPI3_WDT_ADDR_SPI3__MSK   (0x01)
 
#define BMG160_BGW_SPI3_WDT_ADDR_SPI3__REG   (BMG160_BGW_SPI3_WDT_ADDR)
 
BIT LENGTH, MASK, POSITION FOR SELFTEST
#define BMG160_SELFTEST_ADDR_RATEOK__POS   (4)
 
#define BMG160_SELFTEST_ADDR_RATEOK__LEN   (1)
 
#define BMG160_SELFTEST_ADDR_RATEOK__MSK   (0x10)
 
#define BMG160_SELFTEST_ADDR_RATEOK__REG   (BMG160_SELFTEST_ADDR)
 
#define BMG160_SELFTEST_ADDR_BISTFAIL__POS   (2)
 
#define BMG160_SELFTEST_ADDR_BISTFAIL__LEN   (1)
 
#define BMG160_SELFTEST_ADDR_BISTFAIL__MSK   (0x04)
 
#define BMG160_SELFTEST_ADDR_BISTFAIL__REG   (BMG160_SELFTEST_ADDR)
 
#define BMG160_SELFTEST_ADDR_BISTRDY__POS   (1)
 
#define BMG160_SELFTEST_ADDR_BISTRDY__LEN   (1)
 
#define BMG160_SELFTEST_ADDR_BISTRDY__MSK   (0x02)
 
#define BMG160_SELFTEST_ADDR_BISTRDY__REG   (BMG160_SELFTEST_ADDR)
 
#define BMG160_SELFTEST_ADDR_TRIGBIST__POS   (0)
 
#define BMG160_SELFTEST_ADDR_TRIGBIST__LEN   (1)
 
#define BMG160_SELFTEST_ADDR_TRIGBIST__MSK   (0x01)
 
#define BMG160_SELFTEST_ADDR_TRIGBIST__REG   (BMG160_SELFTEST_ADDR)
 
BIT LENGTH, MASK, POSITION FOR FIFO CONFIGURATION
#define BMG160_FIFO_CGF1_ADDR_TAG__POS   (7)
 
#define BMG160_FIFO_CGF1_ADDR_TAG__LEN   (1)
 
#define BMG160_FIFO_CGF1_ADDR_TAG__MSK   (0x80)
 
#define BMG160_FIFO_CGF1_ADDR_TAG__REG   (BMG160_FIFO_CGF1_ADDR)
 
#define BMG160_FIFO_CGF1_ADDR_WML__POS   (0)
 
#define BMG160_FIFO_CGF1_ADDR_WML__LEN   (7)
 
#define BMG160_FIFO_CGF1_ADDR_WML__MSK   (0x7F)
 
#define BMG160_FIFO_CGF1_ADDR_WML__REG   (BMG160_FIFO_CGF1_ADDR)
 
#define BMG160_FIFO_CGF0_ADDR_MODE__POS   (6)
 
#define BMG160_FIFO_CGF0_ADDR_MODE__LEN   (2)
 
#define BMG160_FIFO_CGF0_ADDR_MODE__MSK   (0xC0)
 
#define BMG160_FIFO_CGF0_ADDR_MODE__REG   (BMG160_FIFO_CGF0_ADDR)
 
#define BMG160_FIFO_CGF0_ADDR_DATA_SELECT__POS   (0)
 
#define BMG160_FIFO_CGF0_ADDR_DATA_SELECT__LEN   (2)
 
#define BMG160_FIFO_CGF0_ADDR_DATA_SELECT__MSK   (0x03)
 
#define BMG160_FIFO_CGF0_ADDR_DATA_SELECT__REG   (BMG160_FIFO_CGF0_ADDR)
 
BIT LENGTH, MASK, POSITION FOR OFFSET
#define BMG160_OFC1_ADDR_OFFSET_X__POS   (6)
 
#define BMG160_OFC1_ADDR_OFFSET_X__LEN   (2)
 
#define BMG160_OFC1_ADDR_OFFSET_X__MSK   (0xC0)
 
#define BMG160_OFC1_ADDR_OFFSET_X__REG   (BMG160_OFFSET_OFC1_ADDR)
 
#define BMG160_OFC1_ADDR_OFFSET_Y__POS   (3)
 
#define BMG160_OFC1_ADDR_OFFSET_Y__LEN   (3)
 
#define BMG160_OFC1_ADDR_OFFSET_Y__MSK   (0x38)
 
#define BMG160_OFC1_ADDR_OFFSET_Y__REG   (BMG160_OFFSET_OFC1_ADDR)
 
#define BMG160_OFC1_ADDR_OFFSET_Z__POS   (0)
 
#define BMG160_OFC1_ADDR_OFFSET_Z__LEN   (3)
 
#define BMG160_OFC1_ADDR_OFFSET_Z__MSK   (0x07)
 
#define BMG160_OFC1_ADDR_OFFSET_Z__REG   (BMG160_OFFSET_OFC1_ADDR)
 
#define BMG160_TRIM_GP0_ADDR_GP0__POS   (4)
 
#define BMG160_TRIM_GP0_ADDR_GP0__LEN   (4)
 
#define BMG160_TRIM_GP0_ADDR_GP0__MSK   (0xF0)
 
#define BMG160_TRIM_GP0_ADDR_GP0__REG   (BMG160_TRIM_GP0_ADDR)
 
#define BMG160_TRIM_GP0_ADDR_OFFSET_X__POS   (2)
 
#define BMG160_TRIM_GP0_ADDR_OFFSET_X__LEN   (2)
 
#define BMG160_TRIM_GP0_ADDR_OFFSET_X__MSK   (0x0C)
 
#define BMG160_TRIM_GP0_ADDR_OFFSET_X__REG   (BMG160_TRIM_GP0_ADDR)
 
#define BMG160_TRIM_GP0_ADDR_OFFSET_Y__POS   (1)
 
#define BMG160_TRIM_GP0_ADDR_OFFSET_Y__LEN   (1)
 
#define BMG160_TRIM_GP0_ADDR_OFFSET_Y__MSK   (0x02)
 
#define BMG160_TRIM_GP0_ADDR_OFFSET_Y__REG   (BMG160_TRIM_GP0_ADDR)
 
#define BMG160_TRIM_GP0_ADDR_OFFSET_Z__POS   (0)
 
#define BMG160_TRIM_GP0_ADDR_OFFSET_Z__LEN   (1)
 
#define BMG160_TRIM_GP0_ADDR_OFFSET_Z__MSK   (0x01)
 
#define BMG160_TRIM_GP0_ADDR_OFFSET_Z__REG   (BMG160_TRIM_GP0_ADDR)
 
AXIS ENABLE DEFINITIONS
#define BMG160_X_AXIS   (0)
 
#define BMG160_Y_AXIS   (1)
 
#define BMG160_Z_AXIS   (2)
 
POWER MODE
#define BMG160_MODE_NORMAL   (0)
 
#define BMG160_MODE_DEEPSUSPEND   (1)
 
#define BMG160_MODE_SUSPEND   (2)
 
#define BMG160_MODE_FASTPOWERUP   (3)
 
#define BMG160_MODE_ADVANCEDPOWERSAVING   (4)
 
BIT SLICE FUNCTIONS
#define BMG160_GET_BITSLICE(regvar, bitname)   ((regvar & bitname##__MSK) >> bitname##__POS)
 
#define BMG160_SET_BITSLICE(regvar, bitname, val)   ((regvar&~bitname##__MSK)|((val<<bitname##__POS)&bitname##__MSK))
 
ARRAY SIZE DEFINITIONS
#define BMG160_X_DATA_SIZE   (2)
 
#define BMG160_Y_DATA_SIZE   (2)
 
#define BMG160_Z_DATA_SIZE   (2)
 
#define BMG160_XYZ_DATA_SIZE   (6)
 
#define BMG160_XYZ_INTR_DATA_SIZE   (12)
 
#define BMG160_X_LSB_DATA   (0)
 
#define BMG160_X_MSB_DATA   (1)
 
#define BMG160_Y_LSB_DATA   (0)
 
#define BMG160_Y_MSB_DATA   (1)
 
#define BMG160_Z_LSB_DATA   (0)
 
#define BMG160_Z_MSB_DATA   (1)
 
#define BMG160_INTR0_STAT   (0)
 
#define BMG160_INTR1_STAT   (1)
 
#define BMG160_INTR2_STAT   (2)
 
#define BMG160_INTR3_STAT   (3)
 
#define BMG160_INTR4_STAT   (4)
 
#define BMG160_DATA_FRAME_X_LSB_BYTE   (0)
 
#define BMG160_DATA_FRAME_X_MSB_BYTE   (1)
 
#define BMG160_DATA_FRAME_Y_LSB_BYTE   (2)
 
#define BMG160_DATA_FRAME_Y_MSB_BYTE   (3)
 
#define BMG160_DATA_FRAME_Z_LSB_BYTE   (4)
 
#define BMG160_DATA_FRAME_Z_MSB_BYTE   (5)
 
#define BMG160_DATA_FRAME_INTR0_BYTE   (7)
 
#define BMG160_DATA_FRAME_INTR1_BYTE   (8)
 
#define BMG160_DATA_FRAME_INTR2_BYTE   (9)
 
#define BMG160_DATA_FRAME_INTR3_BYTE   (10)
 
#define BMG160_DATA_FRAME_INTR4_BYTE   (11)
 
COMMON DEFINITIONS
#define BMG160_NULL   (0)
 
#define BMG160_DISABLE   (0)
 
#define BMG160_ENABLE   (1)
 
#define BMG160_OFF   (0)
 
#define BMG160_ON   (1)
 
#define BMG160_INTR1   (0)
 
#define BMG160_INTR2   (1)
 
OFFSET DEFINITIONS
#define BMG160_SLOW_OFFSET   (0)
 
#define BMG160_AUTO_OFFSET   (1)
 
#define BMG160_FAST_OFFSET   (2)
 
#define BMG160_OFFSET_MASK_BYTE_OF_DATA   (0x0FF0)
 
#define BMG160_OFFSET_X_BIT_MASK1   (0x000C)
 
#define BMG160_OFFSET_X_BIT_MASK2   (0x0003)
 
#define BMG160_OFFSET_Y_Z_BIT_MASK1   (0x0001)
 
#define BMG160_OFFSET_Y_Z_BIT_MASK2   (0x000E)
 
INTERRUPT DEFINITIONS
#define BMG160_S_TAP   (0)
 
#define BMG160_D_TAP   (1)
 
#define BMG160_INTR1_DATA   (0)
 
#define BMG160_INTR2_DATA   (1)
 
#define BMG160_TAP_UNFILT_DATA   (0)
 
#define BMG160_HIGHRATE_UNFILT_DATA   (1)
 
#define BMG160_CONST_UNFILT_DATA   (2)
 
#define BMG160_ANY_MOTION_UNFILT_DATA   (3)
 
#define BMG160_SHAKE_UNFILT_DATA   (4)
 
#define BMG160_SHAKE_TH   (0)
 
#define BMG160_SHAKE_TH2   (1)
 
#define BMG160_AUTO_OFFSET_WORD_LENGHTH   (0)
 
#define BMG160_FAST_OFFSET_WORD_LENGHTH   (1)
 
I2C CONFIGURATION DEFINITIONS
#define BMG160_I2C_WDT_ENABLE   (0)
 
#define BMG160_I2C_WDT_SELECT   (1)
 
#define BMG160_EXT_MODE   (0)
 
#define BMG160_EXT_PAGE   (1)
 
#define BMG160_START_ADDR   (0)
 
#define BMG160_STOP_ADDR   (1)
 
#define BMG160_SLOW_CMD   (0)
 
#define BMG160_FAST_CMD   (1)
 
#define BMG160_TRIM_VRA   (0)
 
#define BMG160_TRIM_VRD   (1)
 
#define BMG160_LOGBIT_EM   (0)
 
#define BMG160_LOGBIT_VM   (1)
 
#define BMG160_GP0   (0)
 
#define BMG160_GP1   (1)
 
#define BMG160_LOW_SPEED   (0)
 
#define BMG160_HIGHRATE_SPEED   (1)
 
#define BMG160_DRIVE_OFFSET_P   (0)
 
#define BMG160_DRIVE_OFFSET_N   (1)
 
#define BMG160_TEST_MODE_ENABLE   (0)
 
#define BMG160_TEST_MODE_REG   (1)
 
#define BMG160_IBIAS_DRIVE_TRIM   (0)
 
#define BMG160_IBIAS_RATE_TRIM   (1)
 
#define BMG160_BAA_MODE   (0)
 
#define BMG160_BMA_MODE   (1)
 
#define BMG160_PI_KP   (0)
 
#define BMG160_PI_KI   (1)
 
ERROR/SUCCESS DEFINITIONS
#define C_BMG160_SUCCESS   (0)
 
#define C_BMG160_FAILURE   (1)
 
#define E_BMG160_NULL_PTR   ((s8)-127)
 
#define E_BMG160_OUT_OF_RANGE   ((s8)-2)
 
#define ERROR   ((s8)-1)
 
SPI DEFINITIONS
#define BMG160_SPI_RD_MASK   (0x80)
 
#define BMG160_READ_SET   (0x01)
 
BIT SHIFTING DEFINITIONS
#define BMG160_SHIFT_BIT_POSITION_BY_01_BIT   (1)
 
#define BMG160_SHIFT_BIT_POSITION_BY_02_BITS   (4)
 
#define BMG160_SHIFT_BIT_POSITION_BY_04_BITS   (4)
 
#define BMG160_SHIFT_BIT_POSITION_BY_08_BITS   (8)
 
NUMERIC DEFINITIONS
#define BMG160_INIT_VALUE   ((u8)0)
 
#define BMG160_GEN_READ_WRITE_DATA_LENGTH   ((u8)1)
 
#define BMG160_X_DATA_LENGTH   ((u8)2)
 
#define BMG160_Y_DATA_LENGTH   ((u8)2)
 
#define BMG160_Z_DATA_LENGTH   ((u8)2)
 
#define BMG160_ALL_DATA_FRAME_LENGTH   ((u8)6)
 
#define BMG160_BIT_LENGTH_HIGH_BW   ((u8)2)
 
#define BMG160_BIT_LENGTH_SHADOW_DIS   ((u8)2)
 
#define BMG160_BIT_LENGTH_FIFO   ((u8)2)
 
#define BMG160_BIT_LENGTH_FIFO_WM   ((u8)2)
 
#define BMG160_BIT_LENGTH_FIFO_TAG   ((u8)2)
 
#define BMG160_BIT_LENGTH_FIFO_MODE   ((u8)4)
 
#define BMG160_BIT_LENGTH_FIFO_DATA_SELECT   ((u8)4)
 
#define BMG160_BIT_MASK_MODE_LPM1   ((u8)4)
 
#define BMG160_BIT_LENGTH_RANGE   ((u8)5)
 
#define BMG160_BIT_LENGTH_BW   ((u8)8)
 
#define BMG160_BIT_LENGTH_DURN   ((u8)8)
 
#define BMG160_BIT_LENGTH_POWER_MODE   ((u8)5)
 
#define BMG160_XYZ_AND_INTR_DATA_LENGTH   ((u8)12)
 
#define BMG160_FIFO_WM_LENGTH   ((u8)128)
 
#define BMG160_POWER_MODE_DELAY   ((u8)1)
 
#define BMG160_SELFTEST_DELAY   ((u8)10)
 
#define BMG160_SELFTEST_BISTFAIL   ((u8)0x00)
 
#define BMG160_SELFTEST_RATEOK   ((u8)0x01)
 
BANDWIDTH DEFINITIONS
#define C_BMG160_NO_FILTER_U8X   (0)
 
#define C_BMG160_BW_230HZ_U8X   (1)
 
#define C_BMG160_BW_116HZ_U8X   (2)
 
#define C_BMG160_BW_47HZ_U8X   (3)
 
#define C_BMG160_BW_23HZ_U8X   (4)
 
#define C_BMG160_BW_12HZ_U8X   (5)
 
#define C_BMG160_BW_64HZ_U8X   (6)
 
#define C_BMG160_BW_32HZ_U8X   (7)
 
#define BMG160_BW_500_HZ   (0x01)
 
#define BMG160_BW_230_HZ   (0x01)
 
#define BMG160_BW_116_HZ   (0x02)
 
#define BMG160_BW_47_HZ   (0x03)
 
#define BMG160_BW_23_HZ   (0x04)
 
#define BMG160_BW_12_HZ   (0x05)
 
#define BMG160_BW_64_HZ   (0x06)
 
#define BMG160_BW_32_HZ   (0x07)
 
SLEEP DURATION DEFINITIONS
#define C_BMG160_NO_AUTO_SLEEP_DURN_U8X   (0)
 
#define C_BMG160_4MS_AUTO_SLEEP_DURN_U8X   (1)
 
#define C_BMG160_5MS_AUTO_SLEEP_DURN_U8X   (2)
 
#define C_BMG160_8MS_AUTO_SLEEP_DURN_U8X   (3)
 
#define C_BMG160_10MS_AUTO_SLEEP_DURN_U8X   (4)
 
#define C_BMG160_15MS_AUTO_SLEEP_DURN_U8X   (5)
 
#define C_BMG160_20MS_AUTO_SLEEP_DURN_U8X   (6)
 
#define C_BMG160_40MS_AUTO_SLEEP_DURN_U8X   (7)
 
RANGE DEFINITIONS
#define BMG160_RANGE_2000   (0x00)
 
#define BMG160_RANGE_1000   (0x01)
 
#define BMG160_RANGE_500   (0x02)
 
#define BMG160_RANGE_250   (0x03)
 
#define BMG160_RANGE_125   (0x04)
 
SOFT RESET DEFINITIONS
#define BMG160_SOFT_RESET   (0xB6)
 
LATCH DEFINITIONS
#define BMG160_NON_LATCH   (0x00)
 
#define BMG160_LATCH_250_MS   (0x01)
 
#define BMG160_LATCH_500_MS   (0x02)
 
#define BMG160_LATCH_1_SEC   (0x03)
 
#define BMG160_LATCH_2_SEC   (0x04)
 
#define BMG160_LATCH_4_SEC   (0x05)
 
#define BMG160_LATCH_8_SEC   (0x06)
 
#define BMG160_LATCH_LATCHED   (0x07)
 
#define BMG160_LATCH_NON_LATCHED   (0x08)
 
#define BMG160_LATCH_250_MICRO_SEC   (0x09)
 
#define BMG160_LATCH_500_MICRO_SEC   (0x0A)
 
#define BMG160_LATCH_1_MILLI_SEC   (0x0B)
 
#define BMG160_LATCH_12_5_MILLI_SEC   (0x0C)
 
#define BMG160_LATCH_25_MILLI_SEC   (0x0D)
 
#define BMG160_LATCH_50_MILLI_SEC   (0x0E)
 
BUS READ AND WRITE FUNCTION POINTERS DEFINITIONS
#define BMG160_WR_FUNC_PTR
 
#define BMG160_RD_FUNC_PTR
 
#define BMG160_BRD_FUNC_PTR
 
#define BMG160_MDELAY_DATA_TYPE   u32
 

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 DECLARATIONS
BMG160_RETURN_FUNCTION_TYPE bmg160_init (struct bmg160_t *bmg160)
 This function is used for initialize the bus read and bus write functions and assign the chip id and I2C address of the gyro chip id is read in the register 0x00 bit from 0 to 7. More...
 
DATA READ XYZ
BMG160_RETURN_FUNCTION_TYPE bmg160_get_data_X (s16 *v_data_x_s16)
 Reads Rate data X in the registers 0x02 to 0x03. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_data_Y (s16 *v_data_y_s16)
 Reads Rate data Y in the registers 0x04 to 0x05. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_data_Z (s16 *v_data_z_s16)
 Reads Rate data Z in the registers 0x06 to 0x07. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_data_XYZ (struct bmg160_data_t *data)
 Reads data X,Y and Z from register location 0x02 to 0x07. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_data_XYZI (struct bmg160_data_t *data)
 Reads data X,Y,Z and Interrupts from register location 0x02 to 0x07. More...
 
TEMPERATURE DATA READ
BMG160_RETURN_FUNCTION_TYPE bmg160_get_temp (s8 *v_temp_s8)
 Reads Temperature from register location 0x08. More...
 
COMMON READ AND WRITE FUNCTIONS
BMG160_RETURN_FUNCTION_TYPE bmg160_read_register (u8 v_addr_u8, u8 *v_data_u8, u8 v_len_u8)
 This API reads the data from the given register. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_burst_read (u8 v_addr_u8, u8 *v_data_u8, u32 v_len_u32)
 This API reads the data from the given register. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_write_register (u8 v_addr_u8, u8 *v_data_u8, u8 v_len_u8)
 This API write the data to the given register. More...
 
INTERRUPT STATUS
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr_stat_reg_zero (u8 *v_stat0_data_u8)
 This api used to reads interrupt status of any motion and high rate in the register 0x09. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr_stat_reg_one (u8 *v_stat1_data_u8)
 This api used to reads the interrupt status of data, auto_offset, fast_offset and fifo_int in the register 0x0A. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr_stat_reg_two (u8 *v_stat2_data_u8)
 This api used to reads the interrupt status of. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr_stat_reg_three (u8 *v_stat3_data_u8)
 This api used to reads the interrupt status of high_rate sign, high_rate first_z, high_rate first_x and high_rate first_y in the register 0x0C. More...
 
RANGE
BMG160_RETURN_FUNCTION_TYPE bmg160_get_range_reg (u8 *v_range_u8)
 This API is used to get the range in the register 0x0F bits from 0 to 2. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_range_reg (u8 v_range_u8)
 This API is used to set the range in the register 0x0F bits from 0 to 2. More...
 
BANDWIDTH
BMG160_RETURN_FUNCTION_TYPE bmg160_get_bw (u8 *v_bw_u8)
 This API is used to get the gyro bandwidth in the register 0x10 bits from 0 to 3. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_bw (u8 v_bw_u8)
 This API is used to set the gyro bandwidth in the register 0x10 bits from 0 to 3. More...
 
POWER MODE TRIGGER
BMG160_RETURN_FUNCTION_TYPE bmg160_get_pmu_ext_tri_select (u8 *v_pwu_ext_tri_select_u8)
 This API used to get the status of External Trigger selection in the register 0x12h bits from 4 to 5. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_pmu_ext_tri_select (u8 v_pwu_ext_tri_select_u8)
 This API used to set the status of External Trigger selection in the register 0x12h bits from 4 to 5. More...
 
HIGH BANDWIDTH
BMG160_RETURN_FUNCTION_TYPE bmg160_get_high_bw (u8 *v_high_bw_u8)
 This API is used to get data high bandwidth in the register 0x13 bit 7. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_high_bw (u8 v_high_bw_u8)
 This API is used to set data high bandwidth in the register 0x13 bit 7. More...
 
SHADOW DIS
BMG160_RETURN_FUNCTION_TYPE bmg160_get_shadow_dis (u8 *v_shadow_dis_u8)
 This API is used to get the shadow dis in the register 0x13 bit 6. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_shadow_dis (u8 v_shadow_dis_u8)
 This API is used to set the shadow dis in the register 0x13 bit 6. More...
 
OFFSET RESET
BMG160_RETURN_FUNCTION_TYPE bmg160_set_soft_rst (void)
 
DATA INTERRUPT
BMG160_RETURN_FUNCTION_TYPE bmg160_get_data_enable (u8 *v_data_enable_u8)
 This API is used to get the data(data_enable) interrupt enable bits of the sensor in the registers 0x15 bit 7. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_data_enable (u8 v_data_enable_u8)
 This API is used to set the data(data_enable) interrupt enable bits of the sensor in the registers 0x15 bit 7. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr_data (u8 v_axis_u8, u8 *v_intr_data_u8)
 This API is used to get the data interrupt1 and interrupt2(int1_data and int2_data) in the register 0x18. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_intr_data (u8 v_axis_u8, u8 v_intr_data_u8)
 This API is used to set the data interrupt1 and interrupt2(int1_data and int2_data) in the register 0x18. More...
 
FIFO INTERRUPT
BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_enable (u8 *v_fifo_enable_u8)
 This API is used to get the fifo(fifo_enable) interrupt enable bits of the sensor in the registers 0x15 bit 6. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_fifo_enable (u8 v_fifo_enable_u8)
 This API is used to set the fifo(fifo_enable) interrupt enable bits of the sensor in the registers 0x15 bit 6. More...
 
AUTO OFFSET INTERRUPT
BMG160_RETURN_FUNCTION_TYPE bmg160_get_auto_offset_enable (u8 *v_offset_enable_u8)
 This API is used to get the auto offset(auto_offset_enable) interrupt enable bits of the sensor in the registers 0x15 bit 3. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_auto_offset_enable (u8 v_offset_enable_u8)
 This API is used to set the auto offset(auto_offset_enable) interrupt enable bits of the sensor in the registers 0x15 bit 3. More...
 
OUTPUT TYPE AND LEVEL CONFIGURATION FOR INTERRUPT
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr_output_type (u8 v_param_u8, u8 *v_intr_output_type_u8)
 This API is used to get the output type status in the register 0x16. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_intr_output_type (u8 v_param_u8, u8 v_intr_output_type_u8)
 This API is used to set the output type status in the register 0x16. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr_level (u8 v_param_u8, u8 *v_intr_level_u8)
 This API is used to get Active Level status in the register 0x16. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_intr_level (u8 v_param_u8, u8 v_intr_level_u8)
 This API is used to set Active Level status in the register 0x16. More...
 
HIGH RATE INTERRUPT
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr1_highrate (u8 *v_intr1_u8)
 This API is used to get the high rate(int1_high) interrupt1 enable bits of the sensor in the registers 0x17 bit 3. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_intr1_highrate (u8 v_intr1_u8)
 This API is used to set the high rate(int1_high) interrupt1 enable bits of the sensor in the registers 0x17 bit 3. More...
 
ANY MOTION INTERRUPT
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr1_any_motion (u8 *v_int1r_any_motion_u8)
 This API is used to get the any motion(int1_any) interrupt1 enable bits of the sensor in the registers 0x17 bit 1. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_intr1_any_motion (u8 v_int1r_any_motion_u8)
 This API is used to set the any motion(int1_any) interrupt1 enable bits of the sensor in the registers 0x17 bit 1. More...
 
OFFSET AND AUTO OFFSET ENABLE
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr2_offset (u8 v_axis_u8, u8 *v_intr2_offset_u8)
 This API is used to get the fast offset(intr2_fast_offset) and auto offset(intr2_auto_offset) of interrupt2 in the register 0x18. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_intr2_offset (u8 v_axis_u8, u8 v_intr2_offset_u8)
 This API is used to set the fast offset(intr2_fast_offset) and auto offset(intr2_auto_offset) of interrupt2 in the register 0x18. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr_offset (u8 v_axis_u8, u8 *v_intr1_offset_u8)
 This API is used to get the fast offset(int1_fast_offset) and auto offset(int1_auto_offset) of interrupt1 in the register 0x18. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_intr1_offset (u8 v_axis_u8, u8 v_intr1_offset_u8)
 This API is used to set the fast offset(int1_fast_offset) and auto offset(int1_auto_offset) of interrupt1 in the register 0x18. More...
 
FIFO ENABLE
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr2_fifo (u8 *v_intr_fifo_u8)
 This API is used to get the fifo(int2_fifo) interrupt2 enable bits of the sensor in the registers 0x18 bit 5. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr1_fifo (u8 *v_intr_fifo_u8)
 This API is used to get the fifo(int1_fifo) interrupt1 enable bits of the sensor in the registers 0x18 bit 5. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_intr_fifo (u8 v_axis_u8, u8 v_intr_fifo_u8)
 This API is used to set the value of the fifo interrupt1 and interrupt2(int1_fifo and int2_fifo) in the register 0x18. More...
 
HIGH RATE ENABLE
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr2_highrate (u8 *v_intr2_highrate_u8)
 This API is used to get the high rate(int2_high_rate) interrupt2 enable bits of the sensor in the registers 0x19 bit 3. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_intr2_highrate (u8 v_intr2_highrate_u8)
 This API is used to set the high rate(int2_high_rate) interrupt2 enable bits of the sensor in the registers 0x19 bit 3. More...
 
ANY MOTION ENABLE
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr2_any_motion (u8 *v_intr2_any_motion_u8)
 This API is used to get the any motion(int2_any_motion) interrupt2 enable bits of the sensor in the registers 0x19 bit 1. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_intr2_any_motion (u8 v_intr2_any_motion_u8)
 This API is used to set the any motion(int2_any_motion) interrupt2 enable bits of the sensor in the registers 0x19 bit 1. More...
 
OFFSET UNFILT ENABLE
BMG160_RETURN_FUNCTION_TYPE bmg160_get_offset_unfilt (u8 v_param_u8, u8 *v_offset_unfilt_u8)
 This API is used to get the slow offset and fast offset unfilt data in the register 0x1A and 1B. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_offset_unfilt (u8 v_param_u8, u8 v_offset_unfilt_u8)
 This API is used to set the slow offset and fast offset unfilt data in the register 0x1A and 1B. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_unfilt_data (u8 v_param_u8, u8 *v_unfilt_data_u8)
 This API is used to get the any motion and high rate unfilt data in the register 0x1A. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_unfilt_data (u8 v_param_u8, u8 v_unfilt_data_u8)
 This API is used to set the any motion and high rate unfilt data in the register 0x1A. More...
 
ANY-MOTION CONFIGURATION
BMG160_RETURN_FUNCTION_TYPE bmg160_get_any_motion_thres (u8 *v_any_motion_thres_u8)
 This API is used to get Any motion Threshold in the register 0x1B bit from 0 to 6. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_any_motion_thres (u8 v_any_motion_thres_u8)
 This API is used to set Any motion Threshold in the register 0x1B bit from 0 to 6. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_awake_durn (u8 *v_awake_durn_u8)
 This API is used to get the awake Duration in the register 0x1C bit 6 and 7. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_awake_durn (u8 v_awake_durn_u8)
 This API is used to set the awake Duration in the register 0x1C bit 6 and 7. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_any_motion_durn_sample (u8 *v_durn_sample_u8)
 This API is used to get the any motion Duration samples in the register 0x1C bit 4 and 5. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_any_motion_durn_sample (u8 v_durn_sample_u8)
 This API is used to set the any motion Duration samples in the register 0x1C bit 4 and 5. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_any_motion_enable_axis (u8 v_channel_u8, u8 *v_any_motion_axis_u8)
 This API is used to get the status of Any motion interrupt axis(X,Y,Z) enable channel. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_any_motion_enable_axis (u8 v_channel_u8, u8 v_any_motion_axis_u8)
 This API is used to set the status of Any motion interrupt axis(X,Y,Z) enable channel. More...
 
FIFO CONFIGURATION
BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_wm_enable (u8 *v_fifo_wm_enable_u8)
 This API is used to get the status of fifo water mark in the register 0x1E bit 7. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_fifo_wm_enable (u8 v_fifo_wm_enable_u8)
 This API is used to set the status of fifo water mark in the register 0x1E bit 7. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_tag (u8 *v_fifo_tag_u8)
 This API is used to get the status of FIFO tag in the register 0x3D bit 7. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_fifo_tag (u8 v_fifo_tag_u8)
 This API is used to set the status of FIFO tag in the register 0x3D bit 7. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_wm_level (u8 *v_fifo_wm_level_u8)
 This API is used to get Water Mark Level in the register 0x3D bit from 0 to 6. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_fifo_wm_level (u8 v_fifo_wm_level_u8)
 This API is used to set Water Mark Level in the register 0x3D bit from 0 to 6. More...
 
RESET INTERRUPT AND OFFSET CONFIGURATION
BMG160_RETURN_FUNCTION_TYPE bmg160_set_rst_intr (u8 v_rst_int_u8)
 This API is used to set the Interrupt Reset in the register 0x21 bit 7. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_offset_rst (u8 v_offset_rst_u8)
 This API is used to set the offset Reset in the register 0x21 bit 6. More...
 
LATCH CONFIGURATION
BMG160_RETURN_FUNCTION_TYPE bmg160_get_latch_stat (u8 *v_latch_stat_u8)
 This API is used to get the Latch Status in the register 0x21 bit 4. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_latch_stat (u8 v_latch_stat_u8)
 This API is used to set the Latch Status in the register 0x21 bit 4. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_latch_intr (u8 *v_latch_intr_u8)
 This API is used to get the Latch interrupt in the register 0x21 bit from 0 to 3. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_latch_intr (u8 v_latch_intr_u8)
 This API is used to set the Latch interrupt in the register 0x21 bit from 0 to 3. More...
 
HIGH RATE CONFIGURATION
BMG160_RETURN_FUNCTION_TYPE bmg160_get_highrate_hyst (u8 v_channel_u8, u8 *v_highrate_hyst_u8)
 This API is used to get the status of High Hysteresis of X,Y,Z axis in the registers 0x22,0x24 and 0x26. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_highrate_hyst (u8 v_channel_u8, u8 v_highrate_hyst_u8)
 This API is used to set the status of High Hysteresis of X,Y,Z axis in the registers 0x22,0x24 and 0x26. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_highrate_thres (u8 v_channel_u8, u8 *v_highrate_thres_u8)
 This API is used to get the value of High rate Threshold of X,Y,Z axis in the registers 0x22, 0x24 and 0x26. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_highrate_thres (u8 v_channel_u8, u8 v_highrate_thres_u8)
 This API is used to set the value of High rate Threshold of X,Y,Z axis in the registers 0x22, 0x24 and 0x26. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_highrate_enable_axis (u8 v_channel_u8, u8 *v_enable_u8)
 This API is used to get the status of High Enable Channel X,Y,Z in the registers 0x22, 0x24 and 0x26. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_highrate_enable_axis (u8 v_channel_u8, u8 v_enable_u8)
 This API is used to set the status of High Enable Channel X,Y,Z in the registers 0x22, 0x24 and 0x26. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_highrate_durn_axis (u8 v_channel_u8, u8 *v_highrate_durn_axis_u8)
 This API is used to get the status of High duration of X,Y,Z axis in the registers 0x23, 0x25 and 0x27. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_highrate_durn_axis (u8 v_channel_u8, u8 v_highrate_durn_axis_u8)
 This API is used to set the value of High duration of X,Y,Z axis in the registers 0x23, 0x25 and 0x27. More...
 
SLOW OFFSET CONFIGURATION
BMG160_RETURN_FUNCTION_TYPE bmg160_get_slow_offset_thres (u8 *v_offset_thres_u8)
 This API is used to get Slow Offset Threshold status in the register 0x31 bit 6 and 7. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_slow_offset_thres (u8 v_offset_thres_u8)
 This API is used to set Slow Offset Threshold status in the register 0x31 bit 6 and 7. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_slow_offset_durn (u8 *v_offset_durn_u8)
 This API is used to get Slow Offset duration status in the register 0x31 bit 4,5 and 6. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_slow_offset_durn (u8 v_offset_durn_u8)
 This API is used to set Slow Offset duration status in the register 0x31 bit 4,5 and 6. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_slow_offset_enable_axis (u8 v_channel_u8, u8 *v_slow_offset_u8)
 This API is used to get Slow Offset Enable channel X,Y,Z in the register 0x31. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_slow_offset_enable_axis (u8 v_channel_u8, u8 v_slow_offset_u8)
 This API is used to set Slow Offset Enable channel X,Y,Z in the register 0x31. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_offset_word_length (u8 v_channel_u8, u8 *v_offset_word_length_u8)
 This API is used to get Fast Offset WordLength and Auto Offset WordLength in the register 0x32. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_offset_word_length (u8 v_channel_u8, u8 v_offset_word_length_u8)
 This API is used to set Fast Offset WordLength and Auto Offset WordLength in the register 0x32. More...
 
OFFSET CONFIGURATION
BMG160_RETURN_FUNCTION_TYPE bmg160_enable_fast_offset (void)
 This API is used to enable fast offset in the register 0x32 bit 3 it is a write only register. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_fast_offset_enable_axis (u8 *v_fast_offset_u8)
 This API read the Fast offset enable v_axis_u8(X,Y and Z) in the register 0x32. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_fast_offset_enable_axis (u8 v_channel_u8, u8 v_fast_offset_u8)
 This API set the Fast offset enable v_axis_u8(X,Y and Z) in the register 0x32. More...
 
NVM CONFIGURATION
BMG160_RETURN_FUNCTION_TYPE bmg160_get_nvm_remain (u8 *v_nvm_remain_u8)
 This API is used to get the status of nvm program remain in the register 0x33 bit from 4 to 7. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_nvm_load (u8 v_nvm_load_u8)
 This API is used to set the status of nvm program remain in the register 0x33 bit from 4 to 7. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_nvm_rdy (u8 *v_nvm_rdy_u8)
 This API is used to get the status of nvm program in the register 0x33 bit 2. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_nvm_prog_trig (u8 nvm_prog_trig)
 This API is used to set the status of nvm ready in the register 0x33 bit 1. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_nvm_prog_mode (u8 *nvm_prog_mode)
 This API is used to get the status of nvm program mode in the register 0x33 bit 0. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_nvm_prog_mode (u8 nvm_prog_mode)
 This API is used to set the status of nvm program mode in the register 0x33 bit 0. More...
 
I2C CONFIGURATION
BMG160_RETURN_FUNCTION_TYPE bmg160_get_i2c_wdt (u8 v_channel_u8, u8 *v_i2c_wdt_u8)
 This API is used to get the status of i2c wdt select and enable in the register 0x34. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_i2c_wdt (u8 v_channel_u8, u8 v_i2c_wdt_u8)
 This API is used to set the status of i2c wdt select and enable in the register 0x34. More...
 
SPI CONFIGURATION
BMG160_RETURN_FUNCTION_TYPE bmg160_get_spi3 (u8 *v_spi3_u8)
 This API is used to get the status of spi3 in the register 0x34 bit 0. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_spi3 (u8 v_spi3_u8)
 This API is used to set the status of spi3 in the register 0x34 bit 0. More...
 
OFFSET FUNCTIONS
BMG160_RETURN_FUNCTION_TYPE bmg160_get_offset (u8 v_axis_u8, s16 *v_offset_s16)
 This API is used to get the value of offset X, Y and Z in the registers 0x36, 0x37, 0x38, 0x39 and 0x3A the offset is a 12bit value. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_offset (u8 v_axis_u8, s16 v_offset_s16)
 This API is used to set the value of offset X, Y and Z in the registers 0x36, 0x37, 0x38, 0x39 and 0x3A the offset is a 12bit value. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_gp (u8 v_param_u8, u8 *v_gp_u8)
 This API is used to get the status of general purpose register in the register 0x3A and 0x3B. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_gp (u8 v_param_u8, u8 v_gp_u8)
 This API is used to set the status of general purpose register in the register 0x3A and 0x3B. More...
 
FIFO READ AND CONFIGURATION
BMG160_RETURN_FUNCTION_TYPE bmg160_get_FIFO_data_reg (u8 *v_fifo_data_u8)
 Reads FIFO data from location 0x3F. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_stat_reg (u8 *v_fifo_stat_u8)
 this api is used to read the fifo status of frame_counter and overrun in the register 0x0E More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_frame_count (u8 *v_fifo_frame_count_u8)
 this API is used to get the fifo frame counter in the register 0x0E bit 0 to 6 More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_overrun (u8 *v_fifo_overrun_u8)
 this API is used to get the fifo over run in the register 0x0E bit 7 More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_mode (u8 *v_fifo_mode_u8)
 This API is used to get the status of fifo mode in the register 0x3E bit 6 and 7. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_fifo_mode (u8 v_fifo_mode_u8)
 This API is used to set the status of fifo mode in the register 0x3E bit 6 and 7. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_data_select (u8 *v_fifo_data_select_u8)
 This API is used to get the status of fifo data select in the register 0x3E bit 0 and 1. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_fifo_data_select (u8 v_fifo_data_select_u8)
 This API is used to set the status of fifo data select in the register 0x3E bit 0 and 1. More...
 
POWER MODE CONFIGURATION
BMG160_RETURN_FUNCTION_TYPE bmg160_get_power_mode (u8 *v_power_mode_u8)
 This API is used to get the operating modes of the sensor in the registers 0x11 and 0x12. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_power_mode (u8 v_power_mode_u8)
 This API is used to set the operating modes of the sensor in the registers 0x11 and 0x12. More...
 
SELF TEST CONFIGURATION
BMG160_RETURN_FUNCTION_TYPE bmg160_selftest (u8 *v_result_u8)
 This API is used to to do selftest to sensor sensor in the register 0x3C. More...
 
SLEEP AND AUTO SLEEP CONFIGURATION
BMG160_RETURN_FUNCTION_TYPE bmg160_get_auto_sleep_durn (u8 *v_durn_u8)
 This API is used to get the auto sleep duration in the register 0x12 bit 0 to 2. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_auto_sleep_durn (u8 v_durn_u8, u8 v_bw_u8)
 This API is used to set the auto sleep duration in the register 0x12 bit 0 to 2. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_get_sleep_durn (u8 *v_durn_u8)
 This API is used to get the sleep duration in the register 0x11 bit 1 to 3. More...
 
BMG160_RETURN_FUNCTION_TYPE bmg160_set_sleep_durn (u8 v_durn_u8)
 This API is used to set the sleep duration in the register 0x11 bit 1 to 3. More...
 

Macro Definition Documentation

#define BMG160_A_FOC_ADDR   (0x32)

Address of A_FOC Register

#define BMG160_ALL_DATA_FRAME_LENGTH   ((u8)6)
#define BMG160_ANY_MOTION_UNFILT_DATA   (3)

It refers BMG160 Any unfilt data

#define BMG160_AUTO_OFFSET   (1)

It refers BMG160 Auto Offset

#define BMG160_AUTO_OFFSET_WORD_LENGHTH   (0)

It refers BMG160 Auto Offset word length

#define BMG160_AUTO_OFFSET_WORD_LENGHTH__LEN   (2)
#define BMG160_AUTO_OFFSET_WORD_LENGHTH__MSK   (0xC0)
#define BMG160_AUTO_OFFSET_WORD_LENGHTH__POS   (6)

< Last 2 bits of INT OFF1 Registers

#define BMG160_AUTO_OFFSET_WORD_LENGHTH__REG   (BMG160_A_FOC_ADDR)
#define BMG160_BAA_MODE   (0)

It refers BMG160 BAA Mode Trim

#define BMG160_BGW_SOFT_RST_ADDR   (0x14)

Address of BGW Softreset Register

#define BMG160_BGW_SPI3_WDT_ADDR   (0x34)

Address of BGW SPI3,WDT Register

#define BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_ENABLE__LEN   (1)
#define BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_ENABLE__MSK   (0x04)
#define BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_ENABLE__POS   (2)

< 2nd bit of SPI3 WDT Registers

#define BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_ENABLE__REG   (BMG160_BGW_SPI3_WDT_ADDR)

1st bit of SPI3 WDT Registers

#define BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_SELECT__LEN   (1)
#define BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_SELECT__MSK   (0x02)
#define BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_SELECT__POS   (1)
#define BMG160_BGW_SPI3_WDT_ADDR_I2C_WDT_SELECT__REG   (BMG160_BGW_SPI3_WDT_ADDR)

0th bit of SPI3 WDT Registers

#define BMG160_BGW_SPI3_WDT_ADDR_SPI3__LEN   (1)
#define BMG160_BGW_SPI3_WDT_ADDR_SPI3__MSK   (0x01)
#define BMG160_BGW_SPI3_WDT_ADDR_SPI3__POS   (0)
#define BMG160_BGW_SPI3_WDT_ADDR_SPI3__REG   (BMG160_BGW_SPI3_WDT_ADDR)
#define BMG160_BIT_LENGTH_BW   ((u8)8)
#define BMG160_BIT_LENGTH_DURN   ((u8)8)
#define BMG160_BIT_LENGTH_FIFO   ((u8)2)
#define BMG160_BIT_LENGTH_FIFO_DATA_SELECT   ((u8)4)
#define BMG160_BIT_LENGTH_FIFO_MODE   ((u8)4)
#define BMG160_BIT_LENGTH_FIFO_TAG   ((u8)2)
#define BMG160_BIT_LENGTH_FIFO_WM   ((u8)2)
#define BMG160_BIT_LENGTH_HIGH_BW   ((u8)2)
#define BMG160_BIT_LENGTH_POWER_MODE   ((u8)5)
#define BMG160_BIT_LENGTH_RANGE   ((u8)5)
#define BMG160_BIT_LENGTH_SHADOW_DIS   ((u8)2)
#define BMG160_BIT_MASK_MODE_LPM1   ((u8)4)
#define BMG160_BMA_MODE   (1)

It refers BMG160 BMA Mode Trim

#define BMG160_BRD_FUNC_PTR
Value:
s8 (*burst_read)\
(u8, u8, u8 *, s32)
unsigned char u8
Definition: bmg160.h:191
signed int s32
Definition: bmg160.h:187
signed char s8
If your machine support 16 bit define the MACHINE_16_BIT.
Definition: bmg160.h:185
unsigned char u8
Definition: bma2x2.h:192
#define BMG160_BURST_RD_PARAM_ORDER
Value:
(device_addr, register_addr,\
register_data)
#define BMG160_BURST_RD_PARAM_TYPES
Value:
u8, u8 *, s32
unsigned char u8
Definition: bmg160.h:191
unsigned char u8
Definition: bma2x2.h:192
signed int s32
Definition: bma2x2.h:188
#define BMG160_BURST_RD_RETURN_TYPE   s8
#define BMG160_BURST_READ_FUNC (   device_addr,
  register_addr,
  register_data,
  rd_len 
)
Value:
burst_read(device_addr, \
register_addr, register_data, rd_len)
#define BMG160_BUS_RD_PARAM_ORDER
Value:
(device_addr, register_addr,\
register_data)
#define BMG160_BUS_RD_PARAM_TYPES
Value:
u8 *, u8
unsigned char u8
Definition: bmg160.h:191
unsigned char u8
Definition: bma2x2.h:192
#define BMG160_BUS_RD_RETURN_TYPE   s8
#define BMG160_BUS_READ_FUNC (   device_addr,
  register_addr,
  register_data,
  rd_len 
)
Value:
bus_read(device_addr, register_addr,\
register_data, rd_len)
#define BMG160_BUS_WR_PARAM_ORDER (   device_addr,
  register_addr,
  register_data,
  wr_len 
)
#define BMG160_BUS_WR_PARAM_TYPES
Value:
u8 *, u8
unsigned char u8
Definition: bmg160.h:191
unsigned char u8
Definition: bma2x2.h:192
#define BMG160_BUS_WR_RETURN_TYPE   s8
Note
This includes types of parameters. This example shows the configuration for an SPI bus link.

If your communication function looks like this:

write_my_bus_xy(u8 device_addr, u8 register_addr, u8 * data, u8 length);

The BMG160_WR_FUNC_PTR would equal:

BMG160_WR_FUNC_PTR s8 (* bus_write)(u8, u8, u8 *, u8)

Parameters can be mixed as needed refer to the refer BMG160_BUS_WRITE_FUNC macro.

#define BMG160_BUS_WRITE_FUNC (   device_addr,
  register_addr,
  register_data,
  wr_len 
)
Value:
bus_write(device_addr, register_addr,\
register_data, wr_len)

link macro between API function calls and bus read function

Note
The bus write function can change since this is a system dependant issue.

If the bus_read parameter calling order is like: reg_addr, reg_data, wr_len it would be as it is here.

If the parameters are differently ordered or your communication function like I2C need to know the device address, you can change this macro accordingly.

BMG160_BUS_READ_FUNC(dev_addr, reg_addr, reg_data, wr_len)\ bus_read(dev_addr, reg_addr, reg_data, wr_len)

This macro lets all API functions call YOUR communication routine in a way that equals your definition in the refer BMG160_WR_FUNC_PTR definition.

Note
: this macro also includes the "MSB='1' for reading BMG160 addresses.
#define BMG160_BW_116_HZ   (0x02)
#define BMG160_BW_12_HZ   (0x05)
#define BMG160_BW_230_HZ   (0x01)
#define BMG160_BW_23_HZ   (0x04)
#define BMG160_BW_32_HZ   (0x07)
#define BMG160_BW_47_HZ   (0x03)
#define BMG160_BW_500_HZ   (0x01)
#define BMG160_BW_64_HZ   (0x06)
#define BMG160_BW_ADDR   (0x10)

Address of Bandwidth Register

#define BMG160_BW_ADDR__LEN   (3)
#define BMG160_BW_ADDR__MSK   (0x07)
#define BMG160_BW_ADDR__POS   (0)

< First (3) bits of Bandwidth Registers

#define BMG160_BW_ADDR__REG   (BMG160_BW_ADDR)

5th and 7th bit of LPM1 Register

#define BMG160_CHIP_ID_ADDR   (0x00)

Address of Chip ID Register

#define BMG160_CONST_UNFILT_DATA   (2)

It refers BMG160 Const unfilt data

#define BMG160_D_TAP   (1)

It refers BMG160 Double Tap

#define BMG160_DATA_FRAME_INTR0_BYTE   (7)
#define BMG160_DATA_FRAME_INTR1_BYTE   (8)
#define BMG160_DATA_FRAME_INTR2_BYTE   (9)
#define BMG160_DATA_FRAME_INTR3_BYTE   (10)
#define BMG160_DATA_FRAME_INTR4_BYTE   (11)
#define BMG160_DATA_FRAME_X_LSB_BYTE   (0)
#define BMG160_DATA_FRAME_X_MSB_BYTE   (1)
#define BMG160_DATA_FRAME_Y_LSB_BYTE   (2)
#define BMG160_DATA_FRAME_Y_MSB_BYTE   (3)
#define BMG160_DATA_FRAME_Z_LSB_BYTE   (4)
#define BMG160_DATA_FRAME_Z_MSB_BYTE   (5)
#define BMG160_DELAY_FUNC (   delay_in_msec)    delay_func(delay_in_msec)
#define BMG160_DELAY_RETURN_TYPE   void
#define BMG160_DISABLE   (0)

It refers BMG160 disable

#define BMG160_DRIVE_OFFSET_N   (1)

It refers BMG160 Drive Offset N

#define BMG160_DRIVE_OFFSET_P   (0)

It refers BMG160 Drive Offset P

#define BMG160_ENABLE   (1)

It refers BMG160 enable

#define BMG160_EXT_MODE   (0)

It refers BMG160 Ext Mode

#define BMG160_EXT_PAGE   (1)

It refers BMG160 Ext page

#define BMG160_FAST_CMD   (1)

It refers BMG160 Fast Command

#define BMG160_FAST_OFFSET   (2)

It refers BMG160 Fast Offset

#define BMG160_FAST_OFFSET_ENABLE__LEN   (1)
#define BMG160_FAST_OFFSET_ENABLE__MSK   (0x08)
#define BMG160_FAST_OFFSET_ENABLE__POS   (3)
#define BMG160_FAST_OFFSET_ENABLE__REG   (BMG160_A_FOC_ADDR)

2nd bit of INT OFF1 Registers

#define BMG160_FAST_OFFSET_ENABLE_X__LEN   (1)
#define BMG160_FAST_OFFSET_ENABLE_X__MSK   (0x01)
#define BMG160_FAST_OFFSET_ENABLE_X__POS   (0)
#define BMG160_FAST_OFFSET_ENABLE_X__REG   (BMG160_A_FOC_ADDR)

0 to (2) bits of INT OFF1 Registers

#define BMG160_FAST_OFFSET_ENABLE_XYZ__LEN   (3)
#define BMG160_FAST_OFFSET_ENABLE_XYZ__MSK   (0x07)
#define BMG160_FAST_OFFSET_ENABLE_XYZ__POS   (0)
#define BMG160_FAST_OFFSET_ENABLE_XYZ__REG   (BMG160_A_FOC_ADDR)
#define BMG160_FAST_OFFSET_ENABLE_Y__LEN   (1)
#define BMG160_FAST_OFFSET_ENABLE_Y__MSK   (0x02)
#define BMG160_FAST_OFFSET_ENABLE_Y__POS   (1)
#define BMG160_FAST_OFFSET_ENABLE_Y__REG   (BMG160_A_FOC_ADDR)

0th bit of INT OFF1 Registers

#define BMG160_FAST_OFFSET_ENABLE_Z__LEN   (1)
#define BMG160_FAST_OFFSET_ENABLE_Z__MSK   (0x04)
#define BMG160_FAST_OFFSET_ENABLE_Z__POS   (2)
#define BMG160_FAST_OFFSET_ENABLE_Z__REG   (BMG160_A_FOC_ADDR)

1st bit of INT OFF1 Registers

#define BMG160_FAST_OFFSET_WORD_LENGHTH   (1)

It refers BMG160 Fast Offset word length

#define BMG160_FAST_OFFSET_WORD_LENGHTH__LEN   (2)
#define BMG160_FAST_OFFSET_WORD_LENGHTH__MSK   (0x30)
#define BMG160_FAST_OFFSET_WORD_LENGHTH__POS   (4)

< 2 bits of INT OFF1 Registers

#define BMG160_FAST_OFFSET_WORD_LENGHTH__REG   (BMG160_A_FOC_ADDR)

3nd bit of INT OFF1 Registers

#define BMG160_FIFO_CGF0_ADDR   (0x3E)

Address of FIFO CGF1 Register

#define BMG160_FIFO_CGF0_ADDR_DATA_SELECT__LEN   (2)
#define BMG160_FIFO_CGF0_ADDR_DATA_SELECT__MSK   (0x03)
#define BMG160_FIFO_CGF0_ADDR_DATA_SELECT__POS   (0)
#define BMG160_FIFO_CGF0_ADDR_DATA_SELECT__REG   (BMG160_FIFO_CGF0_ADDR)
#define BMG160_FIFO_CGF0_ADDR_MODE__LEN   (2)
#define BMG160_FIFO_CGF0_ADDR_MODE__MSK   (0xC0)
#define BMG160_FIFO_CGF0_ADDR_MODE__POS   (6)
#define BMG160_FIFO_CGF0_ADDR_MODE__REG   (BMG160_FIFO_CGF0_ADDR)

First 2 bits of FIFO CGF0 Addr Registers

#define BMG160_FIFO_CGF1_ADDR   (0x3D)

Address of FIFO CGF0 Register

#define BMG160_FIFO_CGF1_ADDR_TAG__LEN   (1)
#define BMG160_FIFO_CGF1_ADDR_TAG__MSK   (0x80)
#define BMG160_FIFO_CGF1_ADDR_TAG__POS   (7)

< 7th bit of FIFO CGF1 Registers

#define BMG160_FIFO_CGF1_ADDR_TAG__REG   (BMG160_FIFO_CGF1_ADDR)

First 7 bits of FIFO CGF1 Registers

#define BMG160_FIFO_CGF1_ADDR_WML__LEN   (7)
#define BMG160_FIFO_CGF1_ADDR_WML__MSK   (0x7F)
#define BMG160_FIFO_CGF1_ADDR_WML__POS   (0)
#define BMG160_FIFO_CGF1_ADDR_WML__REG   (BMG160_FIFO_CGF1_ADDR)

Last 2 bits of FIFO CGF0 Addr Registers

#define BMG160_FIFO_DATA_ADDR   (0x3F)

Address of FIFO Data Register

#define BMG160_FIFO_STAT_ADDR   (0x0E)

Address of FIFO status Register

#define BMG160_FIFO_STAT_FRAME_COUNTER__LEN   (7)
#define BMG160_FIFO_STAT_FRAME_COUNTER__MSK   (0x7F)
#define BMG160_FIFO_STAT_FRAME_COUNTER__POS   (0)

< First (7) bits of FIFO status Register

#define BMG160_FIFO_STAT_FRAME_COUNTER__REG   (BMG160_FIFO_STAT_ADDR)
#define BMG160_FIFO_STAT_OVERRUN__LEN   (1)
#define BMG160_FIFO_STAT_OVERRUN__MSK   (0x80)
#define BMG160_FIFO_STAT_OVERRUN__POS   (7)

< 7th bit of FIFO status Register

#define BMG160_FIFO_STAT_OVERRUN__REG   (BMG160_FIFO_STAT_ADDR)
#define BMG160_FIFO_WM_LENGTH   ((u8)128)
#define BMG160_GEN_READ_WRITE_DATA_LENGTH   ((u8)1)
#define BMG160_GET_BITSLICE (   regvar,
  bitname 
)    ((regvar & bitname##__MSK) >> bitname##__POS)
#define BMG160_GP0   (0)

It refers BMG160 GP0

#define BMG160_GP1   (1)

It refers BMG160 GP1

#define BMG160_HIGH_BW__LEN   (1)
#define BMG160_HIGH_BW__MSK   (0x80)
#define BMG160_HIGH_BW__POS   (7)

< 7th bit of HIGH_BW Register

#define BMG160_HIGH_BW__REG   (BMG160_HIGH_BW_ADDR)

6th bit of HIGH_BW Register

#define BMG160_HIGH_BW_ADDR   (0x13)

Address of Rate HIGH_BW Register

#define BMG160_HIGHRATE_DURN_X_ADDR   (0x23)

Address of High Dur x Address register

#define BMG160_HIGHRATE_DURN_Y_ADDR   (0x25)

Address of High Dur y Address register

#define BMG160_HIGHRATE_DURN_Z_ADDR   (0x27)

Address of High Dur z Address register

#define BMG160_HIGHRATE_ENABLE_X__LEN   (1)
#define BMG160_HIGHRATE_ENABLE_X__MSK   (0x01)
#define BMG160_HIGHRATE_ENABLE_X__POS   (0)
#define BMG160_HIGHRATE_ENABLE_X__REG   (BMG160_HIGHRATE_THRES_X_ADDR)

Last (2) bits of HIGHRATE_THRES_Y Registers

#define BMG160_HIGHRATE_ENABLE_Y__LEN   (1)
#define BMG160_HIGHRATE_ENABLE_Y__MSK   (0x01)
#define BMG160_HIGHRATE_ENABLE_Y__POS   (0)
#define BMG160_HIGHRATE_ENABLE_Y__REG   (BMG160_HIGHRATE_THRES_Y_ADDR)

Last (2) bits of HIGHRATE_THRES_Z Registers

#define BMG160_HIGHRATE_ENABLE_Z__LEN   (1)
#define BMG160_HIGHRATE_ENABLE_Z__MSK   (0x01)
#define BMG160_HIGHRATE_ENABLE_Z__POS   (0)
#define BMG160_HIGHRATE_ENABLE_Z__REG   (BMG160_HIGHRATE_THRES_Z_ADDR)
#define BMG160_HIGHRATE_HYST_X__LEN   (2)
#define BMG160_HIGHRATE_HYST_X__MSK   (0xC0)
#define BMG160_HIGHRATE_HYST_X__POS   (6)

< Last (2) bits of HIGHRATE_THRES_X Registers

#define BMG160_HIGHRATE_HYST_X__REG   (BMG160_HIGHRATE_THRES_X_ADDR)

(5) bits of HIGHRATE_THRES_X Registers

#define BMG160_HIGHRATE_HYST_Y__LEN   (2)
#define BMG160_HIGHRATE_HYST_Y__MSK   (0xC0)
#define BMG160_HIGHRATE_HYST_Y__POS   (6)
#define BMG160_HIGHRATE_HYST_Y__REG   (BMG160_HIGHRATE_THRES_Y_ADDR)

(5) bits of HIGHRATE_THRES_Y Registers

#define BMG160_HIGHRATE_HYST_Z__LEN   (2)
#define BMG160_HIGHRATE_HYST_Z__MSK   (0xC0)
#define BMG160_HIGHRATE_HYST_Z__POS   (6)
#define BMG160_HIGHRATE_HYST_Z__REG   (BMG160_HIGHRATE_THRES_Z_ADDR)

(5) bits of HIGHRATE_THRES_Z Registers

#define BMG160_HIGHRATE_SPEED   (1)

It refers BMG160 High Speed Oscillator

#define BMG160_HIGHRATE_THRES_X__LEN   (5)
#define BMG160_HIGHRATE_THRES_X__MSK   (0x3E)
#define BMG160_HIGHRATE_THRES_X__POS   (1)
#define BMG160_HIGHRATE_THRES_X__REG   (BMG160_HIGHRATE_THRES_X_ADDR)

0th bit of HIGHRATE_THRES_X Registers

#define BMG160_HIGHRATE_THRES_X_ADDR   (0x22)

Address of High Th x Address register

#define BMG160_HIGHRATE_THRES_Y__LEN   (5)
#define BMG160_HIGHRATE_THRES_Y__MSK   (0x3E)
#define BMG160_HIGHRATE_THRES_Y__POS   (1)
#define BMG160_HIGHRATE_THRES_Y__REG   (BMG160_HIGHRATE_THRES_Y_ADDR)

0th bit of HIGHRATE_THRES_Y Registers

#define BMG160_HIGHRATE_THRES_Y_ADDR   (0x24)

Address of High Th y Address register

#define BMG160_HIGHRATE_THRES_Z__LEN   (5)
#define BMG160_HIGHRATE_THRES_Z__MSK   (0x3E)
#define BMG160_HIGHRATE_THRES_Z__POS   (1)
#define BMG160_HIGHRATE_THRES_Z__REG   (BMG160_HIGHRATE_THRES_Z_ADDR)

0th bit of HIGHRATE_THRES_Z Registers

#define BMG160_HIGHRATE_THRES_Z_ADDR   (0x26)

Address of High Th z Address register

#define BMG160_HIGHRATE_UNFILT_DATA   (1)

It refers BMG160 High unfilt data

#define BMG160_I2C_ADDR1   (0x68)
#define BMG160_I2C_ADDR2   (0x69)
#define BMG160_I2C_WDT_ENABLE   (0)

It refers BMG160 I2C WDT En

#define BMG160_I2C_WDT_SELECT   (1)

It refers BMG160 I2C WDT Sel

#define BMG160_IBIAS_DRIVE_TRIM   (0)

It refers BMG160 IBIAS Drive Trim

#define BMG160_IBIAS_RATE_TRIM   (1)

It refers BMG160 IBIAS Rate Trim

#define BMG160_INIT_VALUE   ((u8)0)
#define BMG160_INTR0_STAT   (0)
#define BMG160_INTR1   (0)

It refers BMG160 INT1

#define BMG160_INTR1_DATA   (0)

It refers BMG160 Int1 Data

#define BMG160_INTR1_STAT   (1)
#define BMG160_INTR2   (1)

It refers BMG160 INT2

#define BMG160_INTR2_DATA   (1)

It refers BMG160 Int2 Data

#define BMG160_INTR2_STAT   (2)
#define BMG160_INTR3_STAT   (3)
#define BMG160_INTR4_STAT   (4)
#define BMG160_INTR_4_ADDR   (0x1E)

Address of Interrupt register

#define BMG160_INTR_4_FIFO_WM_ENABLE__LEN   (1)
#define BMG160_INTR_4_FIFO_WM_ENABLE__MSK   (0x80)
#define BMG160_INTR_4_FIFO_WM_ENABLE__POS   (7)

< Last bit of INT Registers

#define BMG160_INTR_4_FIFO_WM_ENABLE__REG   (BMG160_INTR_4_ADDR)
#define BMG160_INTR_ENABLE0_ADDR   (0x15)

Address of Interrupt Enable

#define BMG160_INTR_ENABLE0_AUTO_OFFSET__LEN   (1)
#define BMG160_INTR_ENABLE0_AUTO_OFFSET__MSK   (0x04)
#define BMG160_INTR_ENABLE0_AUTO_OFFSET__POS   (2)

< 2nd bit of Interrupt Enable Registers

#define BMG160_INTR_ENABLE0_AUTO_OFFSET__REG   (BMG160_INTR_ENABLE0_ADDR)
#define BMG160_INTR_ENABLE0_DATA__LEN   (1)
#define BMG160_INTR_ENABLE0_DATA__MSK   (0x80)
#define BMG160_INTR_ENABLE0_DATA__POS   (7)

< 7th bit of Interrupt Enable Registers

#define BMG160_INTR_ENABLE0_DATA__REG   (BMG160_INTR_ENABLE0_ADDR)
#define BMG160_INTR_ENABLE0_FIFO__LEN   (1)
#define BMG160_INTR_ENABLE0_FIFO__MSK   (0x40)
#define BMG160_INTR_ENABLE0_FIFO__POS   (6)

< 6th bit of Interrupt Enable Registers

#define BMG160_INTR_ENABLE0_FIFO__REG   (BMG160_INTR_ENABLE0_ADDR)
#define BMG160_INTR_ENABLE1_ADDR   (0x16)

Address of Interrupt Enable

#define BMG160_INTR_ENABLE1_IT1_LEVEL__LEN   (1)
#define BMG160_INTR_ENABLE1_IT1_LEVEL__MSK   (0x01)
#define BMG160_INTR_ENABLE1_IT1_LEVEL__POS   (0)

< 0th bit of Interrupt Enable Registers

#define BMG160_INTR_ENABLE1_IT1_LEVEL__REG   (BMG160_INTR_ENABLE1_ADDR)
#define BMG160_INTR_ENABLE1_IT1_OUTPUT_TYPE__LEN   (1)
#define BMG160_INTR_ENABLE1_IT1_OUTPUT_TYPE__MSK   (0x02)
#define BMG160_INTR_ENABLE1_IT1_OUTPUT_TYPE__POS   (1)

< 1st bit of Interrupt Enable Registers

#define BMG160_INTR_ENABLE1_IT1_OUTPUT_TYPE__REG   (BMG160_INTR_ENABLE1_ADDR)
#define BMG160_INTR_ENABLE1_IT2_LEVEL__LEN   (1)
#define BMG160_INTR_ENABLE1_IT2_LEVEL__MSK   (0x04)
#define BMG160_INTR_ENABLE1_IT2_LEVEL__POS   (2)

< 2nd bit of Interrupt Enable Registers

#define BMG160_INTR_ENABLE1_IT2_LEVEL__REG   (BMG160_INTR_ENABLE1_ADDR)
#define BMG160_INTR_ENABLE1_IT2_OUTPUT_TYPE__LEN   (1)
#define BMG160_INTR_ENABLE1_IT2_OUTPUT_TYPE__MSK   (0x08)
#define BMG160_INTR_ENABLE1_IT2_OUTPUT_TYPE__POS   (3)

< 3rd bit of Interrupt Enable Registers

#define BMG160_INTR_ENABLE1_IT2_OUTPUT_TYPE__REG   (BMG160_INTR_ENABLE1_ADDR)
#define BMG160_INTR_MAP_ONE_ADDR   (0x18)

Address of Interrupt MAP

#define BMG160_INTR_MAP_TWO_ADDR   (0x19)

Address of Interrupt MAP

#define BMG160_INTR_MAP_TWO_INTR2_ANY_MOTION__LEN   (1)
#define BMG160_INTR_MAP_TWO_INTR2_ANY_MOTION__MSK   (0x02)
#define BMG160_INTR_MAP_TWO_INTR2_ANY_MOTION__POS   (1)

< 1st bit of Interrupt Map Registers

#define BMG160_INTR_MAP_TWO_INTR2_ANY_MOTION__REG   (BMG160_INTR_MAP_TWO_ADDR)
#define BMG160_INTR_MAP_TWO_INTR2_HIGHRATE__LEN   (1)
#define BMG160_INTR_MAP_TWO_INTR2_HIGHRATE__MSK   (0x08)
#define BMG160_INTR_MAP_TWO_INTR2_HIGHRATE__POS   (3)

< 3rd bit of Interrupt Map Registers

#define BMG160_INTR_MAP_TWO_INTR2_HIGHRATE__REG   (BMG160_INTR_MAP_TWO_ADDR)
#define BMG160_INTR_MAP_ZERO_ADDR   (0x17)

Address of Interrupt MAP

#define BMG160_INTR_MAP_ZERO_INTR1_ANY_MOTION__LEN   (1)
#define BMG160_INTR_MAP_ZERO_INTR1_ANY_MOTION__MSK   (0x02)
#define BMG160_INTR_MAP_ZERO_INTR1_ANY_MOTION__POS   (1)

< 1st bit of Interrupt MAP Registers

#define BMG160_INTR_MAP_ZERO_INTR1_ANY_MOTION__REG   (BMG160_INTR_MAP_ZERO_ADDR)

7th bit of MAP_1Registers

#define BMG160_INTR_MAP_ZERO_INTR1_HIGHRATE__LEN   (1)
#define BMG160_INTR_MAP_ZERO_INTR1_HIGHRATE__MSK   (0x08)
#define BMG160_INTR_MAP_ZERO_INTR1_HIGHRATE__POS   (3)

< 3rd bit of Interrupt MAP (0) Registers

#define BMG160_INTR_MAP_ZERO_INTR1_HIGHRATE__REG   (BMG160_INTR_MAP_ZERO_ADDR)
#define BMG160_INTR_ONE_ADDR   (0x1B)

Address of Interrupt register

#define BMG160_INTR_ONE_ADDR_ANY_MOTION_THRES__LEN   (7)
#define BMG160_INTR_ONE_ADDR_ANY_MOTION_THRES__MSK   (0x7F)
#define BMG160_INTR_ONE_ADDR_ANY_MOTION_THRES__POS   (0)

< First (7) bits of INT_1 Registers

#define BMG160_INTR_ONE_ADDR_ANY_MOTION_THRES__REG   (BMG160_INTR_ONE_ADDR)
#define BMG160_INTR_ONE_ADDR_FAST_OFFSET_UNFILT__LEN   (1)
#define BMG160_INTR_ONE_ADDR_FAST_OFFSET_UNFILT__MSK   (0x80)
#define BMG160_INTR_ONE_ADDR_FAST_OFFSET_UNFILT__POS   (7)

< 7th bit of INT_1 Registers

#define BMG160_INTR_ONE_ADDR_FAST_OFFSET_UNFILT__REG   (BMG160_INTR_ONE_ADDR)
#define BMG160_INTR_STAT0_ADDR   (0x09)

Address of Interrupt status Register

#define BMG160_INTR_STAT0_ANY_MOTION_INTR__LEN   (1)
#define BMG160_INTR_STAT0_ANY_MOTION_INTR__MSK   (0x04)
#define BMG160_INTR_STAT0_ANY_MOTION_INTR__POS   (2)

< 2th bit of Interrupt status register

#define BMG160_INTR_STAT0_ANY_MOTION_INTR__REG   (BMG160_INTR_STAT0_ADDR)

1st bit of Interrupt status register

#define BMG160_INTR_STAT0_HIGHRATE_INTR__LEN   (1)
#define BMG160_INTR_STAT0_HIGHRATE_INTR__MSK   (0x02)
#define BMG160_INTR_STAT0_HIGHRATE_INTR__POS   (1)
#define BMG160_INTR_STAT0_HIGHRATE_INTR__REG   (BMG160_INTR_STAT0_ADDR)

1st and 2nd bit of Interrupt status register

#define BMG160_INTR_STAT1_ADDR   (0x0A)

Address of Interrupt status Register

#define BMG160_INTR_STAT1_AUTO_OFFSET_INTR__LEN   (1)
#define BMG160_INTR_STAT1_AUTO_OFFSET_INTR__MSK   (0x40)
#define BMG160_INTR_STAT1_AUTO_OFFSET_INTR__POS   (6)

< 6th bit of Interrupt status register

#define BMG160_INTR_STAT1_AUTO_OFFSET_INTR__REG   (BMG160_INTR_STAT1_ADDR)

5th bit of Interrupt status register

#define BMG160_INTR_STAT1_DATA_INTR__LEN   (1)
#define BMG160_INTR_STAT1_DATA_INTR__MSK   (0x80)
#define BMG160_INTR_STAT1_DATA_INTR__POS   (7)

< 7th bit of Interrupt status register

#define BMG160_INTR_STAT1_DATA_INTR__REG   (BMG160_INTR_STAT1_ADDR)
#define BMG160_INTR_STAT1_FAST_OFFSET_INTR__LEN   (1)
#define BMG160_INTR_STAT1_FAST_OFFSET_INTR__MSK   (0x20)
#define BMG160_INTR_STAT1_FAST_OFFSET_INTR__POS   (5)
#define BMG160_INTR_STAT1_FAST_OFFSET_INTR__REG   (BMG160_INTR_STAT1_ADDR)
#define BMG160_INTR_STAT1_FIFO_INTR__LEN   (1)
#define BMG160_INTR_STAT1_FIFO_INTR__MSK   (0x10)
#define BMG160_INTR_STAT1_FIFO_INTR__POS   (4)

< 4th bit of Interrupt status register

#define BMG160_INTR_STAT1_FIFO_INTR__REG   (BMG160_INTR_STAT1_ADDR)

MSB (4) bits of Interrupt status1 register

#define BMG160_INTR_STAT2_ADDR   (0x0B)

Address of Interrupt status Register

#define BMG160_INTR_STAT2_ANY_MOTION_FIRSTX_INTR__LEN   (1)
#define BMG160_INTR_STAT2_ANY_MOTION_FIRSTX_INTR__MSK   (0x01)
#define BMG160_INTR_STAT2_ANY_MOTION_FIRSTX_INTR__POS   (0)
#define BMG160_INTR_STAT2_ANY_MOTION_FIRSTX_INTR__REG   (BMG160_INTR_STAT2_ADDR)

(4) bits of Interrupt status register

#define BMG160_INTR_STAT2_ANY_MOTION_FIRSTY_INTR__LEN   (1)
#define BMG160_INTR_STAT2_ANY_MOTION_FIRSTY_INTR__MSK   (0x02)
#define BMG160_INTR_STAT2_ANY_MOTION_FIRSTY_INTR__POS   (1)
#define BMG160_INTR_STAT2_ANY_MOTION_FIRSTY_INTR__REG   (BMG160_INTR_STAT2_ADDR)

0th bit of Interrupt status register

#define BMG160_INTR_STAT2_ANY_MOTION_FIRSTZ_INTR__LEN   (1)
#define BMG160_INTR_STAT2_ANY_MOTION_FIRSTZ_INTR__MSK   (0x04)
#define BMG160_INTR_STAT2_ANY_MOTION_FIRSTZ_INTR__POS   (2)
#define BMG160_INTR_STAT2_ANY_MOTION_FIRSTZ_INTR__REG   (BMG160_INTR_STAT2_ADDR)

1st bit of Interrupt status register

#define BMG160_INTR_STAT2_ANY_MOTION_SIGN_INTR__LEN   (1)
#define BMG160_INTR_STAT2_ANY_MOTION_SIGN_INTR__MSK   (0x08)
#define BMG160_INTR_STAT2_ANY_MOTION_SIGN_INTR__POS   (3)

< 3th bit of Interrupt status register

#define BMG160_INTR_STAT2_ANY_MOTION_SIGN_INTR__REG   (BMG160_INTR_STAT2_ADDR)

2th bit of Interrupt status register

#define BMG160_INTR_STAT3_ADDR   (0x0C)

Address of Interrupt status Register

#define BMG160_INTR_STAT3_HIGHRATE_FIRSTX_INTR__LEN   (1)
#define BMG160_INTR_STAT3_HIGHRATE_FIRSTX_INTR__MSK   (0x01)
#define BMG160_INTR_STAT3_HIGHRATE_FIRSTX_INTR__POS   (0)
#define BMG160_INTR_STAT3_HIGHRATE_FIRSTX_INTR__REG   (BMG160_INTR_STAT3_ADDR)

LSB (4) bits of Interrupt status register

#define BMG160_INTR_STAT3_HIGHRATE_FIRSTY_INTR__LEN   (1)
#define BMG160_INTR_STAT3_HIGHRATE_FIRSTY_INTR__MSK   (0x02)
#define BMG160_INTR_STAT3_HIGHRATE_FIRSTY_INTR__POS   (1)
#define BMG160_INTR_STAT3_HIGHRATE_FIRSTY_INTR__REG   (BMG160_INTR_STAT3_ADDR)

0th bit of Interrupt status register

#define BMG160_INTR_STAT3_HIGHRATE_FIRSTZ_INTR__LEN   (1)
#define BMG160_INTR_STAT3_HIGHRATE_FIRSTZ_INTR__MSK   (0x04)
#define BMG160_INTR_STAT3_HIGHRATE_FIRSTZ_INTR__POS   (2)
#define BMG160_INTR_STAT3_HIGHRATE_FIRSTZ_INTR__REG   (BMG160_INTR_STAT3_ADDR)

1st bit of Interrupt status register

#define BMG160_INTR_STAT3_HIGHRATE_SIGN_INTR__LEN   (1)
#define BMG160_INTR_STAT3_HIGHRATE_SIGN_INTR__MSK   (0x08)
#define BMG160_INTR_STAT3_HIGHRATE_SIGN_INTR__POS   (3)

< 3th bit of Interrupt status register

#define BMG160_INTR_STAT3_HIGHRATE_SIGN_INTR__REG   (BMG160_INTR_STAT3_ADDR)

2th bit of Interrupt status register

#define BMG160_INTR_STAT_ONE__LEN   (4)
#define BMG160_INTR_STAT_ONE__MSK   (0xF0)
#define BMG160_INTR_STAT_ONE__POS   (4)
#define BMG160_INTR_STAT_ONE__REG   (BMG160_INTR_STAT1_ADDR)
#define BMG160_INTR_STAT_THREE__LEN   (4)
#define BMG160_INTR_STAT_THREE__MSK   (0x0F)
#define BMG160_INTR_STAT_THREE__POS   (0)
#define BMG160_INTR_STAT_THREE__REG   (BMG160_INTR_STAT3_ADDR)
#define BMG160_INTR_STAT_TWO__LEN   (4)
#define BMG160_INTR_STAT_TWO__MSK   (0x0F)
#define BMG160_INTR_STAT_TWO__POS   (0)
#define BMG160_INTR_STAT_TWO__REG   (BMG160_INTR_STAT2_ADDR)
#define BMG160_INTR_STAT_ZERO__LEN   (2)
#define BMG160_INTR_STAT_ZERO__MSK   (0x06)
#define BMG160_INTR_STAT_ZERO__POS   (1)
#define BMG160_INTR_STAT_ZERO__REG   (BMG160_INTR_STAT0_ADDR)
#define BMG160_INTR_TWO_ADDR   (0x1C)

Address of Interrupt register

#define BMG160_INTR_TWO_ADDR_ANY_MOTION_DURN_SAMPLE__LEN   (2)
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_DURN_SAMPLE__MSK   (0x30)
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_DURN_SAMPLE__POS   (4)

< 4th & 5th bit of INT 2Registers

#define BMG160_INTR_TWO_ADDR_ANY_MOTION_DURN_SAMPLE__REG   (BMG160_INTR_TWO_ADDR)
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_ENABLE_X__LEN   (1)
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_ENABLE_X__MSK   (0x01)
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_ENABLE_X__POS   (0)
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_ENABLE_X__REG   (BMG160_INTR_TWO_ADDR)
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_ENABLE_Y__LEN   (1)
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_ENABLE_Y__MSK   (0x02)
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_ENABLE_Y__POS   (1)
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_ENABLE_Y__REG   (BMG160_INTR_TWO_ADDR)

0th bit of INT 2Registers

#define BMG160_INTR_TWO_ADDR_ANY_MOTION_ENABLE_Z__LEN   (1)
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_ENABLE_Z__MSK   (0x04)
#define BMG160_INTR_TWO_ADDR_ANY_MOTION_ENABLE_Z__POS   (2)

< 2nd bit of INT 2Registers

#define BMG160_INTR_TWO_ADDR_ANY_MOTION_ENABLE_Z__REG   (BMG160_INTR_TWO_ADDR)

1st bit of INT 2Registers

#define BMG160_INTR_TWO_ADDR_AWAKE_DURN__LEN   (2)
#define BMG160_INTR_TWO_ADDR_AWAKE_DURN__MSK   (0xC0)
#define BMG160_INTR_TWO_ADDR_AWAKE_DURN__POS   (6)

< Last (2) bits of INT 2Registers

#define BMG160_INTR_TWO_ADDR_AWAKE_DURN__REG   (BMG160_INTR_TWO_ADDR)
#define BMG160_INTR_ZERO_ADDR   (0x1A)

Address of Interrupt register

#define BMG160_INTR_ZERO_ADDR_ANY_MOTION_UNFILT_DATA__LEN   (1)
#define BMG160_INTR_ZERO_ADDR_ANY_MOTION_UNFILT_DATA__MSK   (0x02)
#define BMG160_INTR_ZERO_ADDR_ANY_MOTION_UNFILT_DATA__POS   (1)

< 1st bit of Interrupt (0) Registers

#define BMG160_INTR_ZERO_ADDR_ANY_MOTION_UNFILT_DATA__REG   (BMG160_INTR_ZERO_ADDR)
#define BMG160_INTR_ZERO_ADDR_HIGHRATE_UNFILT_DATA__LEN   (1)
#define BMG160_INTR_ZERO_ADDR_HIGHRATE_UNFILT_DATA__MSK   (0x08)
#define BMG160_INTR_ZERO_ADDR_HIGHRATE_UNFILT_DATA__POS   (3)

< 3rd bit of Interrupt Registers

#define BMG160_INTR_ZERO_ADDR_HIGHRATE_UNFILT_DATA__REG   (BMG160_INTR_ZERO_ADDR)
#define BMG160_INTR_ZERO_ADDR_SLOW_OFFSET_UNFILT__LEN   (1)
#define BMG160_INTR_ZERO_ADDR_SLOW_OFFSET_UNFILT__MSK   (0x20)
#define BMG160_INTR_ZERO_ADDR_SLOW_OFFSET_UNFILT__POS   (5)

< 5th bit of Interrupt Registers

#define BMG160_INTR_ZERO_ADDR_SLOW_OFFSET_UNFILT__REG   (BMG160_INTR_ZERO_ADDR)
#define BMG160_LATCH_12_5_MILLI_SEC   (0x0C)
#define BMG160_LATCH_1_MILLI_SEC   (0x0B)
#define BMG160_LATCH_1_SEC   (0x03)
#define BMG160_LATCH_250_MICRO_SEC   (0x09)
#define BMG160_LATCH_250_MS   (0x01)
#define BMG160_LATCH_25_MILLI_SEC   (0x0D)
#define BMG160_LATCH_2_SEC   (0x04)
#define BMG160_LATCH_4_SEC   (0x05)
#define BMG160_LATCH_500_MICRO_SEC   (0x0A)
#define BMG160_LATCH_500_MS   (0x02)
#define BMG160_LATCH_50_MILLI_SEC   (0x0E)
#define BMG160_LATCH_8_SEC   (0x06)
#define BMG160_LATCH_LATCHED   (0x07)
#define BMG160_LATCH_NON_LATCHED   (0x08)
#define BMG160_LOGBIT_EM   (0)

It refers BMG160 LogBit Em

#define BMG160_LOGBIT_VM   (1)

It refers BMG160 LogBit VM

#define BMG160_LOW_SPEED   (0)

It refers BMG160 Low Speed Oscillator

#define BMG160_MAP_ONE_INTR1_AUTO_OFFSET__LEN   (1)
#define BMG160_MAP_ONE_INTR1_AUTO_OFFSET__MSK   (0x08)
#define BMG160_MAP_ONE_INTR1_AUTO_OFFSET__POS   (3)
#define BMG160_MAP_ONE_INTR1_AUTO_OFFSET__REG   (BMG160_INTR_MAP_ONE_ADDR)
#define BMG160_MAP_ONE_INTR1_DATA__LEN   (1)
#define BMG160_MAP_ONE_INTR1_DATA__MSK   (0x01)
#define BMG160_MAP_ONE_INTR1_DATA__POS   (0)

< 0th bit of MAP_1Registers

#define BMG160_MAP_ONE_INTR1_DATA__REG   (BMG160_INTR_MAP_ONE_ADDR)
#define BMG160_MAP_ONE_INTR1_FAST_OFFSET__LEN   (1)
#define BMG160_MAP_ONE_INTR1_FAST_OFFSET__MSK   (0x02)
#define BMG160_MAP_ONE_INTR1_FAST_OFFSET__POS   (1)

< 1st bit of MAP_1Registers

#define BMG160_MAP_ONE_INTR1_FAST_OFFSET__REG   (BMG160_INTR_MAP_ONE_ADDR)
#define BMG160_MAP_ONE_INTR1_FIFO__LEN   (1)
#define BMG160_MAP_ONE_INTR1_FIFO__MSK   (0x04)
#define BMG160_MAP_ONE_INTR1_FIFO__POS   (2)

< 2nd bit of MAP_1Registers

#define BMG160_MAP_ONE_INTR1_FIFO__REG   (BMG160_INTR_MAP_ONE_ADDR)
#define BMG160_MAP_ONE_INTR2_AUTO_OFFSET__LEN   (1)
#define BMG160_MAP_ONE_INTR2_AUTO_OFFSET__MSK   (0x10)
#define BMG160_MAP_ONE_INTR2_AUTO_OFFSET__POS   (4)

< 4th bit of MAP_1Registers

#define BMG160_MAP_ONE_INTR2_AUTO_OFFSET__REG   (BMG160_INTR_MAP_ONE_ADDR)

3rd bit of MAP_1Registers

#define BMG160_MAP_ONE_INTR2_DATA__LEN   (1)
#define BMG160_MAP_ONE_INTR2_DATA__MSK   (0x80)
#define BMG160_MAP_ONE_INTR2_DATA__POS   (7)
#define BMG160_MAP_ONE_INTR2_DATA__REG   (BMG160_INTR_MAP_ONE_ADDR)
#define BMG160_MAP_ONE_INTR2_FAST_OFFSET__LEN   (1)
#define BMG160_MAP_ONE_INTR2_FAST_OFFSET__MSK   (0x40)
#define BMG160_MAP_ONE_INTR2_FAST_OFFSET__POS   (6)

< 6th bit of MAP_1Registers

#define BMG160_MAP_ONE_INTR2_FAST_OFFSET__REG   (BMG160_INTR_MAP_ONE_ADDR)
#define BMG160_MAP_ONE_INTR2_FIFO__LEN   (1)
#define BMG160_MAP_ONE_INTR2_FIFO__MSK   (0x20)
#define BMG160_MAP_ONE_INTR2_FIFO__POS   (5)

< 5th bit of MAP_1Registers

#define BMG160_MAP_ONE_INTR2_FIFO__REG   (BMG160_INTR_MAP_ONE_ADDR)
#define BMG160_MDELAY_DATA_TYPE   u32
#define BMG160_MODE_ADVANCEDPOWERSAVING   (4)
#define BMG160_MODE_DEEPSUSPEND   (1)
#define BMG160_MODE_FASTPOWERUP   (3)
#define BMG160_MODE_LPM1__LEN   (3)
#define BMG160_MODE_LPM1__MSK   (0xA0)
#define BMG160_MODE_LPM1__POS   (5)
#define BMG160_MODE_LPM1__REG   (BMG160_MODE_LPM1_ADDR)
#define BMG160_MODE_LPM1_ADDR   (0x11)

Address of Mode LPM1 Register

#define BMG160_MODE_LPM2_ADDR   (0x12)

Address of Mode LPM2 Register

#define BMG160_MODE_LPM2_ADDR_ADV_POWERSAVING__LEN   (1)
#define BMG160_MODE_LPM2_ADDR_ADV_POWERSAVING__MSK   (0x40)
#define BMG160_MODE_LPM2_ADDR_ADV_POWERSAVING__POS   (6)
#define BMG160_MODE_LPM2_ADDR_ADV_POWERSAVING__REG   (BMG160_MODE_LPM2_ADDR)

4th & 5th bit of Mode LPM2 Register

#define BMG160_MODE_LPM2_ADDR_AUTO_SLEEP_DURN__LEN   (3)
#define BMG160_MODE_LPM2_ADDR_AUTO_SLEEP_DURN__MSK   (0x07)
#define BMG160_MODE_LPM2_ADDR_AUTO_SLEEP_DURN__POS   (0)

< 0th to 2nd bit of LPM2 Register

#define BMG160_MODE_LPM2_ADDR_AUTO_SLEEP_DURN__REG   (BMG160_MODE_LPM2_ADDR)
#define BMG160_MODE_LPM2_ADDR_EXT_TRI_SELECT__LEN   (2)
#define BMG160_MODE_LPM2_ADDR_EXT_TRI_SELECT__MSK   (0x30)
#define BMG160_MODE_LPM2_ADDR_EXT_TRI_SELECT__POS   (4)
#define BMG160_MODE_LPM2_ADDR_EXT_TRI_SELECT__REG   (BMG160_MODE_LPM2_ADDR)
#define BMG160_MODE_LPM2_ADDR_FAST_POWERUP__LEN   (1)
#define BMG160_MODE_LPM2_ADDR_FAST_POWERUP__MSK   (0x80)
#define BMG160_MODE_LPM2_ADDR_FAST_POWERUP__POS   (7)
#define BMG160_MODE_LPM2_ADDR_FAST_POWERUP__REG   (BMG160_MODE_LPM2_ADDR)

6th bit of Mode LPM2 Register

#define BMG160_MODE_NORMAL   (0)
#define BMG160_MODE_SUSPEND   (2)
#define BMG160_MODELPM1_ADDR_SLEEP_DURN__LEN   (3)
#define BMG160_MODELPM1_ADDR_SLEEP_DURN__MSK   (0x0E)
#define BMG160_MODELPM1_ADDR_SLEEP_DURN__POS   (1)

< 1st to 3rd bit of LPM1 Register

#define BMG160_MODELPM1_ADDR_SLEEP_DURN__REG   (BMG160_MODE_LPM1_ADDR)

7th bit of Mode LPM2 Register

#define BMG160_NON_LATCH   (0x00)
#define BMG160_NULL   (0)

constant declaration of NULL

#define BMG160_OFC1_ADDR_OFFSET_X__LEN   (2)
#define BMG160_OFC1_ADDR_OFFSET_X__MSK   (0xC0)
#define BMG160_OFC1_ADDR_OFFSET_X__POS   (6)

< Last 2 bits of INL Offset MSB Registers

#define BMG160_OFC1_ADDR_OFFSET_X__REG   (BMG160_OFFSET_OFC1_ADDR)

3 bits of INL Offset MSB Registers

#define BMG160_OFC1_ADDR_OFFSET_Y__LEN   (3)
#define BMG160_OFC1_ADDR_OFFSET_Y__MSK   (0x38)
#define BMG160_OFC1_ADDR_OFFSET_Y__POS   (3)
#define BMG160_OFC1_ADDR_OFFSET_Y__REG   (BMG160_OFFSET_OFC1_ADDR)

First 3 bits of INL Offset MSB Registers

#define BMG160_OFC1_ADDR_OFFSET_Z__LEN   (3)
#define BMG160_OFC1_ADDR_OFFSET_Z__MSK   (0x07)
#define BMG160_OFC1_ADDR_OFFSET_Z__POS   (0)
#define BMG160_OFC1_ADDR_OFFSET_Z__REG   (BMG160_OFFSET_OFC1_ADDR)

4 bits of Trim GP0 Registers

#define BMG160_OFC2_ADDR   (0x37)

Address of OFC2 Register

#define BMG160_OFC3_ADDR   (0x38)

Address of OFC3 Register

#define BMG160_OFC4_ADDR   (0x39)

Address of OFC4 Register

#define BMG160_OFF   (0)

It refers BMG160 OFF state

#define BMG160_OFFSET_MASK_BYTE_OF_DATA   (0x0FF0)
#define BMG160_OFFSET_OFC1_ADDR   (0x36)

Address of OFC1 Register

#define BMG160_OFFSET_X_BIT_MASK1   (0x000C)
#define BMG160_OFFSET_X_BIT_MASK2   (0x0003)
#define BMG160_OFFSET_Y_Z_BIT_MASK1   (0x0001)
#define BMG160_OFFSET_Y_Z_BIT_MASK2   (0x000E)
#define BMG160_ON   (1)

It refers BMG160 ON state

#define BMG160_PI_KI   (1)

It refers BMG160 PI KI

#define BMG160_PI_KP   (0)

It refers BMG160 PI KP

#define BMG160_POWER_MODE_DELAY   ((u8)1)
#define BMG160_RANGE_1000   (0x01)
#define BMG160_RANGE_125   (0x04)
#define BMG160_RANGE_2000   (0x00)
#define BMG160_RANGE_250   (0x03)
#define BMG160_RANGE_500   (0x02)
#define BMG160_RANGE_ADDR   (0x0F)

Address of Range address Register

#define BMG160_RANGE_ADDR_RANGE__LEN   (3)
#define BMG160_RANGE_ADDR_RANGE__MSK   (0x07)
#define BMG160_RANGE_ADDR_RANGE__POS   (0)

< First (3) bits of range Registers

#define BMG160_RANGE_ADDR_RANGE__REG   (BMG160_RANGE_ADDR)
#define BMG160_RATE_X_LSB_ADDR   (0x02)

Address of X axis Rate LSB Register

#define BMG160_RATE_X_LSB_BIT__LEN   (8)
#define BMG160_RATE_X_LSB_BIT__MSK   (0xFF)
#define BMG160_RATE_X_LSB_BIT__POS   (0)

Last (8) bits of RateX LSB Registers

#define BMG160_RATE_X_LSB_BIT__REG   (BMG160_RATE_X_LSB_ADDR)
#define BMG160_RATE_X_MSB_ADDR   (0x03)

Address of X axis Rate MSB Register

#define BMG160_RATE_Y_LSB_ADDR   (0x04)

Address of Y axis Rate LSB Register

#define BMG160_RATE_Y_LSB_BIT__LEN   (8)
#define BMG160_RATE_Y_LSB_BIT__MSK   (0xFF)
#define BMG160_RATE_Y_LSB_BIT__POS   (0)

< Last (8) bits of RateY LSB Registers

#define BMG160_RATE_Y_LSB_BIT__REG   (BMG160_RATE_Y_LSB_ADDR)
#define BMG160_RATE_Y_MSB_ADDR   (0x05)

Address of Y axis Rate MSB Register

#define BMG160_RATE_Z_LSB_ADDR   (0x06)

Address of Z axis Rate LSB Register

#define BMG160_RATE_Z_LSB_BIT__LEN   (8)
#define BMG160_RATE_Z_LSB_BIT__MSK   (0xFF)
#define BMG160_RATE_Z_LSB_BIT__POS   (0)

< Last (8) bits of RateZ LSB Registers

#define BMG160_RATE_Z_LSB_BIT__REG   (BMG160_RATE_Z_LSB_ADDR)
#define BMG160_RATE_Z_MSB_ADDR   (0x07)

Address of Z axis Rate MSB Register

#define BMG160_RD_FUNC_PTR
Value:
s8 (*bus_read)\
(u8, u8, u8 *, u8)
unsigned char u8
Definition: bmg160.h:191
signed char s8
If your machine support 16 bit define the MACHINE_16_BIT.
Definition: bmg160.h:185
unsigned char u8
Definition: bma2x2.h:192
#define BMG160_READ_SET   (0x01)

Setting for reading data

#define BMG160_RETURN_FUNCTION_TYPE   s8
#define BMG160_RST_LATCH_ADDR   (0x21)

Address of Reset Latch Register

#define BMG160_RST_LATCH_ADDR_LATCH_INTR__LEN   (4)
#define BMG160_RST_LATCH_ADDR_LATCH_INTR__MSK   (0x0F)
#define BMG160_RST_LATCH_ADDR_LATCH_INTR__POS   (0)
#define BMG160_RST_LATCH_ADDR_LATCH_INTR__REG   (BMG160_RST_LATCH_ADDR)
#define BMG160_RST_LATCH_ADDR_LATCH_STAT__LEN   (1)
#define BMG160_RST_LATCH_ADDR_LATCH_STAT__MSK   (0x10)
#define BMG160_RST_LATCH_ADDR_LATCH_STAT__POS   (4)
#define BMG160_RST_LATCH_ADDR_LATCH_STAT__REG   (BMG160_RST_LATCH_ADDR)

First (4) bits of Reset Latch Registers

#define BMG160_RST_LATCH_ADDR_OFFSET_RST__LEN   (1)
#define BMG160_RST_LATCH_ADDR_OFFSET_RST__MSK   (0x40)
#define BMG160_RST_LATCH_ADDR_OFFSET_RST__POS   (6)
#define BMG160_RST_LATCH_ADDR_OFFSET_RST__REG   (BMG160_RST_LATCH_ADDR)

4th bit of Reset Latch Registers

#define BMG160_RST_LATCH_ADDR_RST_INTR__LEN   (1)
#define BMG160_RST_LATCH_ADDR_RST_INTR__MSK   (0x80)
#define BMG160_RST_LATCH_ADDR_RST_INTR__POS   (7)

< Last bit of Reset Latch Registers

#define BMG160_RST_LATCH_ADDR_RST_INTR__REG   (BMG160_RST_LATCH_ADDR)

6th bit of Reset Latch Registers

#define BMG160_S_TAP   (0)

It refers BMG160 Single Tap

#define BMG160_SELFTEST_ADDR   (0x3C)

Address of BGW Self test Register

#define BMG160_SELFTEST_ADDR_BISTFAIL__LEN   (1)
#define BMG160_SELFTEST_ADDR_BISTFAIL__MSK   (0x04)
#define BMG160_SELFTEST_ADDR_BISTFAIL__POS   (2)
#define BMG160_SELFTEST_ADDR_BISTFAIL__REG   (BMG160_SELFTEST_ADDR)

1st bit of Self test Registers

#define BMG160_SELFTEST_ADDR_BISTRDY__LEN   (1)
#define BMG160_SELFTEST_ADDR_BISTRDY__MSK   (0x02)
#define BMG160_SELFTEST_ADDR_BISTRDY__POS   (1)
#define BMG160_SELFTEST_ADDR_BISTRDY__REG   (BMG160_SELFTEST_ADDR)

0th bit of Self test Registers

#define BMG160_SELFTEST_ADDR_RATEOK__LEN   (1)
#define BMG160_SELFTEST_ADDR_RATEOK__MSK   (0x10)
#define BMG160_SELFTEST_ADDR_RATEOK__POS   (4)

< 4th bit of Self test Registers

#define BMG160_SELFTEST_ADDR_RATEOK__REG   (BMG160_SELFTEST_ADDR)

2nd bit of Self test Registers

#define BMG160_SELFTEST_ADDR_TRIGBIST__LEN   (1)
#define BMG160_SELFTEST_ADDR_TRIGBIST__MSK   (0x01)
#define BMG160_SELFTEST_ADDR_TRIGBIST__POS   (0)
#define BMG160_SELFTEST_ADDR_TRIGBIST__REG   (BMG160_SELFTEST_ADDR)
#define BMG160_SELFTEST_BISTFAIL   ((u8)0x00)
#define BMG160_SELFTEST_DELAY   ((u8)10)
#define BMG160_SELFTEST_RATEOK   ((u8)0x01)
#define BMG160_SET_BITSLICE (   regvar,
  bitname,
  val 
)    ((regvar&~bitname##__MSK)|((val<<bitname##__POS)&bitname##__MSK))
#define BMG160_SHADOW_DIS__LEN   (1)
#define BMG160_SHADOW_DIS__MSK   (0x40)
#define BMG160_SHADOW_DIS__POS   (6)
#define BMG160_SHADOW_DIS__REG   (BMG160_HIGH_BW_ADDR)
#define BMG160_SHAKE_TH   (0)

It refers BMG160 Shake Threshold

#define BMG160_SHAKE_TH2   (1)

It refers BMG160 Shake Threshold2

#define BMG160_SHAKE_UNFILT_DATA   (4)

It refers BMG160 Shake unfilt data

#define BMG160_SHIFT_BIT_POSITION_BY_01_BIT   (1)

Shift bit by 1 Position

#define BMG160_SHIFT_BIT_POSITION_BY_02_BITS   (4)

Shift bit by 2 Position

#define BMG160_SHIFT_BIT_POSITION_BY_04_BITS   (4)

Shift bit by (4) Position

#define BMG160_SHIFT_BIT_POSITION_BY_08_BITS   (8)

Shift bit by (8) Position

#define BMG160_SLOW_CMD   (0)

It refers BMG160 Slow Command

#define BMG160_SLOW_OFFSET   (0)

It refers BMG160 Slow Offset

#define BMG160_SLOW_OFFSET_DURN__LEN   (3)
#define BMG160_SLOW_OFFSET_DURN__MSK   (0x38)
#define BMG160_SLOW_OFFSET_DURN__POS   (3)
#define BMG160_SLOW_OFFSET_DURN__REG   (BMG160_SOC_ADDR)

2nd bit of INT OFF0 Registers

#define BMG160_SLOW_OFFSET_ENABLE_X__LEN   (1)
#define BMG160_SLOW_OFFSET_ENABLE_X__MSK   (0x01)
#define BMG160_SLOW_OFFSET_ENABLE_X__POS   (0)
#define BMG160_SLOW_OFFSET_ENABLE_X__REG   (BMG160_SOC_ADDR)
#define BMG160_SLOW_OFFSET_ENABLE_Y__LEN   (1)
#define BMG160_SLOW_OFFSET_ENABLE_Y__MSK   (0x02)
#define BMG160_SLOW_OFFSET_ENABLE_Y__POS   (1)
#define BMG160_SLOW_OFFSET_ENABLE_Y__REG   (BMG160_SOC_ADDR)

0th bit of INT OFF0 Registers

#define BMG160_SLOW_OFFSET_ENABLE_Z__LEN   (1)
#define BMG160_SLOW_OFFSET_ENABLE_Z__MSK   (0x04)
#define BMG160_SLOW_OFFSET_ENABLE_Z__POS   (2)
#define BMG160_SLOW_OFFSET_ENABLE_Z__REG   (BMG160_SOC_ADDR)

1st bit of INT OFF0 Registers

#define BMG160_SLOW_OFFSET_THRES__LEN   (2)
#define BMG160_SLOW_OFFSET_THRES__MSK   (0xC0)
#define BMG160_SLOW_OFFSET_THRES__POS   (6)

< Last 3 bits of INT OFF0 Registers

#define BMG160_SLOW_OFFSET_THRES__REG   (BMG160_SOC_ADDR)

2 bits of INT OFF0 Registers

#define BMG160_SOC_ADDR   (0x31)

Address of SOC register

#define BMG160_SOFT_RESET   (0xB6)
#define BMG160_SPI_RD_MASK   (0x80)

Read mask

#define BMG160_START_ADDR   (0)

It refers BMG160 Start Address

#define BMG160_STOP_ADDR   (1)

It refers BMG160 Stop Address

#define BMG160_TAP_UNFILT_DATA   (0)

It refers BMG160 Tap unfilt data

#define BMG160_TEMP_ADDR   (0x08)

Address of Temperature Data LSB Register

#define BMG160_TEST_MODE_ENABLE   (0)

It refers BMG160 Test Mode Enable

#define BMG160_TEST_MODE_REG   (1)

It refers BMG160 Test Mode reg

#define BMG160_TRIM_GP0_ADDR   (0x3A)

Address of Trim GP0 Register

#define BMG160_TRIM_GP0_ADDR_GP0__LEN   (4)
#define BMG160_TRIM_GP0_ADDR_GP0__MSK   (0xF0)
#define BMG160_TRIM_GP0_ADDR_GP0__POS   (4)
#define BMG160_TRIM_GP0_ADDR_GP0__REG   (BMG160_TRIM_GP0_ADDR)

2 bits of Trim GP0 Registers

#define BMG160_TRIM_GP0_ADDR_OFFSET_X__LEN   (2)
#define BMG160_TRIM_GP0_ADDR_OFFSET_X__MSK   (0x0C)
#define BMG160_TRIM_GP0_ADDR_OFFSET_X__POS   (2)
#define BMG160_TRIM_GP0_ADDR_OFFSET_X__REG   (BMG160_TRIM_GP0_ADDR)

1st bit of Trim GP0 Registers

#define BMG160_TRIM_GP0_ADDR_OFFSET_Y__LEN   (1)
#define BMG160_TRIM_GP0_ADDR_OFFSET_Y__MSK   (0x02)
#define BMG160_TRIM_GP0_ADDR_OFFSET_Y__POS   (1)
#define BMG160_TRIM_GP0_ADDR_OFFSET_Y__REG   (BMG160_TRIM_GP0_ADDR)

First bit of Trim GP0 Registers

#define BMG160_TRIM_GP0_ADDR_OFFSET_Z__LEN   (1)
#define BMG160_TRIM_GP0_ADDR_OFFSET_Z__MSK   (0x01)
#define BMG160_TRIM_GP0_ADDR_OFFSET_Z__POS   (0)
#define BMG160_TRIM_GP0_ADDR_OFFSET_Z__REG   (BMG160_TRIM_GP0_ADDR)
#define BMG160_TRIM_GP1_ADDR   (0x3B)

Address of Trim GP1 Register

#define BMG160_TRIM_NVM_CTRL_ADDR   (0x33)

Address of Trim NVM control register

#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_LOAD__LEN   (1)
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_LOAD__MSK   (0x08)
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_LOAD__POS   (3)
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_LOAD__REG   (BMG160_TRIM_NVM_CTRL_ADDR)

2nd bit of Trim NVM control Registers

#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_PROG_MODE__LEN   (1)
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_PROG_MODE__MSK   (0x01)
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_PROG_MODE__POS   (0)
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_PROG_MODE__REG   (BMG160_TRIM_NVM_CTRL_ADDR)
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_PROG_TRIG__LEN   (1)
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_PROG_TRIG__MSK   (0x02)
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_PROG_TRIG__POS   (1)
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_PROG_TRIG__REG   (BMG160_TRIM_NVM_CTRL_ADDR)

0th bit of Trim NVM control Registers

#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_RDY__LEN   (1)
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_RDY__MSK   (0x04)
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_RDY__POS   (2)
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_RDY__REG   (BMG160_TRIM_NVM_CTRL_ADDR)

1st bit of Trim NVM control Registers

#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_REMAIN__LEN   (4)
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_REMAIN__MSK   (0xF0)
#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_REMAIN__POS   (4)

< Last 4 bits of Trim NVM control Registers

#define BMG160_TRIM_NVM_CTRL_ADDR_NVM_REMAIN__REG   (BMG160_TRIM_NVM_CTRL_ADDR)

3rd bit of Trim NVM control Registers

#define BMG160_TRIM_VRA   (0)

It refers BMG160 Trim VRA

#define BMG160_TRIM_VRD   (1)

It refers BMG160 Trim VRD

#define BMG160_WR_FUNC_PTR
Value:
s8 (*bus_write)\
(u8, u8, u8 *, u8)
unsigned char u8
Definition: bmg160.h:191
signed char s8
If your machine support 16 bit define the MACHINE_16_BIT.
Definition: bmg160.h:185
unsigned char u8
Definition: bma2x2.h:192
#define BMG160_X_AXIS   (0)

< It refers BMG160 X-axis It refers BMG160 Y-axis

#define BMG160_X_DATA_LENGTH   ((u8)2)
#define BMG160_X_DATA_SIZE   (2)
#define BMG160_X_LSB_DATA   (0)
#define BMG160_X_MSB_DATA   (1)
#define BMG160_XYZ_AND_INTR_DATA_LENGTH   ((u8)12)
#define BMG160_XYZ_DATA_SIZE   (6)
#define BMG160_XYZ_INTR_DATA_SIZE   (12)
#define BMG160_Y_AXIS   (1)

It refers BMG160 Z-axis

#define BMG160_Y_DATA_LENGTH   ((u8)2)
#define BMG160_Y_DATA_SIZE   (2)
#define BMG160_Y_LSB_DATA   (0)
#define BMG160_Y_MSB_DATA   (1)
#define BMG160_Z_AXIS   (2)
#define BMG160_Z_DATA_LENGTH   ((u8)2)
#define BMG160_Z_DATA_SIZE   (2)
#define BMG160_Z_LSB_DATA   (0)
#define BMG160_Z_MSB_DATA   (1)
#define C_BMG160_10MS_AUTO_SLEEP_DURN_U8X   (4)
#define C_BMG160_15MS_AUTO_SLEEP_DURN_U8X   (5)
#define C_BMG160_20MS_AUTO_SLEEP_DURN_U8X   (6)
#define C_BMG160_40MS_AUTO_SLEEP_DURN_U8X   (7)
#define C_BMG160_4MS_AUTO_SLEEP_DURN_U8X   (1)
#define C_BMG160_5MS_AUTO_SLEEP_DURN_U8X   (2)
#define C_BMG160_8MS_AUTO_SLEEP_DURN_U8X   (3)
#define C_BMG160_BW_116HZ_U8X   (2)
#define C_BMG160_BW_12HZ_U8X   (5)
#define C_BMG160_BW_230HZ_U8X   (1)
#define C_BMG160_BW_23HZ_U8X   (4)
#define C_BMG160_BW_32HZ_U8X   (7)
#define C_BMG160_BW_47HZ_U8X   (3)
#define C_BMG160_BW_64HZ_U8X   (6)
#define C_BMG160_FAILURE   (1)

It refers BMG160 operation is Failure

#define C_BMG160_NO_AUTO_SLEEP_DURN_U8X   (0)
#define C_BMG160_NO_FILTER_U8X   (0)
#define C_BMG160_SUCCESS   (0)

It refers BMG160 operation is success

#define E_BMG160_NULL_PTR   ((s8)-127)
#define E_BMG160_OUT_OF_RANGE   ((s8)-2)
#define ERROR   ((s8)-1)
#define MACHINE_32_BIT
Note
While porting the API please consider the following
Please check the version of C standard
Are you using Linux platform

For the Linux platform support Please use the types.h for your data types definitions

By default it is defined as 32 bit machine configuration define your data types based on your machine/compiler/controller configuration

Typedef Documentation

typedef signed short int s16

used for signed 16bit

typedef signed int s32

used for signed 32bit

typedef signed long long int s64

used for signed 64bit

typedef signed char s8

used for signed 8bit

typedef unsigned short int u16

used for unsigned 16bit

typedef unsigned int u32

used for unsigned 32bit

typedef unsigned long long int u64

used for unsigned 64bit

typedef unsigned char u8

used for unsigned 8bit

Function Documentation

BMG160_RETURN_FUNCTION_TYPE bmg160_burst_read ( u8  v_addr_u8,
u8 v_data_u8,
u32  v_len_u32 
)
Parameters
v_addr_u8-> Address of the register
v_data_u8-> The data from the register
v_len_u32-> no of bytes to read
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_enable_fast_offset ( void  )
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_any_motion_durn_sample ( u8 v_durn_sample_u8)
Parameters
v_durn_sample_u8: The value of any motion duration samples
value Samples
0x00 4 samples
0x01 8 samples
0x02 12 samples
0x03 16 samples
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_any_motion_enable_axis ( u8  v_channel_u8,
u8 v_any_motion_axis_u8 
)
Note
BMG160_X_AXIS -> bit 0
BMG160_Y_AXIS -> bit 1
BMG160_Z_AXIS -> bit 2
Parameters
v_channel_u8: The value of Any Enable channel number
v_channel_u8 axis
0 BMG160_X_AXIS
1 BMG160_Y_AXIS
2 BMG160_Z_AXIS
v_any_motion_axis_u8The value of Any motion axis enable
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
Note
BMG160_X_AXIS -> bit 0
BMG160_Y_AXIS -> bit 1
BMG160_Z_AXIS -> bit 2
Parameters
v_channel_u8: The value of Any Enable channel number
v_channel_u8 axis
0 BMG160_X_AXIS
1 BMG160_Y_AXIS
2 BMG160_Z_AXIS
v_data_u8The value of Any motion axis enable
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_any_motion_thres ( u8 v_any_motion_thres_u8)
Parameters
v_any_motion_thres_u8: The value of any_motion Threshold
Note
Any motion threshold can be calculate using
((1+ v_any_motion_thres_u8)*16LSB)
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_auto_offset_enable ( u8 v_offset_enable_u8)
Parameters
v_offset_enable_u8: The value of offset enable
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_auto_sleep_durn ( u8 v_durn_u8)
Parameters
v_durn_u8: The value of gyro auto sleep duration
sleep duration value
not allowed 0
4ms 1
5ms 2
8ms 3
10ms 4
15ms 5
20ms 6
40ms 7
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMG160_RETURN_FUNCTION_TYPE bmg160_get_awake_durn ( u8 v_awake_durn_u8)
Parameters
v_awake_durn_u8: The value of awake Duration
value Duration
0x00 8 samples
0x01 16 samples
0x02 32 samples
0x03 64 samples
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_bw ( u8 v_bw_u8)
Parameters
v_bw_u8The value of gyro bandwidth
value bandwidth
0x00 BMG160_BW_500_HZ
0x01 BMG160_BW_230_HZ
0x02 BMG160_BW_116_HZ
0x03 BMG160_BW_47_HZ
0x04 BMG160_BW_23_HZ
0x05 BMG160_BW_12_HZ
0x06 BMG160_BW_64_HZ
0x07 BMG160_BW_32_HZ
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMG160_RETURN_FUNCTION_TYPE bmg160_get_data_enable ( u8 v_data_enable_u8)
Parameters
v_data_enable_u8: The value of data enable
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_data_X ( s16 v_data_x_s16)
Parameters
v_data_x_s16The value of gyro x axis data
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_data_XYZ ( struct bmg160_data_t data)
Parameters
dataThe value of gyro xyz axis data
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMG160_RETURN_FUNCTION_TYPE bmg160_get_data_XYZI ( struct bmg160_data_t data)
Parameters
dataThe value of gyro xyz axis data and interrupt status
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_data_Y ( s16 v_data_y_s16)
Parameters
v_data_y_s16The value of gyro y axis data
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_data_Z ( s16 v_data_z_s16)
Parameters
v_data_z_s16The value of gyro z axis data
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_fast_offset_enable_axis ( u8 v_fast_offset_u8)
Note
X_AXIS -> bit 0
Y_AXIS -> bit 1
Z_AXIS -> bit 2
Parameters
v_fast_offset_u8The value of fast offset enable
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_FIFO_data_reg ( u8 v_fifo_data_u8)
Parameters
v_fifo_data_u8: The data of fifo
Returns
results of bus communication function
Return values
0-> Success
-1-> Error result of communication routines
BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_data_select ( u8 v_fifo_data_select_u8)
Parameters
v_fifo_data_select_u8: The value of fifo data selection
data selection value
X,Y and Z (DEFAULT) 0
X only 1
Y only 2
Z only 3
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_enable ( u8 v_fifo_enable_u8)
Parameters
v_fifo_enable_u8: The value of fifo enable
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_frame_count ( u8 v_fifo_frame_count_u8)
Parameters
v_fifo_frame_count_u8The value of fifo frame counter
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_mode ( u8 v_fifo_mode_u8)
Parameters
v_fifo_mode_u8: The value of fifo mode
mode value
BYPASS 0
FIFO 1
STREAM 2
RESERVED 3
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_overrun ( u8 v_fifo_overrun_u8)
Parameters
v_fifo_overrun_u8The value of fifo over run
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_stat_reg ( u8 v_fifo_stat_u8)
Note
frame_counter > bit from 0 to 6
overrun -> bit 7
Parameters
v_fifo_stat_u8: The value of fifo overrun and fifo counter
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_tag ( u8 v_fifo_tag_u8)
Parameters
v_fifo_tag_u8: The value of fifo tag enable
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_wm_enable ( u8 v_fifo_wm_enable_u8)
Parameters
v_fifo_wm_enable_u8: The value of fifo water mark enable
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_wm_level ( u8 v_fifo_wm_level_u8)
Parameters
v_fifo_wm_level_u8: The value of fifo water mark level
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_gp ( u8  v_param_u8,
u8 v_gp_u8 
)
Parameters
v_param_u8The value of general purpose register select
v_param_u8 value
BMG160_GP0 0
BMG160_GP1 1
v_gp_u8The value of general purpose register
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_high_bw ( u8 v_high_bw_u8)
Parameters
v_high_bw_u8: The value of high bandwidth
value Description
1 unfiltered
0 filtered
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_highrate_durn_axis ( u8  v_channel_u8,
u8 v_highrate_durn_axis_u8 
)
Note
X_AXIS - 0x23 bit form 0 to 7
Y_AXIS - 0x25 bit form 0 to 7
Z_AXIS - 0x27 bit form 0 to 7
Parameters
v_channel_u8The value of High Duration channel number
v_channel_u8 value
BMG160_X_AXIS 0
BMG160_Y_AXIS 1
BMG160_Z_AXIS 2
v_highrate_durn_axis_u8The value of high duration
Note
High rate duration can be calculated by using the formula
High_durn = ((1+v_highrate_durn_axis_u8)*2.5ms)
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_highrate_enable_axis ( u8  v_channel_u8,
u8 v_enable_u8 
)
Note
X_AXIS - 0x22 bit 0
Y_AXIS - 0x24 bit 0
Z_AXIS - 0x26 bit 0
Parameters
v_channel_u8: The value of high enable channel number
v_channel_u8 value
BMG160_X_AXIS 0
BMG160_Y_AXIS 1
BMG160_Z_AXIS 2
v_enable_u8The value of high axis enable
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_highrate_hyst ( u8  v_channel_u8,
u8 v_highrate_hyst_u8 
)
Note
X_AXIS - 0x22 bit 6 and 7
Y_AXIS - 0x24 bit 6 and 7
Z_AXIS - 0x26 bit 6 and 7
Parameters
v_channel_u8The value of high Hysteresis channel number
v_channel_u8 value
BMG160_X_AXIS 0
BMG160_Y_AXIS 1
BMG160_Z_AXIS 2
v_highrate_hyst_u8The value of high Hysteresis
Note
High hysteresis can be calculated by
High_hyst = ((255+256 *v_highrate_hyst_u8) * 4LSB)
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_highrate_thres ( u8  v_channel_u8,
u8 v_highrate_thres_u8 
)
Note
X_AXIS - 0x22 bit from 1 to 5
Y_AXIS - 0x24 bit from 1 to 5
Z_AXIS - 0x26 bit from 1 to 5
Parameters
v_channel_u8: The value of high threshold channel number
v_channel_u8 value
BMG160_X_AXIS 0
BMG160_Y_AXIS 1
BMG160_Z_AXIS 2
v_highrate_thres_u8the high threshold value
Note
High Threshold can be calculated by
High_thres = ((255+256 *v_highrate_thres_u8) * 4LSB)
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_i2c_wdt ( u8  v_channel_u8,
u8 v_i2c_wdt_u8 
)
Note
i2c_wdt_select -> bit 1
i2c_wdt_enable -> bit 2
Parameters
v_channel_u8The value of i2c wdt channel number
v_channel_u8 value
BMG160_I2C_WDT_ENABLE 1
BMG160_I2C_WDT_SELECT 0
v_i2c_wdt_u8The value of I2C enable and WDT select
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr1_any_motion ( u8 v_int1r_any_motion_u8)
Parameters
v_int1r_any_motion_u8: The value of any motion interrupt1
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr1_fifo ( u8 v_intr_fifo_u8)
Parameters
v_intr_fifo_u8: The interrupt1 fifo value
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr1_highrate ( u8 v_intr1_u8)
Parameters
v_intr1_u8: The value of interrupt1 high_rate enable
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr2_any_motion ( u8 v_intr2_any_motion_u8)
Parameters
v_intr2_any_motion_u8: The value of interrupt2 any_motion
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr2_fifo ( u8 v_intr_fifo_u8)
Parameters
v_intr_fifo_u8: The interrupt2 fifo value
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr2_highrate ( u8 v_intr2_highrate_u8)
Parameters
v_intr2_highrate_u8: The interrupt2 high_rate value
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr2_offset ( u8  v_axis_u8,
u8 v_intr2_offset_u8 
)
Note
int2_fast_offset -> bit 6
int2_auto_offset -> bit 4
Parameters
v_axis_u8The value of fast/auto offset interrupts selection
v_axis_u8 Data interrupt
1 BMG160_FAST_OFFSET
2 BMG160_AUTO_OFFSET
v_intr2_offset_u8The value of fast/auto offset enable
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr_data ( u8  v_axis_u8,
u8 v_intr_data_u8 
)
Note
INT1 -> bit 0
INT2 -> bit 7
Parameters
v_axis_u8data interrupt selection
v_axis_u8 Data interrupt
0 BMG160_INTR1_DATA
1 BMG160_INTR2_DATA
v_intr_data_u8The value of data interrupt1 or interrupt2
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr_level ( u8  v_param_u8,
u8 v_intr_level_u8 
)
Note
INT1 -> bit 0
INT2 -> bit 2
Parameters
v_param_u8The value of Active Level selection number
v_param_u8Active Level
0 BMG160_INTR1
1 BMG160_INTR2
v_intr_level_u8The value of Active Level status value
value Active Level
1 Active HIGH
0 Active LOW
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr_offset ( u8  v_axis_u8,
u8 v_intr1_offset_u8 
)
Note
int1_fast_offset -> bit 1
int1_auto_offset -> bit 3
Parameters
v_axis_u8The value of fast/auto offset interrupts selection
v_axis_u8 Data interrupt
1 BMG160_FAST_OFFSET
2 BMG160_AUTO_OFFSET
v_intr1_offset_u8The value of fast/auto offset
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr_output_type ( u8  v_param_u8,
u8 v_intr_output_type_u8 
)
Note
INT1 -> bit 1
INT2 -> bit 3
Parameters
v_param_u8The value of output type selection number
v_param_u8output type
0 BMG160_INTR1
1 BMG160_INTR2
v_intr_output_type_u8The value of output type
value output
1 open drain
0 push pull
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr_stat_reg_one ( u8 v_stat1_data_u8)
Note
data bit -> 7
auto_offset bit -> 6
fast_offset bit -> 5
fifo_int bit -> 4
Parameters
v_stat1_data_u8: The interrupt status of data, auto_offset, fast_offset and fifo_int
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr_stat_reg_three ( u8 v_stat3_data_u8)
Note
high_rate sign bit -> 3
high_rate first_z bit -> 2
high_rate first_x bit -> 1
high_rate first_y bit -> 0
high_rate first_y bit -> 0
Parameters
v_stat3_data_u8: The interrupt status of high_rate sign, high_rate first_z, high_rate first_x and high_rate first_y
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr_stat_reg_two ( u8 v_stat2_data_u8)
Note
any motion sign, any motion first_z, any motion first_x and any motion first_y in the register 0x0B
any motion sign bit -> 3
any motion first_z bit -> 2
any motion first_x bit -> 1
any motion first_y bit -> 0
Parameters
v_stat2_data_u8: Pointer holding the the interrupt status of any motion sign, any motion first_z, any motion first_x and any motion first_y
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_intr_stat_reg_zero ( u8 v_stat0_data_u8)
Note
any motion bit -> 2
high rate bit -> 1
Parameters
v_stat0_data_u8: The interrupt status of any motion and high rate
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_latch_intr ( u8 v_latch_intr_u8)
Parameters
v_latch_intr_u8: The value of latch interrupt
Latch Interrupt Value
BMG160_NON_LATCH 0x00
BMG160_LATCH_250_MS 0x01
BMG160_LATCH_500_MS 0x02
BMG160_LATCH_1_SEC 0x03
BMG160_LATCH_2_SEC 0x04
BMG160_LATCH_4_SEC 0x05
BMG160_LATCH_8_SEC 0x06
BMG160_LATCH_LATCHED 0x07
BMG160_LATCH_NON_LATCHED 0x08
BMG160_LATCH_250_MICRO_SEC 0x09
BMG160_LATCH_500_MICRO_SEC 0x0A
BMG160_LATCH_1_MILLI_SEC 0x0B
BMG160_LATCH_12.5_MILLI_SEC 0x0C
BMG160_LATCH_25_MILLI_SEC 0x0D
BMG160_LATCH_50_MILLI_SEC 0x0E
BMG160_LATCH_LATCHED 0x0F
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_latch_stat ( u8 v_latch_stat_u8)
Parameters
v_latch_stat_u8: The value of latch status
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_nvm_prog_mode ( u8 nvm_prog_mode)
Parameters
nvm_prog_modeThe value of nvm program mode
value Description
1 Unlock
0 Lock nvm write
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_nvm_rdy ( u8 v_nvm_rdy_u8)
Parameters
v_nvm_rdy_u8The value of nvm program
value Description
1 NVM write is in progress
0 NVM is ready to accept a new write
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_nvm_remain ( u8 v_nvm_remain_u8)
Parameters
v_nvm_remain_u8The value of nvm program
value Description
1 Do not trigger
0 Trigger
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_offset ( u8  v_axis_u8,
s16 v_offset_s16 
)
Note
X_AXIS ->
bit 0 and 1 is available in the register 0x3A bit 2 and 3
bit 2 and 3 is available in the register 0x36 bit 6 and 7
bit 4 to 11 is available in the register 0x37 bit 0 to 7
Y_AXIS ->
bit 0 is available in the register 0x3A bit 1
bit 1,2 and 3 is available in the register 0x36 bit 3,4 and 5
bit 4 to 11 is available in the register 0x38 bit 0 to 7
Z_AXIS ->
bit 0 is available in the register 0x3A bit 0
bit 1,2 and 3 is available in the register 0x36 bit 0,1 and 3
bit 4 to 11 is available in the register 0x39 bit 0 to 7
Parameters
v_axis_u8: The value of offset axis selection
v_axis_u8 value
BMG160_X_AXIS 1
BMG160_Y_AXIS 0
BMG160_Z_AXIS 0
v_offset_s16The value of offset
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_offset_unfilt ( u8  v_param_u8,
u8 v_offset_unfilt_u8 
)
Note
slow_offset_unfilt -> 0x1A bit 5
fast_offset_unfilt -> 0x1B bit 7
Parameters
v_param_u8The value of fast/slow offset unfilt data selection
v_param_u8 offset selection
0 BMG160_SLOW_OFFSET
1 BMG160_FAST_OFFSET
v_offset_unfilt_u8The value of fast/slow offset unfilt data
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_offset_word_length ( u8  v_channel_u8,
u8 v_offset_word_length_u8 
)
Note
fast_offset_wordlength -> bit 4 and 5
auto_offset_wordlength -> bit 6 and 7
Parameters
v_channel_u8The value of WordLengthchannel number
v_channel_u8 value
BMG160_AUTO_OFFSET_WL 0
BMG160_FAST_OFFSET_WL 1
v_offset_word_length_u8The value of offset word length
value word length
0x00 32 samples
0x01 64 samples
0x02 128 samples
0x03 256 samples
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_pmu_ext_tri_select ( u8 v_pwu_ext_tri_select_u8)
Parameters
v_pwu_ext_tri_select_u8: The value of External Trigger selection
v_pwu_ext_tri_select_u8 Trigger source
0x00 No
0x01 INT1 pin
0x02 INT2 pin
0x03 SDO pin(SPI3 mode)
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_power_mode ( u8 v_power_mode_u8)
Parameters
v_power_mode_u8:The value of power mode
value power mode
0 BMG160_MODE_NORMAL
1 BMG160_MODE_SUSPEND
2 BMG160_MODE_DEEPSUSPEND
3 BMG160_MODE_FASTPOWERUP
4 BMG160_MODE_ADVANCEDPOWERSAVING
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMG160_RETURN_FUNCTION_TYPE bmg160_get_range_reg ( u8 v_range_u8)
Parameters
v_range_u8: The value of gyro range
value range
0x00 BMG160_RANGE_2000
0x01 BMG160_RANGE_1000
0x02 BMG160_RANGE_500
0x03 BMG160_RANGE_250
0x04 BMG160_RANGE_125
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMG160_RETURN_FUNCTION_TYPE bmg160_get_shadow_dis ( u8 v_shadow_dis_u8)
Parameters
v_shadow_dis_u8: The value of shadow dis
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_sleep_durn ( u8 v_durn_u8)
Parameters
v_durn_u8: The value of sleep duration
sleep duration value
2ms 0
4ms 1
5ms 2
8ms 3
10ms 4
15ms 5
18ms 6
20ms 7
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_slow_offset_durn ( u8 v_offset_durn_u8)
Parameters
v_offset_durn_u8: The value of Slow Offset duration
value Duration
0x00 40ms
0x01 80ms
0x02 160ms
0x03 320ms
0x04 640ms
0x05 1280ms
0x06 unused
0x07 unused
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_slow_offset_enable_axis ( u8  v_channel_u8,
u8 v_slow_offset_u8 
)
Note
X_AXIS -> bit 0
Y_AXIS -> bit 1
Z_AXIS -> bit 2
Parameters
v_channel_u8The value of slow offset channel number
v_channel_u8 value
BMG160_X_AXIS 0
BMG160_Y_AXIS 1
BMG160_Z_AXIS 2
v_slow_offset_u8The slow offset value
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_slow_offset_thres ( u8 v_offset_thres_u8)
Parameters
v_offset_thres_u8: The value of slow offset Threshold
value threshold
0x00 0.1 degree/sec
0x01 0.2 degree/sec
0x02 0.5 degree/sec
0x03 1 degree/sec
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_spi3 ( u8 v_spi3_u8)
Parameters
v_spi3_u8: The value of spi3 enable
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_temp ( s8 v_temp_s8)
Parameters
v_temp_s8The value of temperature
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_get_unfilt_data ( u8  v_param_u8,
u8 v_unfilt_data_u8 
)
Note
any_unfilt_data -> bit 1
high_unfilt_data -> bit 3
Parameters
v_param_u8The value of any/high offset unfilt data selection
v_param_u8 offset selection
1 BMG160_HIGHRATE_UNFILT_DATA
3 BMG160_ANY_MOTION_UNFILT_DATA
v_unfilt_data_u8The value of any/high unfilt data
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_init ( struct bmg160_t bmg160)
Parameters
bmg160structure pointer.
Note
While changing the parameter of the bmg160_t consider the following point:
Changing the reference value of the parameter will changes the local copy or local reference make sure your changes will not affect the reference value of the parameter (Better case don't change the reference value of the parameter)
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMG160_RETURN_FUNCTION_TYPE bmg160_read_register ( u8  v_addr_u8,
u8 v_data_u8,
u8  v_len_u8 
)
Parameters
v_addr_u8-> Address of the register
v_data_u8-> The data from the register
v_len_u8-> no of bytes to read
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_selftest ( u8 v_result_u8)
Parameters
v_result_u8The value of self test
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_any_motion_durn_sample ( u8  v_durn_sample_u8)
Parameters
v_durn_sample_u8: The value of any motion duration samples
value Samples
0x00 4 samples
0x01 8 samples
0x02 12 samples
0x03 16 samples
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_any_motion_enable_axis ( u8  v_channel_u8,
u8  v_any_motion_axis_u8 
)
Note
BMG160_X_AXIS -> bit 0
BMG160_Y_AXIS -> bit 1
BMG160_Z_AXIS -> bit 2
Parameters
v_channel_u8: The value of Any Enable channel number
v_channel_u8 axis
0 BMG160_X_AXIS
1 BMG160_Y_AXIS
2 BMG160_Z_AXIS
v_any_motion_axis_u8The value of Any motion axis enable
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_any_motion_thres ( u8  v_any_motion_thres_u8)
Parameters
v_any_motion_thres_u8: The value of any_motion Threshold
Note
Any motion threshold can be calculate using
((1+ v_any_motion_thres_u8)*16LSB)
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_auto_offset_enable ( u8  v_offset_enable_u8)
Parameters
v_offset_enable_u8: The value of offset enable
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_auto_sleep_durn ( u8  v_durn_u8,
u8  v_bw_u8 
)
Parameters
v_durn_u8: The value of gyro auto sleep duration
sleep duration value
not allowed 0
4ms 1
5ms 2
8ms 3
10ms 4
15ms 5
20ms 6
40ms 7
v_bw_u8: The value of selected bandwidth
v_bw_u8 value
C_BMG160_NO_FILTER_U8X 0
C_BMG160_BW_230HZ_U8X 1
C_BMG160_BW_116HZ_u8X 2
C_BMG160_BW_47HZ_u8X 3
C_BMG160_BW_23HZ_u8X 4
C_BMG160_BW_12HZ_u8X 5
C_BMG160_BW_64HZ_u8X 6
C_BMG160_BW_32HZ_u8X 7
Note
: sleep duration depends on selected power mode and bandwidth
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMG160_RETURN_FUNCTION_TYPE bmg160_set_awake_durn ( u8  v_awake_durn_u8)
Parameters
v_awake_durn_u8: The value of awake Duration
value Duration
0x00 8 samples
0x01 16 samples
0x02 32 samples
0x03 64 samples
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_bw ( u8  v_bw_u8)
Parameters
v_bw_u8The value of gyro bandwidth
value bandwidth
0x00 BMG160_BW_500_HZ
0x01 BMG160_BW_230_HZ
0x02 BMG160_BW_116_HZ
0x03 BMG160_BW_47_HZ
0x04 BMG160_BW_23_HZ
0x05 BMG160_BW_12_HZ
0x06 BMG160_BW_64_HZ
0x07 BMG160_BW_32_HZ
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

BMG160_RETURN_FUNCTION_TYPE bmg160_set_data_enable ( u8  v_data_enable_u8)
Parameters
v_data_enable_u8: The value of data enable
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_fast_offset_enable_axis ( u8  v_channel_u8,
u8  v_fast_offset_u8 
)
Note
X_AXIS -> bit 0
Y_AXIS -> bit 1
Z_AXIS -> bit 2
Parameters
v_channel_u8The value of fast offset channel select
v_channel_u8 value
BMG160_X_AXIS 0
BMG160_Y_AXIS 1
BMG160_Z_AXIS 2
v_fast_offset_u8The value of fast offset enable
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_fifo_data_select ( u8  v_fifo_data_select_u8)
Parameters
v_fifo_data_select_u8: The value of fifo data selection
data selection value
X,Y and Z (DEFAULT) 0
X only 1
Y only 2
Z only 3
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_fifo_enable ( u8  v_fifo_enable_u8)
Parameters
v_fifo_enable_u8: The value of fifo enable
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_fifo_mode ( u8  v_fifo_mode_u8)
Parameters
v_fifo_mode_u8: The value of fifo mode
mode value
BYPASS 0
FIFO 1
STREAM 2
RESERVED 3
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_fifo_tag ( u8  v_fifo_tag_u8)
Parameters
v_fifo_tag_u8: The value of fifo tag enable
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_fifo_wm_enable ( u8  v_fifo_wm_enable_u8)
Parameters
v_fifo_wm_enable_u8: The value of fifo water mark enable
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_fifo_wm_level ( u8  v_fifo_wm_level_u8)
Parameters
v_fifo_wm_level_u8: The value of fifo water mark level
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_gp ( u8  v_param_u8,
u8  v_gp_u8 
)
Parameters
v_param_u8The value of general purpose register select
v_param_u8 value
BMG160_GP0 0
BMG160_GP1 1
v_gp_u8The value of general purpose register
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_high_bw ( u8  v_high_bw_u8)
Parameters
v_high_bw_u8: The value of high bandwidth
value Description
1 unfiltered
0 filtered
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMG160_RETURN_FUNCTION_TYPE bmg160_set_highrate_durn_axis ( u8  v_channel_u8,
u8  v_highrate_durn_axis_u8 
)
Note
X_AXIS - 0x23 bit form 0 to 7
Y_AXIS - 0x25 bit form 0 to 7
Z_AXIS - 0x27 bit form 0 to 7
Parameters
v_channel_u8The value of High Duration channel number
v_channel_u8 value
BMG160_X_AXIS 0
BMG160_Y_AXIS 1
BMG160_Z_AXIS 2
v_highrate_durn_axis_u8The value of high duration
Note
High rate duration can be calculated by using the formula
High_durn = ((1+v_highrate_durn_axis_u8)*2.5ms)
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_highrate_enable_axis ( u8  v_channel_u8,
u8  v_enable_u8 
)
Note
X_AXIS - 0x22 bit 0
Y_AXIS - 0x24 bit 0
Z_AXIS - 0x26 bit 0
Parameters
v_channel_u8: The value of high enable channel number
v_channel_u8 value
BMG160_X_AXIS 0
BMG160_Y_AXIS 1
BMG160_Z_AXIS 2
v_enable_u8The value of high axis enable
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_highrate_hyst ( u8  v_channel_u8,
u8  v_highrate_hyst_u8 
)
Note
X_AXIS - 0x22 bit 6 and 7
Y_AXIS - 0x24 bit 6 and 7
Z_AXIS - 0x26 bit 6 and 7
Parameters
v_channel_u8The value of high Hysteresis channel number
v_channel_u8 value
BMG160_X_AXIS 0
BMG160_Y_AXIS 1
BMG160_Z_AXIS 2
v_highrate_hyst_u8The value of high Hysteresis
Note
High hysteresis can be calculated by
High_hyst = ((255+256 *v_highrate_hyst_u8) * 4LSB)
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_highrate_thres ( u8  v_channel_u8,
u8  v_highrate_thres_u8 
)
Note
X_AXIS - 0x22 bit from 1 to 5
Y_AXIS - 0x24 bit from 1 to 5
Z_AXIS - 0x26 bit from 1 to 5
Parameters
v_channel_u8: The value of high threshold channel number
v_channel_u8 value
BMG160_X_AXIS 0
BMG160_Y_AXIS 1
BMG160_Z_AXIS 2
v_highrate_thres_u8the high threshold value
Note
High Threshold can be calculated by
High_thres = ((255+256 *v_highrate_thres_u8) * 4LSB)
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_i2c_wdt ( u8  v_channel_u8,
u8  v_i2c_wdt_u8 
)
Note
i2c_wdt_select -> bit 1
i2c_wdt_enable -> bit 2
Parameters
v_channel_u8The value of i2c wdt channel number
v_channel_u8 value
BMG160_I2C_WDT_ENABLE 1
BMG160_I2C_WDT_SELECT 0
v_i2c_wdt_u8The value of I2C enable and WDT select
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_intr1_any_motion ( u8  v_int1r_any_motion_u8)
Parameters
v_int1r_any_motion_u8: The value of any motion interrupt1
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_intr1_highrate ( u8  v_intr1_u8)
Parameters
v_intr1_u8: The value of interrupt1 high_rate enable
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_intr1_offset ( u8  v_axis_u8,
u8  v_intr1_offset_u8 
)
Note
int1_fast_offset -> bit 1
int1_auto_offset -> bit 3
Parameters
v_axis_u8The value of fast/auto offset interrupts selection
v_axis_u8 Data interrupt
1 BMG160_FAST_OFFSET
2 BMG160_AUTO_OFFSET
v_intr1_offset_u8The value of fast/auto offset
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_intr2_any_motion ( u8  v_intr2_any_motion_u8)
Parameters
v_intr2_any_motion_u8: The value of interrupt2 any_motion
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_intr2_highrate ( u8  v_intr2_highrate_u8)
Parameters
v_intr2_highrate_u8: The interrupt2 high_rate value
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_intr2_offset ( u8  v_axis_u8,
u8  v_intr2_offset_u8 
)
Note
int2_fast_offset -> bit 6
int2_auto_offset -> bit 4
Parameters
v_axis_u8The value of fast/auto offset interrupts selection
v_axis_u8 Data interrupt
1 BMG160_FAST_OFFSET
2 BMG160_AUTO_OFFSET
v_intr2_offset_u8The value of fast/auto offset enable
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_intr_data ( u8  v_axis_u8,
u8  v_intr_data_u8 
)
Note
INT1 -> bit 0
INT2 -> bit 7
Parameters
v_axis_u8data interrupt selection
v_axis_u8 Data interrupt
0 BMG160_INTR1_DATA
1 BMG160_INTR2_DATA
v_intr_data_u8The value of data interrupt1 or interrupt2
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_intr_fifo ( u8  v_axis_u8,
u8  v_intr_fifo_u8 
)
Note
int1_fifo -> bit 2
int2_fifo -> bit 5
Parameters
v_axis_u8The value of fifo interrupts selection
v_axis_u8 fifo interrupt
0 BMG160_INTR1
1 BMG160_INTR2
v_intr_fifo_u8the value of int1_fifo/int2_fifo enable/disable
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_intr_level ( u8  v_param_u8,
u8  v_intr_level_u8 
)
Note
INT1 -> bit 0
INT2 -> bit 2
Parameters
v_param_u8The value of Active Level selection number
v_param_u8Active Level
0 BMG160_INTR1
1 BMG160_INTR2
v_intr_level_u8The value of Active Level status value
value Active Level
1 Active HIGH
0 Active LOW
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_intr_output_type ( u8  v_param_u8,
u8  v_intr_output_type_u8 
)
Note
INT1 -> bit 1
INT2 -> bit 3
Parameters
v_param_u8The value of output type selection number
v_param_u8output type
0 BMG160_INTR1
1 BMG160_INTR2
v_intr_output_type_u8The value of output type
value output
1 open drain
0 push pull
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_latch_intr ( u8  v_latch_intr_u8)
Parameters
v_latch_intr_u8: The value of latch interrupt
Latch Interrupt Value
BMG160_NON_LATCH 0x00
BMG160_LATCH_250_MS 0x01
BMG160_LATCH_500_MS 0x02
BMG160_LATCH_1_SEC 0x03
BMG160_LATCH_2_SEC 0x04
BMG160_LATCH_4_SEC 0x05
BMG160_LATCH_8_SEC 0x06
BMG160_LATCH_LATCHED 0x07
BMG160_LATCH_NON_LATCHED 0x08
BMG160_LATCH_250_MICRO_SEC 0x09
BMG160_LATCH_500_MICRO_SEC 0x0A
BMG160_LATCH_1_MILLI_SEC 0x0B
BMG160_LATCH_12.5_MILLI_SEC 0x0C
BMG160_LATCH_25_MILLI_SEC 0x0D
BMG160_LATCH_50_MILLI_SEC 0x0E
BMG160_LATCH_LATCHED 0x0F
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_latch_stat ( u8  v_latch_stat_u8)
Parameters
v_latch_stat_u8: The value of latch status
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_nvm_load ( u8  v_nvm_load_u8)
Parameters
v_nvm_load_u8The value of nvm program
value Description
1 Do not trigger
0 Trigger
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_nvm_prog_mode ( u8  nvm_prog_mode)
Parameters
nvm_prog_modeThe value of nvm program mode
value Description
1 Unlock
0 Lock nvm write
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_nvm_prog_trig ( u8  nvm_prog_trig)
Parameters
nvm_prog_trigThe value of nvm program
value Description
1 program seq in progress
0 program seq finished
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_offset ( u8  v_axis_u8,
s16  v_offset_s16 
)
Note
X_AXIS ->
bit 0 and 1 is available in the register 0x3A bit 2 and 3
bit 2 and 3 is available in the register 0x36 bit 6 and 7
bit 4 to 11 is available in the register 0x37 bit 0 to 7
Y_AXIS ->
bit 0 is available in the register 0x3A bit 1
bit 1,2 and 3 is available in the register 0x36 bit 3,4 and 5
bit 4 to 11 is available in the register 0x38 bit 0 to 7
Z_AXIS ->
bit 0 is available in the register 0x3A bit 0
bit 1,2 and 3 is available in the register 0x36 bit 0,1 and 3
bit 4 to 11 is available in the register 0x39 bit 0 to 7
Parameters
v_axis_u8: The value of offset axis selection
v_axis_u8 value
BMG160_X_AXIS 1
BMG160_Y_AXIS 0
BMG160_Z_AXIS 0
v_offset_s16The value of offset
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_offset_rst ( u8  v_offset_rst_u8)
Parameters
v_offset_rst_u8the value of reset offset
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_offset_unfilt ( u8  v_param_u8,
u8  v_offset_unfilt_u8 
)
Note
slow_offset_unfilt -> 0x1A bit 5
fast_offset_unfilt -> 0x1B bit 7
Parameters
v_param_u8The value of fast/slow offset unfilt data selection
v_param_u8 offset selection
0 BMG160_SLOW_OFFSET
1 BMG160_FAST_OFFSET
v_offset_unfilt_u8The value of fast/slow offset unfilt data
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_offset_word_length ( u8  v_channel_u8,
u8  v_offset_word_length_u8 
)
Note
fast_offset_wordlength -> bit 4 and 5
auto_offset_wordlength -> bit 6 and 7
Parameters
v_channel_u8The value of WordLengthchannel number
v_channel_u8 value
BMG160_AUTO_OFFSET_WL 0
BMG160_FAST_OFFSET_WL 1
v_offset_word_length_u8The value of offset word length
value word length
0x00 32 samples
0x01 64 samples
0x02 128 samples
0x03 256 samples
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_pmu_ext_tri_select ( u8  v_pwu_ext_tri_select_u8)
Parameters
v_pwu_ext_tri_select_u8: The value of External Trigger selection
v_pwu_ext_tri_select_u8 Trigger source
0x00 No
0x01 INT1 pin
0x02 INT2 pin
0x03 SDO pin(SPI3 mode)
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_power_mode ( u8  v_power_mode_u8)
Parameters
v_power_mode_u8:The value of power mode
value power mode
0 BMG160_MODE_NORMAL
1 BMG160_MODE_SUSPEND
2 BMG160_MODE_DEEPSUSPEND
3 BMG160_MODE_FASTPOWERUP
4 BMG160_MODE_ADVANCEDPOWERSAVING
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

BMG160_RETURN_FUNCTION_TYPE bmg160_set_range_reg ( u8  v_range_u8)
Parameters
v_range_u8: The value of gyro range
value range
0x00 BMG160_RANGE_2000
0x01 BMG160_RANGE_1000
0x02 BMG160_RANGE_500
0x03 BMG160_RANGE_250
0x04 BMG160_RANGE_125
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMG160_RETURN_FUNCTION_TYPE bmg160_set_rst_intr ( u8  v_rst_int_u8)
Parameters
v_rst_int_u8the value of reset interrupt
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_shadow_dis ( u8  v_shadow_dis_u8)
Parameters
v_shadow_dis_u8: The value of shadow dis
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_sleep_durn ( u8  v_durn_u8)
Parameters
v_durn_u8: The value of sleep duration
sleep duration value
2ms 0
4ms 1
5ms 2
8ms 3
10ms 4
15ms 5
18ms 6
20ms 7
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMG160_RETURN_FUNCTION_TYPE bmg160_set_slow_offset_durn ( u8  v_offset_durn_u8)
Parameters
v_offset_durn_u8: The value of Slow Offset duration
value Duration
0x00 40ms
0x01 80ms
0x02 160ms
0x03 320ms
0x04 640ms
0x05 1280ms
0x06 unused
0x07 unused
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_slow_offset_enable_axis ( u8  v_channel_u8,
u8  v_slow_offset_u8 
)
Note
X_AXIS -> bit 0
Y_AXIS -> bit 1
Z_AXIS -> bit 2
Parameters
v_channel_u8The value of slow offset channel number
v_channel_u8 value
BMG160_X_AXIS 0
BMG160_Y_AXIS 1
BMG160_Z_AXIS 2
v_slow_offset_u8The slow offset value
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_slow_offset_thres ( u8  v_offset_thres_u8)
Parameters
v_offset_thres_u8: The value of slow offset Threshold
value threshold
0x00 0.1 degree/sec
0x01 0.2 degree/sec
0x02 0.5 degree/sec
0x03 1 degree/sec
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_soft_rst ( void  )

This function is used for the soft reset The soft reset register will be written with 0xB6 in the register 0x14.

Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_spi3 ( u8  v_spi3_u8)
Parameters
v_spi3_u8: The value of spi3 enable
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_set_unfilt_data ( u8  v_param_u8,
u8  v_unfilt_data_u8 
)
Note
any_unfilt_data -> bit 1
high_unfilt_data -> bit 3
Parameters
v_param_u8The value of any/high offset unfilt data selection
v_param_u8 offset selection
1 BMG160_HIGHRATE_UNFILT_DATA
3 BMG160_ANY_MOTION_UNFILT_DATA
v_unfilt_data_u8The value of any/high unfilt data
value Description
1 BMG160_ENABLE
0 BMG160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMG160_RETURN_FUNCTION_TYPE bmg160_write_register ( u8  v_addr_u8,
u8 v_data_u8,
u8  v_len_u8 
)
Parameters
v_addr_u8-> Address of the register
v_data_u8-> The data from the register
v_len_u8-> no of bytes to read
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

All rights reserved. The use is subject to the XDK SDK EULA by Bosch Connected Devices and Solutions GmbH.
This documentation file has been automatically generated on Thu Mar 14 2019 19:12:42 by doxygen 1.8.8