XDK API  3.6.0
Documentation
Functions | Variables
bmi160.c File Reference
#include "bmi160.h"
+ Include dependency graph for bmi160.c:

Functions

BMI160_RETURN_FUNCTION_TYPE bmi160_accel_foc_trigger_xyz (u8 v_foc_accel_x_u8, u8 v_foc_accel_y_u8, u8 v_foc_accel_z_u8, s8 *v_accel_off_x_s8, s8 *v_accel_off_y_s8, s8 *v_accel_off_z_s8)
 This API write fast accel offset compensation it writes all axis together.To the register 0x69 bit 0 to 5 FOC_X_AXIS - bit 4 and 5 FOC_Y_AXIS - bit 2 and 3 FOC_Z_AXIS - bit 0 and 1. More...
 
s32 bmi160_bmm150_mag_compensate_X (s16 v_mag_data_x_s16, u16 v_data_r_u16)
 This API used to get the compensated BMM150-X data the out put of X as s32 Before start reading the mag compensated X data make sure the following two points are addressed. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_bmm150_mag_compensate_xyz (struct bmi160_mag_xyz_s32_t *mag_comp_xyz)
 This function used for read the compensated value of mag Before start reading the mag compensated data's make sure the following two points are addressed. More...
 
s32 bmi160_bmm150_mag_compensate_Y (s16 v_mag_data_y_s16, u16 v_data_r_u16)
 This API used to get the compensated BMM150-Y data the out put of Y as s32 Before start reading the mag compensated Y data make sure the following two points are addressed. More...
 
s32 bmi160_bmm150_mag_compensate_Z (s16 v_mag_data_z_s16, u16 v_data_r_u16)
 This API used to get the compensated BMM150-Z data the out put of Z as s32 Before start reading the mag compensated Z data make sure the following two points are addressed. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_bmm150_mag_interface_init (u8 *v_chip_id_u8)
 This function used for initialize the bmm150 sensor. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_bmm150_mag_set_power_mode (u8 v_mag_pow_mode_u8)
 This function used for set the magnetometer power mode. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_bmm150_mag_wakeup (void)
 This function used for set the mag power control bit enable. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_clear_step_counter (void)
 This API used to clear the step counter interrupt interrupt. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_fifo_data (u8 *v_fifodata_u8, u16 v_fifo_length_u16)
 This API reads the fifo data of the sensor from the register 0x24. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_fifo_length (u32 *v_fifo_length_u32)
 This API reads the of the sensor form the register 0x23 and 0x24 bit 0 to 7 and 0 to 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_bw (u8 *v_bw_u8)
 This API is used to get the accel bandwidth from the register 0x40 bit 4 to 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_data_rdy (u8 *v_data_rdy_u8)
 This API reads the status of accel data ready form the register 0x1B bit 7 The status get reset when accel data register read out. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_fifo_filter_data (u8 *accel_fifo_filter_u8)
 This API is used to read accel fifo filter data from the register 0x45 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_offset_compensation_xaxis (s8 *v_accel_off_x_s8)
 This API read accel manual offset compensation of x axis from the register 0x71 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_offset_compensation_yaxis (s8 *v_accel_off_y_s8)
 This API read accel manual offset compensation of y axis from the register 0x72 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_offset_compensation_zaxis (s8 *v_accel_off_z_s8)
 This API read accel manual offset compensation of z axis from the register 0x73 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_offset_enable (u8 *v_accel_off_enable_u8)
 This API read the accel offset enable bit from the register 0x77 bit 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_output_data_rate (u8 *v_output_data_rate_u8)
 This API is used to get the accel output date rate form the register 0x40 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_power_mode_stat (u8 *v_accel_power_mode_stat_u8)
 This API reads the accelerometer power mode from PMU status register 0x03 bit 4 and 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_range (u8 *v_range_u8)
 This API is used to get the ranges (g values) of the accel from the register 0x41 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_selftest_amp (u8 *v_accel_selftest_amp_u8)
 This API read accel self test amplitude from the register 0x6D bit 3 select amplitude of the selftest deflection: More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_selftest_axis (u8 *v_accel_selftest_axis_u8)
 This API read accel select axis to be self-test. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_selftest_sign (u8 *v_accel_selftest_sign_u8)
 This API read accel self test axis sign from the register 0x6D bit 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_under_sampling_parameter (u8 *v_accel_under_sampling_u8)
 This API is used to get the accel under sampling parameter form the register 0x40 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_data_rdy_mag (u8 *v_data_rdy_u8)
 This API reads the status of mag data ready from the register 0x1B bit 5 The status get reset when one mag data register is read out. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_drop_cmd_err (u8 *v_drop_cmd_err_u8)
 This API Reads the dropped command error from the register 0x02 bit 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_err_code (u8 *v_err_code_u8)
 This API used to read the error code from register 0x02 bit 1 to 4. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_error_status (u8 *v_fatal_er_u8r, u8 *v_err_code_u8, u8 *v_i2c_fail_err_u8, u8 *v_drop_cmd_err_u8, u8 *v_mag_data_rdy_err_u8)
 This API reads the error status from the error register 0x02 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fatal_err (u8 *v_fatal_err_u8)
 This API used to reads the fatal error from the Register 0x02 bit 0 This flag will be reset only by power-on-reset and soft reset. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_accel_enable (u8 *v_fifo_accel_u8)
 This API is used to read stored accel data in FIFO (all 3 axes) from the register 0x47 bit 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_down_accel (u8 *v_fifo_down_u8)
 This API is used to read Down sampling for accel (2*downs_accel) from the register 0x45 bit 4 to 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_down_gyro (u8 *v_fifo_down_gyro_u8)
 This API is used to read Down sampling for gyro (2**downs_gyro) in the register 0x45 bit 0 to 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_gyro_enable (u8 *v_fifo_gyro_u8)
 This API is used to read stored gyro data in FIFO (all 3 axes) from the resister 0x47 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_header_enable (u8 *v_fifo_header_u8)
 This API reads FIFO frame header enable from the register 0x47 bit 4. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_mag_enable (u8 *v_fifo_mag_u8)
 This API is used to read stored magnetometer data in FIFO (all 3 axes) from the register 0x47 bit 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_tag_intr1_enable (u8 *v_fifo_tag_intr1_u8)
 This API get FIFO tag interrupt1 enable status from the resister 0x47 bit 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_tag_intr2_enable (u8 *v_fifo_tag_intr2_u8)
 This API reads FIFO tag interrupt2 enable status from the resister 0x47 bit 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_time_enable (u8 *v_fifo_time_enable_u8)
 This API reads fifo sensor time frame after the last valid data frame form the register 0x47 bit 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_wm (u8 *v_fifo_wm_u8)
 This API is used to Trigger an interrupt when FIFO contains water mark level from the register 0x46 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_accel_x (u8 *v_foc_accel_x_u8)
 This API read accel offset compensation target value for x-axis is from the register 0x69 bit 4 and 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_accel_y (u8 *v_foc_accel_y_u8)
 This API read accel offset compensation target value for y-axis from the register 0x69 bit 2 and 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_accel_z (u8 *v_foc_accel_z_u8)
 This API read accel offset compensation target value for z-axis from the register 0x69 bit 0 and 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_gyro_enable (u8 *v_foc_gyro_u8)
 This API read gyro fast offset enable from the register 0x69 bit 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_rdy (u8 *v_foc_rdy_u8)
 This API reads the fast offset compensation status form the register 0x1B bit 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_bw (u8 *v_bw_u8)
 This API is used to get the data of gyro from the register 0x42 bit 4 to 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_data_rdy (u8 *v_data_rdy_u8)
 This API reads the status of gyro data ready form the register 0x1B bit 6 The status get reset when gyro data register read out. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_fifo_filter_data (u8 *v_gyro_fifo_filter_data_u8)
 This API is used to read gyro fifo filter data from the register 0x45 bit 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_offset_compensation_xaxis (s16 *v_gyro_off_x_s16)
 This API read gyro manual offset compensation of x axis from the register 0x74 bit 0 to 7 and 0x77 bit 0 and 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_offset_compensation_yaxis (s16 *v_gyro_off_y_s16)
 This API read gyro manual offset compensation of y axis from the register 0x75 bit 0 to 7 and 0x77 bit 2 and 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_offset_compensation_zaxis (s16 *v_gyro_off_z_s16)
 This API read gyro manual offset compensation of z axis from the register 0x76 bit 0 to 7 and 0x77 bit 4 and 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_offset_enable (u8 *v_gyro_off_enable_u8)
 This API read the accel offset enable bit from the register 0x77 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_output_data_rate (u8 *v_output_data_rate_u8)
 This API is used to get the gyroscope output data rate from the register 0x42 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_power_mode_stat (u8 *v_gyro_power_mode_stat_u8)
 This API reads the gyroscope power mode from PMU status register 0x03 bit 2 and 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_range (u8 *v_range_u8)
 This API reads the range of gyro from the register 0x43 bit 0 to 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_selftest (u8 *v_gyro_selftest_u8)
 This API reads the Gyroscope self test status from the register 0x1B bit 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_selftest_start (u8 *v_gyro_selftest_start_u8)
 This API read gyro self test trigger. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_sleep_state (u8 *v_gyro_sleep_state_u8)
 This API read Target state for gyro sleep mode from the register 0x6C bit 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_sleep_trigger (u8 *v_gyro_sleep_trigger_u8)
 This API read gyro sleep trigger from the register 0x6C bit 0 to 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_wakeup_intr (u8 *v_gyro_wakeup_intr_u8)
 This API read gyro wakeup interrupt from the register 0x6C bit 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_wakeup_trigger (u8 *v_gyro_wakeup_trigger_u8)
 This API read gyro wakeup trigger from the register 0x6C bit 3 and 4. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_i2c_device_addr (u8 *v_i2c_device_addr_u8)
 This API is used to read I2C device address of auxiliary mag from the register 0x4B bit 1 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_i2c_fail_err (u8 *v_i2c_err_code_u8)
 This API Reads the i2c error code from the Register 0x02 bit 5. This error occurred in I2C master detected. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_i2c_wdt_enable (u8 *v_i2c_wdt_u8)
 This API read I2C watchdog enable from the register 0x70 bit 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_i2c_wdt_select (u8 *v_i2c_wdt_u8)
 This API read I2C Watchdog timer from the register 0x70 bit 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_if_mode (u8 *v_if_mode_u8)
 This API read I2C interface configuration(if) moe from the register 0x6B bit 4 and 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_input_enable (u8 v_channel_u8, u8 *v_input_en_u8)
 API used to get input enable for interrupt1 and interrupt2 pin from the register 0x54. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_any_motion (u8 v_channel_u8, u8 *v_intr_any_motion_u8)
 Reads the Any motion interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_any_motion_durn (u8 *v_any_motion_durn_u8)
 This API reads any motion duration from the register 0x5F bit 0 and 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_any_motion_thres (u8 *v_any_motion_thres_u8)
 This API is used to read threshold definition for the any-motion interrupt from the register 0x60 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_data_rdy (u8 v_channel_u8, u8 *v_intr_data_rdy_u8)
 Reads Data Ready interrupt mapped to interrupt1 and interrupt2 form the register 0x56. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_double_tap (u8 v_channel_u8, u8 *v_intr_double_tap_u8)
 Reads the Double Tap interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_edge_ctrl (u8 v_channel_u8, u8 *v_intr_edge_ctrl_u8)
 Configure trigger condition of interrupt1 and interrupt2 pin from the register 0x53. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_enable_0 (u8 v_enable_u8, u8 *v_intr_enable_zero_u8)
 This API is used to read interrupt enable from the register 0x50 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_enable_1 (u8 v_enable_u8, u8 *v_intr_enable_1_u8)
 This API is used to read interrupt enable byte1 from the register 0x51 bit 0 to 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_enable_2 (u8 v_enable_u8, u8 *v_intr_enable_2_u8)
 This API is used to read interrupt enable byte2 from the register bit 0x52 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_fifo_full (u8 v_channel_u8, u8 *v_intr_fifo_full_u8)
 Reads FIFO Full interrupt mapped to interrupt1 and interrupt2 form the register 0x56 bit 5 and 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_fifo_wm (u8 v_channel_u8, u8 *v_intr_fifo_wm_u8)
 Reads FIFO Watermark interrupt mapped to interrupt1 and interrupt2 form the register 0x56 bit 6 and 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_flat (u8 v_channel_u8, u8 *v_intr_flat_u8)
 Reads the Flat interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_flat_hold (u8 *v_flat_hold_u8)
 This API read Flat interrupt hold time; from the register 0x68 bit 4 and 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_flat_hyst (u8 *v_flat_hyst_u8)
 This API read flat interrupt hysteresis from the register 0x68 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_flat_theta (u8 *v_flat_theta_u8)
 This API read Flat angle (0 to 44.8) for flat interrupt from the register 0x67 bit 0 to 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_high_g (u8 v_channel_u8, u8 *v_intr_high_g_u8)
 Reads the HIGH g interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_high_g_durn (u8 *v_high_g_durn_u8)
 This API is used to read Delay time definition for the high-g interrupt from the register 0x5D bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_high_g_hyst (u8 *v_high_g_hyst_u8)
 This API reads High-g interrupt hysteresis from the register 0x5C bit 6 and 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_high_g_thres (u8 *v_high_g_thres_u8)
 This API is used to read Threshold definition for the high-g interrupt from the register 0x5E 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_level (u8 v_channel_u8, u8 *v_intr_level_u8)
 API used for get the Configure level condition of interrupt1 and interrupt2 pin form the register 0x53. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g (u8 v_channel_u8, u8 *v_intr_low_g_u8)
 reads the Low g interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57 More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g_durn (u8 *v_low_g_durn_u8)
 This API is used to read the low_g duration from register 0x5A bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g_hyst (u8 *v_low_hyst_u8)
 This API Reads Low-g interrupt hysteresis from the register 0x5C bit 0 to 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g_mode (u8 *v_low_g_mode_u8)
 This API reads Low-g interrupt mode from the register 0x5C bit 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g_thres (u8 *v_low_g_thres_u8)
 This API is used to read Threshold definition for the low-g interrupt from the register 0x5B bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_high_source (u8 *v_low_high_source_u8)
 This API Reads Data source for the interrupt engine for the low and high g interrupts from the register 0x58 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_motion_source (u8 *v_motion_source_u8)
 This API reads Data source for the interrupt engine for the nomotion and anymotion interrupts from the register 0x59 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_nomotion (u8 v_channel_u8, u8 *v_intr_nomotion_u8)
 Reads the No motion interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient (u8 v_channel_u8, u8 *v_intr_orient_u8)
 Reads the Orient interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_axes_enable (u8 *v_orient_axes_u8)
 This API read orientation axes changes from the register 0x66 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_blocking (u8 *v_orient_blocking_u8)
 This API read the orient blocking mode that is used for the generation of the orientation interrupt. from the register 0x65 bit 2 and 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_hyst (u8 *v_orient_hyst_u8)
 This API read Orient interrupt hysteresis, from the register 0x64 bit 4 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_mode (u8 *v_orient_mode_u8)
 This API read the threshold for orientation interrupt from the register 0x65 bit 0 and 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_theta (u8 *v_orient_theta_u8)
 This API read Orient blocking angle (0 to 44.8) from the register 0x66 bit 0 to 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_ud_enable (u8 *v_orient_ud_u8)
 This API read orient change of up/down bit from the register 0x66 bit 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_output_type (u8 v_channel_u8, u8 *v_intr_output_type_u8)
 API used to get configured output enable of interrupt1 and interrupt2 from the register 0x53. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_pmu_trig (u8 v_channel_u8, u8 *v_intr_pmu_trig_u8)
 Reads PMU trigger interrupt mapped to interrupt1 and interrupt2 form the register 0x56 bit 0 and 4. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_significant_motion_proof (u8 *v_significant_motion_proof_u8)
 This API is used to read the significant proof time from the register 0x62 bit 4 and 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_significant_motion_select (u8 *v_intr_significant_motion_select_u8)
 This API is used to select the significant or any motion interrupt from the register 0x62 bit 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_significant_motion_skip (u8 *v_int_sig_mot_skip_u8)
 This API is used to read the significant skip time from the register 0x62 bit 2 and 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_single_tap (u8 v_channel_u8, u8 *v_intr_single_tap_u8)
 Reads the Single Tap interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_slow_no_motion_durn (u8 *v_slow_no_motion_u8)
 This API read Slow/no-motion interrupt trigger delay duration from the register 0x5F bit 2 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_slow_no_motion_select (u8 *v_intr_slow_no_motion_select_u8)
 This API is used to read the slow/no-motion selection from the register 0x62 bit 0. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_slow_no_motion_thres (u8 *v_slow_no_motion_thres_u8)
 This API is used to read threshold for the slow/no-motion interrupt from the register 0x61 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_durn (u8 *v_tap_durn_u8)
 This API is used to get the tap duration from the register 0x63 bit 0 to 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_quiet (u8 *v_tap_quiet_u8)
 This API read tap quiet duration from the register 0x63 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_shock (u8 *v_tap_shock_u8)
 This API read the tap shock duration from the register 0x63 bit 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_source (u8 *v_tap_source_u8)
 This API reads data source for the interrupt engine for the single and double tap interrupts from the register 0x58 bit 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_thres (u8 *v_tap_thres_u8)
 This API read Threshold of the single/double tap interrupt from the register 0x64 bit 0 to 4. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_latch_intr (u8 *v_latch_intr_u8)
 This API is used to get the latch duration from the register 0x54 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_burst (u8 *v_mag_burst_u8)
 This API is used to read Burst data length (1,2,6,8 byte) from the register 0x4C bit 0 to 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_data_rdy_err (u8 *v_mag_data_rdy_err_u8)
 This API reads the magnetometer data ready interrupt not active. It reads from the error register 0x0x2 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_manual_enable (u8 *v_mag_manual_u8)
 This API is used to read Enable register access on MAG_IF[2] or MAG_IF[3] writes. This implies that the DATA registers are not updated with magnetometer values. Accessing magnetometer requires the magnetometer in normal mode in PMU_STATUS. from the register 0x4C bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_manual_operation_stat (u8 *v_mag_manual_stat_u8)
 This API reads the status of mag manual interface operation form the register 0x1B bit 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_offset (u8 *v_mag_offset_u8)
 This API is used to read trigger-readout offset in units of 2.5 ms. If set to zero, the offset is maximum, i.e. after readout a trigger is issued immediately. from the register 0x4C bit 2 to 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_output_data_rate (u8 *v_output_data_rate_u8)
 This API is used to get the output data rate of magnetometer from the register 0x44 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_power_mode_stat (u8 *v_mag_power_mode_stat_u8)
 This API reads the magnetometer power mode from PMU status register 0x03 bit 0 and 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_read_addr (u8 *v_mag_read_addr_u8)
 This API is used to read data magnetometer address to read from the register 0x4D bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_write_addr (u8 *v_mag_write_addr_u8)
 This API is used to read magnetometer write address from the register 0x4E bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_write_data (u8 *v_mag_write_data_u8)
 This API is used to read magnetometer write data form the resister 0x4F bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_nvm_counter (u8 *v_nvm_counter_u8)
 This API read the NVM counter form register 0x70 bit 4 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_nvm_prog_enable (u8 *v_nvm_prog_u8)
 This API read NVM program enable from the register 0x6A bit 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_nvm_rdy (u8 *v_nvm_rdy_u8)
 This API Reads the nvm_rdy status from the resister 0x1B bit 4. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_output_enable (u8 v_channel_u8, u8 *v_output_enable_u8)
 API used to get the Output enable for interrupt1 and interrupt2 pin from the register 0x53. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_paging_enable (u8 *v_page_enable_u8)
 This API read page enable from the register 0x7F bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_pullup_configuration (u8 *v_control_pullup_u8)
 This API read pull up configuration from the register 0X85 bit 4 an 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_sensor_time (u32 *v_sensor_time_u32)
 This API reads sensor_time from the register 0x18 to 0x1A. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_spare0_trim (u8 *v_spare0_trim_u8)
 This API read the spare zero form register 0x70 bit 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_spi3 (u8 *v_spi3_u8)
 This API read to configure SPI Interface Mode for primary and OIS interface from the register 0x6B bit 0. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_spi_enable (u8 *v_spi_enable_u8)
 This API read primary interface selection I2C or SPI from the register 0x70 bit 0. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_any_motion_intr (u8 *v_any_motion_intr_u8)
 This API reads the any motion interrupt status from the register 0x1C bit 2 flag is associated with a specific interrupt function. It is set when the single tab interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_double_tap_intr (u8 *v_double_tap_intr_u8)
 This API reads the double tab status from the register 0x1C bit 4 flag is associated with a specific interrupt function. It is set when the single tab interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_flat_intr (u8 *v_flat_intr_u8)
 This API reads the flat interrupt status from the register 0x1C bit 7 flag is associated with a specific interrupt function. It is set when the flat interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_orient_intr (u8 *v_orient_intr_u8)
 This API reads the orient status from the register 0x1C bit 6 flag is associated with a specific interrupt function. It is set when the orient interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_pmu_trigger_intr (u8 *v_pmu_trigger_intr_u8)
 This API reads the power mode trigger interrupt status from the register 0x1C bit 3 flag is associated with a specific interrupt function. It is set when the single tab interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_significant_intr (u8 *v_significant_intr_u8)
 This API reads the significant motion interrupt status from the register 0x1C bit 1 flag is associated with a specific interrupt function. It is set when the single tab interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_single_tap_intr (u8 *v_single_tap_intr_u8)
 This API reads the single tab status from the register 0x1C bit 5 flag is associated with a specific interrupt function. It is set when the single tab interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_step_intr (u8 *v_step_intr_u8)
 This API reads the step detector interrupt status from the register 0x1C bit 0 flag is associated with a specific interrupt function. It is set when the single tab interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_data_rdy_intr (u8 *v_data_rdy_intr_u8)
 This API reads data ready interrupt status from the register 0x1D bit 4 flag is associated with a specific interrupt function. It is set when the data ready interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_fifo_full_intr (u8 *v_fifo_full_intr_u8)
 This API reads data ready FIFO full interrupt status from the register 0x1D bit 5 flag is associated with a specific interrupt function. It is set when the FIFO full interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_fifo_wm_intr (u8 *v_fifo_wm_intr_u8)
 This API reads data ready FIFO watermark interrupt status from the register 0x1D bit 6 flag is associated with a specific interrupt function. It is set when the FIFO watermark interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_high_g_intr (u8 *v_high_g_intr_u8)
 This API reads the high_g interrupt status from the register 0x1D bit 2 flag is associated with a specific interrupt function. It is set when the high g interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_low_g_intr (u8 *v_low_g_intr_u8)
 This API reads the low g interrupt status from the register 0x1D bit 3 flag is associated with a specific interrupt function. It is set when the low g interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_nomotion_intr (u8 *v_nomotion_intr_u8)
 This API reads data ready no motion interrupt status from the register 0x1D bit 7 flag is associated with a specific interrupt function. It is set when the no motion interrupt triggers. The setting of INT_LATCH controls if the interrupt signal and hence the respective interrupt flag will be permanently latched, temporarily latched or not latched. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_any_motion_first_x (u8 *v_anymotion_first_x_u8)
 This API reads the status of any motion first x from the register 0x1E bit 0. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_any_motion_first_y (u8 *v_any_motion_first_y_u8)
 This API reads the status of any motion first y interrupt from the register 0x1E bit 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_any_motion_first_z (u8 *v_any_motion_first_z_u8)
 This API reads the status of any motion first z interrupt from the register 0x1E bit 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_any_motion_sign (u8 *v_anymotion_sign_u8)
 This API reads the any motion sign status from the register 0x1E bit 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_tap_first_x (u8 *v_tap_first_x_u8)
 This API reads the any motion tap first x status from the register 0x1E bit 4. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_tap_first_y (u8 *v_tap_first_y_u8)
 This API reads the tap first y interrupt status from the register 0x1E bit 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_tap_first_z (u8 *v_tap_first_z_u8)
 This API reads the tap first z interrupt status from the register 0x1E bit 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_tap_sign (u8 *v_tap_sign_u8)
 This API reads the tap sign status from the register 0x1E bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_flat (u8 *v_flat_u8)
 This API reads the flat status from the register 0x1F bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_high_g_first_x (u8 *v_high_g_first_x_u8)
 This API reads the high_g first x status from the register 0x1F bit 0. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_high_g_first_y (u8 *v_high_g_first_y_u8)
 This API reads the high_g first y status from the register 0x1F bit 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_high_g_first_z (u8 *v_high_g_first_z_u8)
 This API reads the high_g first z status from the register 0x1F bit 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_high_g_sign (u8 *v_high_g_sign_u8)
 This API reads the high sign status from the register 0x1F bit 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_orient_xy (u8 *v_orient_xy_u8)
 This API reads the status of orient_xy plane from the register 0x1F bit 4 and 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_orient_z (u8 *v_orient_z_u8)
 This API reads the status of orient z plane from the register 0x1F bit 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_step_config (u16 *v_step_config_u16)
 This API Reads step counter configuration from the register 0x7A bit 0 to 7 and from the register 0x7B bit 0 to 2 and 4 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_step_counter_enable (u8 *v_step_counter_u8)
 This API read enable step counter from the register 0x7B bit 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_step_detector_enable (u8 *v_step_intr_u8)
 This API is used to read interrupt enable step detector interrupt from the register bit 0x52 bit 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_target_page (u8 *v_target_page_u8)
 This API read target page from the register 0x7F bit 4 and 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_get_temp (s16 *v_temp_s16)
 This API reads the temperature of the sensor from the register 0x21 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_init (struct bmi160_t *bmi160)
 This function is used for initialize bus read and bus write functions assign the chip id and device address chip id is read in the register 0x00 bit from 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_map_significant_motion_intr (u8 v_significant_u8)
 This API used to trigger the signification motion interrupt. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_map_step_detector_intr (u8 v_step_detector_u8)
 This API used to trigger the step detector interrupt. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_gyro_sensor_time (u8 accel_gyro_sensortime_select, struct bmi160_sensortime_accel_gyro_data *accel_gyro_sensor_time)
 This API reads sensor_time ,Accel data ,Gyro data from the register 0x0C to 0x1A. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_x (s16 *v_accel_x_s16)
 This API reads accelerometer data X values form the register 0x12 and 0x13. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_xyz (struct bmi160_accel_t *accel)
 This API reads accelerometer data X,Y,Z values from the register 0x12 to 0x17. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_y (s16 *v_accel_y_s16)
 This API reads accelerometer data Y values form the register 0x14 and 0x15. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_z (s16 *v_accel_z_s16)
 This API reads accelerometer data Z values form the register 0x16 and 0x17. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_bmm150_mag_trim (void)
 This function used for read the trim values of magnetometer. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_fifo_header_data (u8 v_mag_if_u8, struct bmi160_fifo_data_header_t *header_data)
 This function used for reading the fifo data of header mode. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_fifo_header_data_user_defined_length (u16 v_fifo_user_length_u16, u8 v_mag_if_mag_u8, struct bmi160_fifo_data_header_t *fifo_header_data)
 This function used for reading the fifo data of header mode for using user defined length. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_fifo_headerless_mode (u8 v_mag_if_u8, struct bmi160_fifo_data_header_less_t *headerless_data)
 This function used for reading the fifo data of header less mode. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_fifo_headerless_mode_user_defined_length (u16 v_fifo_user_length_u16, struct bmi160_fifo_data_header_less_t *fifo_data, u8 v_mag_if_mag_u8)
 This function used for reading the fifo data of header less mode for using user defined length. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_gyro_x (s16 *v_gyro_x_s16)
 This API reads gyro data X values form the register 0x0C and 0x0D. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_gyro_xyz (struct bmi160_gyro_t *gyro)
 This API reads gyro data X,Y,Z values from the register 0x0C to 0x11. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_gyro_y (s16 *v_gyro_y_s16)
 This API reads gyro data Y values form the register 0x0E and 0x0F. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_gyro_z (s16 *v_gyro_z_s16)
 This API reads gyro data Z values form the register 0x10 and 0x11. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_r (s16 *v_mag_r_s16)
 This API reads magnetometer data RHALL values from the register 0x0A and 0x0B. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_x (s16 *v_mag_x_s16, u8 v_sensor_select_u8)
 This API reads magnetometer data X values from the register 0x04 and 0x05. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_xyz (struct bmi160_mag_t *mag, u8 v_sensor_select_u8)
 This API reads magnetometer data X,Y,Z values from the register 0x04 to 0x09. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_xyzr (struct bmi160_mag_xyzr_t *mag)
 This API reads magnetometer data X,Y,Z,r values from the register 0x04 to 0x0B. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_y (s16 *v_mag_y_s16, u8 v_sensor_select_u8)
 This API reads magnetometer data Y values from the register 0x06 and 0x07. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_z (s16 *v_mag_z_s16, u8 v_sensor_select_u8)
 This API reads magnetometer data Z values from the register 0x08 and 0x09. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_reg (u8 v_addr_u8, u8 *v_data_u8, u8 v_len_u8)
 This API reads the data from the given register. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_read_step_count (s16 *v_step_cnt_s16)
 This API reads step counter value form the register 0x78 and 0x79. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_second_if_mag_compensate_xyz (struct bmi160_mag_fifo_data_t mag_fifo_data, u8 v_mag_second_if_u8)
 This function used for reading the compensated data of mag secondary interface xyz data. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_bw (u8 v_bw_u8)
 This API is used to set the accel bandwidth from the register 0x40 bit 4 to 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_fifo_filter_data (u8 v_accel_fifo_filter_u8)
 This API is used to set accel fifo filter data from the register 0x45 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_foc_trigger (u8 v_axis_u8, u8 v_foc_accel_u8, s8 *v_accel_offset_s8)
 This API writes accel fast offset compensation from the register 0x69 bit 0 to 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_offset_compensation_xaxis (s8 v_accel_off_x_s8)
 This API write accel manual offset compensation of x axis from the register 0x71 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_offset_compensation_yaxis (s8 v_accel_off_y_s8)
 This API write accel manual offset compensation of y axis from the register 0x72 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_offset_compensation_zaxis (s8 v_accel_off_z_s8)
 This API write accel manual offset compensation of z axis from the register 0x73 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_offset_enable (u8 v_accel_off_enable_u8)
 This API write the accel offset enable bit from the register 0x77 bit 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_output_data_rate (u8 v_output_data_rate_u8, u8 v_accel_bw_u8)
 This API is used to set the accel output date rate form the register 0x40 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_range (u8 v_range_u8)
 This API is used to set the ranges (g values) of the accel from the register 0x41 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_selftest_amp (u8 v_accel_selftest_amp_u8)
 This API write accel self test amplitude from the register 0x6D bit 3 select amplitude of the selftest deflection: More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_selftest_axis (u8 v_accel_selftest_axis_u8)
 This API write accel select axis to be self-test. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_selftest_sign (u8 v_accel_selftest_sign_u8)
 This API write accel self test axis sign from the register 0x6D bit 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_under_sampling_parameter (u8 v_accel_under_sampling_u8)
 This API is used to set the accel under sampling parameter form the register 0x40 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_bmm150_mag_and_secondary_if_power_mode (u8 v_mag_sec_if_pow_mode_u8)
 This function used for set the magnetometer power mode. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_bmm150_mag_presetmode (u8 v_mode_u8)
 This API used to set the pre-set modes of bmm150 The pre-set mode setting is depend on data rate and xy and z repetitions. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_command_register (u8 v_command_reg_u8)
 This API writes value to the register 0x7E bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_accel_enable (u8 v_fifo_accel_u8)
 This API is used to set stored accel data in FIFO (all 3 axes) from the register 0x47 bit 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_down_accel (u8 v_fifo_down_u8)
 This API is used to set Down sampling for accel (2*downs_accel) from the register 0x45 bit 4 to 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_down_gyro (u8 v_fifo_down_gyro_u8)
 This API is used to set Down sampling for gyro (2**downs_gyro) in the register 0x45 bit 0 to 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_gyro_enable (u8 v_fifo_gyro_u8)
 This API is used to set stored gyro data in FIFO (all 3 axes) from the resister 0x47 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_header_enable (u8 v_fifo_header_u8)
 This API set FIFO frame header enable from the register 0x47 bit 4. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_mag_enable (u8 v_fifo_mag_u8)
 This API is used to set stored magnetometer data in FIFO (all 3 axes) from the register 0x47 bit 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_tag_intr1_enable (u8 v_fifo_tag_intr1_u8)
 This API set FIFO tag interrupt1 enable status from the resister 0x47 bit 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_tag_intr2_enable (u8 v_fifo_tag_intr2_u8)
 This API set FIFO tag interrupt2 enable status from the resister 0x47 bit 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_time_enable (u8 v_fifo_time_enable_u8)
 This API set fifo sensor time frame after the last valid data frame form the register 0x47 bit 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_wm (u8 v_fifo_wm_u8)
 This API is used to Trigger an interrupt when FIFO contains water mark level from the register 0x46 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_foc_accel_x (u8 v_foc_accel_x_u8)
 This API write accel offset compensation target value for x-axis is from the register 0x69 bit 4 and 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_foc_accel_y (u8 v_foc_accel_y_u8)
 This API write accel offset compensation target value for y-axis from the register 0x69 bit 2 and 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_foc_accel_z (u8 v_foc_accel_z_u8)
 This API write accel offset compensation target value for z-axis from the register 0x69 bit 0 and 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_foc_gyro_enable (u8 v_foc_gyro_u8, s16 *v_gyro_off_x_s16, s16 *v_gyro_off_y_s16, s16 *v_gyro_off_z_s16)
 This API write gyro fast offset enable from the register 0x69 bit 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_bw (u8 v_bw_u8)
 This API is used to set the data of gyro from the register 0x42 bit 4 to 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_fifo_filter_data (u8 v_gyro_fifo_filter_data_u8)
 This API is used to set gyro fifo filter data from the register 0x45 bit 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_offset_compensation_xaxis (s16 v_gyro_off_x_s16)
 This API write gyro manual offset compensation of x axis from the register 0x74 bit 0 to 7 and 0x77 bit 0 and 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_offset_compensation_yaxis (s16 v_gyro_off_y_s16)
 This API write gyro manual offset compensation of y axis from the register 0x75 bit 0 to 7 and 0x77 bit 2 and 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_offset_compensation_zaxis (s16 v_gyro_off_z_s16)
 This API write gyro manual offset compensation of z axis from the register 0x76 bit 0 to 7 and 0x77 bit 4 and 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_offset_enable (u8 v_gyro_off_enable_u8)
 This API write the accel offset enable bit from the register 0x77 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_output_data_rate (u8 v_output_data_rate_u8)
 This API is used to set the gyroscope output data rate from the register 0x42 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_range (u8 v_range_u8)
 This API set the range of gyro from the register 0x43 bit 0 to 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_selftest_start (u8 v_gyro_selftest_start_u8)
 This API write gyro self test trigger. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_sleep_state (u8 v_gyro_sleep_state_u8)
 This API write Target state for gyro sleep mode from the register 0x6C bit 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_sleep_trigger (u8 v_gyro_sleep_trigger_u8)
 This API write gyro sleep trigger from the register 0x6C bit 0 to 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_wakeup_intr (u8 v_gyro_wakeup_intr_u8)
 This API write gyro wakeup interrupt from the register 0x6C bit 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_wakeup_trigger (u8 v_gyro_wakeup_trigger_u8)
 This API write gyro wakeup trigger from the register 0x6C bit 3 and 4. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_i2c_device_addr (u8 v_i2c_device_addr_u8)
 This API is used to set I2C device address of auxiliary mag from the register 0x4B bit 1 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_i2c_wdt_enable (u8 v_i2c_wdt_u8)
 This API write I2C watchdog enable from the register 0x70 bit 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_i2c_wdt_select (u8 v_i2c_wdt_u8)
 This API write I2C Watchdog timer from the register 0x70 bit 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_if_mode (u8 v_if_mode_u8)
 This API write I2C interface configuration(if) moe from the register 0x6B bit 4 and 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_input_enable (u8 v_channel_u8, u8 v_input_en_u8)
 API used to set input enable for interrupt1 and interrupt2 pin from the register 0x54. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_any_motion (u8 v_channel_u8, u8 v_intr_any_motion_u8)
 Write the Any motion interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_any_motion_durn (u8 v_any_motion_durn_u8)
 This API write any motion duration from the register 0x5F bit 0 and 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_any_motion_thres (u8 v_any_motion_thres_u8)
 This API is used to write threshold definition for the any-motion interrupt from the register 0x60 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_data_rdy (u8 v_channel_u8, u8 v_intr_data_rdy_u8)
 Write Data Ready interrupt mapped to interrupt1 and interrupt2 form the register 0x56. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_double_tap (u8 v_channel_u8, u8 v_intr_double_tap_u8)
 Write the Double Tap interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_edge_ctrl (u8 v_channel_u8, u8 v_intr_edge_ctrl_u8)
 Configure trigger condition of interrupt1 and interrupt2 pin from the register 0x53. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_enable_0 (u8 v_enable_u8, u8 v_intr_enable_zero_u8)
 This API is used to set interrupt enable from the register 0x50 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_enable_1 (u8 v_enable_u8, u8 v_intr_enable_1_u8)
 This API is used to set interrupt enable byte1 from the register 0x51 bit 0 to 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_enable_2 (u8 v_enable_u8, u8 v_intr_enable_2_u8)
 This API is used to set interrupt enable byte2 from the register bit 0x52 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_fifo_full (u8 v_channel_u8, u8 v_intr_fifo_full_u8)
 Write FIFO Full interrupt mapped to interrupt1 and interrupt2 form the register 0x56 bit 5 and 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_fifo_wm (u8 v_channel_u8, u8 v_intr_fifo_wm_u8)
 Write FIFO Watermark interrupt mapped to interrupt1 and interrupt2 form the register 0x56 bit 6 and 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_flat (u8 v_channel_u8, u8 v_intr_flat_u8)
 Write the Flat interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_flat_hold (u8 v_flat_hold_u8)
 This API write Flat interrupt hold time; from the register 0x68 bit 4 and 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_flat_hyst (u8 v_flat_hyst_u8)
 This API write flat interrupt hysteresis from the register 0x68 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_flat_theta (u8 v_flat_theta_u8)
 This API write Flat angle (0 to 44.8) for flat interrupt from the register 0x67 bit 0 to 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_high_g (u8 v_channel_u8, u8 v_intr_high_g_u8)
 Write the HIGH g interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_high_g_durn (u8 v_high_g_durn_u8)
 This API is used to write Delay time definition for the high-g interrupt from the register 0x5D bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_high_g_hyst (u8 v_high_g_hyst_u8)
 This API write High-g interrupt hysteresis from the register 0x5C bit 6 and 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_high_g_thres (u8 v_high_g_thres_u8)
 This API is used to write Threshold definition for the high-g interrupt from the register 0x5E 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_level (u8 v_channel_u8, u8 v_intr_level_u8)
 API used for set the Configure level condition of interrupt1 and interrupt2 pin form the register 0x53. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g (u8 v_channel_u8, u8 v_intr_low_g_u8)
 set the Low g interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57 More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g_durn (u8 v_low_g_durn_u8)
 This API is used to write the low_g duration from register 0x5A bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g_hyst (u8 v_low_hyst_u8)
 This API write Low-g interrupt hysteresis from the register 0x5C bit 0 to 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g_mode (u8 v_low_g_mode_u8)
 This API write Low-g interrupt mode from the register 0x5C bit 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g_thres (u8 v_low_g_thres_u8)
 This API is used to write Threshold definition for the low-g interrupt from the register 0x5B bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_high_source (u8 v_low_high_source_u8)
 This API write Data source for the interrupt engine for the low and high g interrupts from the register 0x58 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_motion_source (u8 v_motion_source_u8)
 This API write Data source for the interrupt engine for the nomotion and anymotion interrupts from the register 0x59 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_nomotion (u8 v_channel_u8, u8 v_intr_nomotion_u8)
 Write the No motion interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient (u8 v_channel_u8, u8 v_intr_orient_u8)
 Write the Orient interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_axes_enable (u8 v_orient_axes_u8)
 This API write orientation axes changes from the register 0x66 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_blocking (u8 v_orient_blocking_u8)
 This API write the orient blocking mode that is used for the generation of the orientation interrupt. from the register 0x65 bit 2 and 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_hyst (u8 v_orient_hyst_u8)
 This API write Orient interrupt hysteresis, from the register 0x64 bit 4 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_mode (u8 v_orient_mode_u8)
 This API write the threshold for orientation interrupt from the register 0x65 bit 0 and 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_theta (u8 v_orient_theta_u8)
 This API write Orient blocking angle (0 to 44.8) from the register 0x66 bit 0 to 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_ud_enable (u8 v_orient_ud_u8)
 This API write orient change of up/down bit from the register 0x66 bit 6. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_output_type (u8 v_channel_u8, u8 v_intr_output_type_u8)
 API used to set output enable of interrupt1 and interrupt2 from the register 0x53. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_pmu_trig (u8 v_channel_u8, u8 v_intr_pmu_trig_u8)
 Write PMU trigger interrupt mapped to interrupt1 and interrupt2 form the register 0x56 bit 0 and 4. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_significant_motion_proof (u8 v_significant_motion_proof_u8)
 This API is used to write the significant proof time from the register 0x62 bit 4 and 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_significant_motion_select (u8 v_intr_significant_motion_select_u8)
 This API is used to write, select the significant or any motion interrupt from the register 0x62 bit 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_significant_motion_skip (u8 v_int_sig_mot_skip_u8)
 This API is used to write the significant skip time from the register 0x62 bit 2 and 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_single_tap (u8 v_channel_u8, u8 v_intr_single_tap_u8)
 Write the Single Tap interrupt interrupt mapped to interrupt1 and interrupt2 from the register 0x55 and 0x57. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_slow_no_motion_durn (u8 v_slow_no_motion_u8)
 This API write Slow/no-motion interrupt trigger delay duration from the register 0x5F bit 2 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_slow_no_motion_select (u8 v_intr_slow_no_motion_select_u8)
 This API is used to write the slow/no-motion selection from the register 0x62 bit 0. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_slow_no_motion_thres (u8 v_slow_no_motion_thres_u8)
 This API is used to write threshold for the slow/no-motion interrupt from the register 0x61 bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_durn (u8 v_tap_durn_u8)
 This API is used to write the tap duration from the register 0x63 bit 0 to 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_quiet (u8 v_tap_quiet_u8)
 This API write tap quiet duration from the register 0x63 bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_shock (u8 v_tap_shock_u8)
 This API write the tap shock duration from the register 0x63 bit 2. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_source (u8 v_tap_source_u8)
 This API write data source for the interrupt engine for the single and double tap interrupts from the register 0x58 bit 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_thres (u8 v_tap_thres_u8)
 This API write Threshold of the single/double tap interrupt from the register 0x64 bit 0 to 4. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_latch_intr (u8 v_latch_intr_u8)
 This API is used to set the latch duration from the register 0x54 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_burst (u8 v_mag_burst_u8)
 This API is used to set Burst data length (1,2,6,8 byte) from the register 0x4C bit 0 to 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_interface_normal (void)
 This API switch mag interface to normal mode and confirm whether the mode switching done successfully or not. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_manual_enable (u8 v_mag_manual_u8)
 This API is used to set Enable register access on MAG_IF[2] or MAG_IF[3] writes. This implies that the DATA registers are not updated with magnetometer values. Accessing magnetometer requires the magnetometer in normal mode in PMU_STATUS. from the register 0x4C bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_offset (u8 v_mag_offset_u8)
 This API is used to set trigger-readout offset in units of 2.5 ms. If set to zero, the offset is maximum, i.e. after readout a trigger is issued immediately. from the register 0x4C bit 2 to 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_output_data_rate (u8 v_output_data_rate_u8)
 This API is used to set the output data rate of magnetometer from the register 0x44 bit 0 to 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_read_addr (u8 v_mag_read_addr_u8)
 This API is used to set magnetometer write address from the register 0x4D bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_write_addr (u8 v_mag_write_addr_u8)
 This API is used to set magnetometer write address from the register 0x4E bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_write_data (u8 v_mag_write_data_u8)
 This API is used to set magnetometer write data form the resister 0x4F bit 0 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_nvm_counter (u8 v_nvm_counter_u8)
 This API write the NVM counter form register 0x70 bit 4 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_nvm_prog_enable (u8 v_nvm_prog_u8)
 This API write NVM program enable from the register 0x6A bit 1. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_output_enable (u8 v_channel_u8, u8 v_output_enable_u8)
 API used to set the Output enable for interrupt1 and interrupt2 pin from the register 0x53. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_paging_enable (u8 v_page_enable_u8)
 This API write page enable from the register 0x7F bit 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_pullup_configuration (u8 v_control_pullup_u8)
 This API write pull up configuration from the register 0X85 bit 4 an 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_spare0_trim (u8 v_spare0_trim_u8)
 This API write the spare zero form register 0x70 bit 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_spi3 (u8 v_spi3_u8)
 This API write to configure SPI Interface Mode for primary and OIS interface from the register 0x6B bit 0. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_spi_enable (u8 v_spi_enable_u8)
 This API write primary interface selection I2C or SPI from the register 0x70 bit 0. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_step_config (u16 v_step_config_u16)
 This API write step counter configuration from the register 0x7A bit 0 to 7 and from the register 0x7B bit 0 to 2 and 4 to 7. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_step_counter_enable (u8 v_step_counter_u8)
 This API write enable step counter from the register 0x7B bit 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_step_detector_enable (u8 v_step_intr_u8)
 This API is used to set interrupt enable step detector interrupt from the register bit 0x52 bit 3. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_step_mode (u8 v_step_mode_u8)
 This API set Step counter modes. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_set_target_page (u8 v_target_page_u8)
 This API write target page from the register 0x7F bit 4 and 5. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_unmap_significant_motion_intr (u8 v_significant_u8)
 This API used to unmap the signification motion interrupt. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_write_reg (u8 v_addr_u8, u8 *v_data_u8, u8 v_len_u8)
 This API write the data to the given register. More...
 
FUNCTIONS FOR YAMAHA-YAS537
static void xy1y2_to_xyz (u16 *xy1y2, s32 *xyz)
 This function used for processing the YAMAHA YAS537 xy1y2 raw data. More...
 
static BMI160_RETURN_FUNCTION_TYPE invalid_magnetic_field (u16 *v_cur_u16, u16 *v_last_u16)
 This function used for detecting whether the mag data obtained is valid or not. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas537_mag_interface_init (void)
 This function used to init the YAMAH-YAS537. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas537_calib_values (u8 v_rcoil_u8)
 This function used for read the YAMAHA YAS537 calibration data. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yas537_acquisition_command_register (u8 v_command_reg_data_u8)
 This function used for YAS537 write data acquisition command register write. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas537_read_xy1y2_data (u8 *v_coil_stat_u8, u8 *v_busy_u8, u16 *v_temperature_u16, u16 *xy1y2, u8 *v_ouflow_u8)
 This function used for read the YAMAHA YAS537 xy1y2 data. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas537_measure_xyz_data (u8 *v_ouflow_u8, struct yas_vector *vector_xyz)
 This function used for read the YAMAHA YAS537 xy1y2 data. More...
 
BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas537_fifo_xyz_data (u16 *a_xy1y2_u16, u8 v_over_flow_u8, u8 v_rcoil_u8, u8 v_busy_u8)
 This function used for read the YAMAHA YAS537 xy1y2 data of fifo. More...
 
struct bmi160_tbmi160_get_ptr (void)
 This function used for reading bmi160_t structure. More...
 

Variables

struct yas_vector fifo_vector_xyz
 
struct bmi160_mag_fifo_data_t mag_data
 
struct trim_data_t mag_trim
 
struct bmi160_tp_bmi160
 
struct bmi160_mag_xyz_s32_t processed_data
 
u8 V_bmm150_maual_auto_condition_u8 = BMI160_INIT_VALUE
 
static u8 v_fifo_data_u8 [FIFO_FRAME]
 
struct yas537_t yas537_data
 

Function Documentation

BMI160_RETURN_FUNCTION_TYPE bmi160_accel_foc_trigger_xyz ( u8  v_foc_accel_x_u8,
u8  v_foc_accel_y_u8,
u8  v_foc_accel_z_u8,
s8 v_accel_off_x_s8,
s8 v_accel_off_y_s8,
s8 v_accel_off_z_s8 
)
Parameters
v_foc_accel_x_u8The value of accel offset x compensation
value Behaviour
0x00 disable
0x01 +1g
0x01 -1g
0x01 0g
v_foc_accel_y_u8The value of accel offset y compensation
value Behaviour
0x00 disable
0x01 +1g
0x01 -1g
0x01 0g
v_foc_accel_z_u8The value of accel offset z compensation
value Behaviour
0x00 disable
0x01 +1g
0x01 -1g
0x01 0g
v_accel_off_x_s8The value of accel offset x axis
v_accel_off_y_s8The value of accel offset y axis
v_accel_off_z_s8The value of accel offset z axis
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

s32 bmi160_bmm150_mag_compensate_X ( s16  v_mag_data_x_s16,
u16  v_data_r_u16 
)
Note
  1. Make sure the mag interface is enabled or not, by using the bmi160_get_if_mode() function. If mag interface is not enabled set the value of 0x02 to the function bmi160_get_if_mode(0x02)
  1. And also confirm the secondary-interface power mode is not in the SUSPEND mode. by using the function bmi160_get_mag_pmu_status(). If the secondary-interface power mode is in SUSPEND mode set the value of 0x19(NORMAL mode)by using the bmi160_set_command_register(0x19) function.
Parameters
v_mag_data_x_s16: The value of mag raw X data
v_data_r_u16: The value of mag R data
Returns
results of compensated X data value output as s32

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_bmm150_mag_compensate_xyz ( struct bmi160_mag_xyz_s32_t mag_comp_xyz)
Note
  1. Make sure the mag interface is enabled or not, by using the bmi160_get_if_mode() function. If mag interface is not enabled set the value of 0x02 to the function bmi160_get_if_mode(0x02)
  1. And also confirm the secondary-interface power mode is not in the SUSPEND mode. by using the function bmi160_get_mag_pmu_status(). If the secondary-interface power mode is in SUSPEND mode set the value of 0x19(NORMAL mode)by using the bmi160_set_command_register(0x19) function.
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

s32 bmi160_bmm150_mag_compensate_Y ( s16  v_mag_data_y_s16,
u16  v_data_r_u16 
)
Note
  1. Make sure the mag interface is enabled or not, by using the bmi160_get_if_mode() function. If mag interface is not enabled set the value of 0x02 to the function bmi160_get_if_mode(0x02)
  1. And also confirm the secondary-interface power mode is not in the SUSPEND mode. by using the function bmi160_get_mag_pmu_status(). If the secondary-interface power mode is in SUSPEND mode set the value of 0x19(NORMAL mode)by using the bmi160_set_command_register(0x19) function.
Parameters
v_mag_data_y_s16: The value of mag raw Y data
v_data_r_u16: The value of mag R data
Returns
results of compensated Y data value output as s32

+ Here is the caller graph for this function:

s32 bmi160_bmm150_mag_compensate_Z ( s16  v_mag_data_z_s16,
u16  v_data_r_u16 
)
Note
  1. Make sure the mag interface is enabled or not, by using the bmi160_get_if_mode() function. If mag interface is not enabled set the value of 0x02 to the function bmi160_get_if_mode(0x02)
  1. And also confirm the secondary-interface power mode is not in the SUSPEND mode. by using the function bmi160_get_mag_pmu_status(). If the secondary-interface power mode is in SUSPEND mode set the value of 0x19(NORMAL mode)by using the bmi160_set_command_register(0x19) function.
Parameters
v_mag_data_z_s16: The value of mag raw Z data
v_data_r_u16: The value of mag R data
Returns
results of compensated Z data value output as s32

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_bmm150_mag_interface_init ( u8 v_chip_id_u8)
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_bmm150_mag_set_power_mode ( u8  v_mag_pow_mode_u8)
Note
Before set the mag power mode make sure the following two points are addressed
  1. Make sure the mag interface is enabled or not, by using the bmi160_get_if_mode() function. If mag interface is not enabled set the value of 0x02 to the function bmi160_get_if_mode(0x02)
  1. And also confirm the secondary-interface power mode is not in the SUSPEND mode. by using the function bmi160_get_mag_pmu_status(). If the secondary-interface power mode is in SUSPEND mode set the value of 0x19(NORMAL mode)by using the bmi160_set_command_register(0x19) function.
Parameters
v_mag_pow_mode_u8: The value of mag power mode
value mode
0 FORCE_MODE
1 SUSPEND_MODE
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:

BMI160_RETURN_FUNCTION_TYPE bmi160_bmm150_mag_wakeup ( void  )
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:

BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas537_calib_values ( u8  v_rcoil_u8)
Parameters
v_rcoil_u8: The value of r coil
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:

BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas537_fifo_xyz_data ( u16 a_xy1y2_u16,
u8  v_over_flow_u8,
u8  v_rcoil_u8,
u8  v_busy_u8 
)
Parameters
a_xy1y2_u16The value of xyy1 data
v_over_flow_u8The value of overflow
v_rcoil_u8The value of rcoil
v_busy_u8The value of busy flag
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:

BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas537_mag_interface_init ( void  )
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas537_measure_xyz_data ( u8 v_ouflow_u8,
struct yas_vector vector_xyz 
)
Parameters
v_ouflow_u8The value of overflow
*vector_xyz: yas vector structure pointer
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yamaha_yas537_read_xy1y2_data ( u8 v_coil_stat_u8,
u8 v_busy_u8,
u16 v_temperature_u16,
u16 xy1y2,
u8 v_ouflow_u8 
)
Parameters
v_coil_stat_u8The value of R coil status
v_busy_u8The value of busy status
v_temperature_u16The value of temperature
xy1y2The value of raw xy1y2 data
v_ouflow_u8The value of overflow
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:

BMI160_RETURN_FUNCTION_TYPE bmi160_bst_yas537_acquisition_command_register ( u8  v_command_reg_data_u8)
Parameters
v_command_reg_data_u8: the value of data acquisition
acquisition_command operation
0x17 turn on the acquisition coil
- set direction of the coil
_ (x and y as minus(-))
_ Deferred acquisition mode
0x07 turn on the acquisition coil
_ set direction of the coil
_ (x and y as minus(-))
_ Normal acquisition mode
0x11 turn OFF the acquisition coil
_ set direction of the coil
_ (x and y as plus(+))
_ Deferred acquisition mode
0x01 turn OFF the acquisition coil
_ set direction of the coil
_ (x and y as plus(+))
_ Normal acquisition mode
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:

BMI160_RETURN_FUNCTION_TYPE bmi160_clear_step_counter ( void  )
Parameters
None
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_fifo_data ( u8 v_fifodata_u8,
u16  v_fifo_length_u16 
)

Data format depends on the setting of register FIFO_CONFIG

Parameters
v_fifodata_u8: Pointer holding the fifo data
v_fifo_length_u16: The value of fifo length maximum 1024
Note
For reading FIFO data use the following functions
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_fifo_length ( u32 v_fifo_length_u32)

this byte counter is updated each time a complete frame was read or writtern

Parameters
v_fifo_length_u32: The value of fifo byte counter
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_bw ( u8 v_bw_u8)

bandwidth parameter determines filter configuration(acc_us=0) and averaging for under sampling mode(acc_us=1)

Parameters
v_bw_u8: The value of accel bandwidth
Note
accel bandwidth depends on under sampling parameter
under sampling parameter cab be set by the function "BMI160_SET_ACCEL_UNDER_SAMPLING_PARAMETER"
Filter configuration
accel_us Filter configuration
0x00 OSR4 mode
0x01 OSR2 mode
0x02 normal mode
0x03 CIC mode
0x04 Reserved
0x05 Reserved
0x06 Reserved
0x07 Reserved
accel under sampling mode
accel_us Under sampling mode
0x00 no averaging
0x01 average 2 samples
0x02 average 4 samples
0x03 average 8 samples
0x04 average 16 samples
0x05 average 32 samples
0x06 average 64 samples
0x07 average 128 samples
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_data_rdy ( u8 v_data_rdy_u8)
Parameters
v_data_rdy_u8: The value of accel data ready status
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_fifo_filter_data ( u8 accel_fifo_filter_u8)
Parameters
accel_fifo_filter_u8:The value of accel filter data
value accel_fifo_filter_u8
0x00 Unfiltered data
0x01 Filtered data
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_offset_compensation_xaxis ( s8 v_accel_off_x_s8)
Parameters
v_accel_off_x_s8The value of accel manual offset compensation of x axis
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_offset_compensation_yaxis ( s8 v_accel_off_y_s8)
Parameters
v_accel_off_y_s8The value of accel manual offset compensation of y axis
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_offset_compensation_zaxis ( s8 v_accel_off_z_s8)
Parameters
v_accel_off_z_s8The value of accel manual offset compensation of z axis
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_offset_enable ( u8 v_accel_off_enable_u8)
Parameters
v_accel_off_enable_u8The value of accel offset enable
value Description
0x01 ENABLE
0x00 DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_output_data_rate ( u8 v_output_data_rate_u8)
Parameters
v_output_data_rate_u8:The value of accel output date rate
value output data rate
0 BMI160_ACCEL_OUTPUT_DATA_RATE_RESERVED
1 BMI160_ACCEL_OUTPUT_DATA_RATE_0_78HZ
2 BMI160_ACCEL_OUTPUT_DATA_RATE_1_56HZ
3 BMI160_ACCEL_OUTPUT_DATA_RATE_3_12HZ
4 BMI160_ACCEL_OUTPUT_DATA_RATE_6_25HZ
5 BMI160_ACCEL_OUTPUT_DATA_RATE_12_5HZ
6 BMI160_ACCEL_OUTPUT_DATA_RATE_25HZ
7 BMI160_ACCEL_OUTPUT_DATA_RATE_50HZ
8 BMI160_ACCEL_OUTPUT_DATA_RATE_100HZ
9 BMI160_ACCEL_OUTPUT_DATA_RATE_200HZ
10 BMI160_ACCEL_OUTPUT_DATA_RATE_400HZ
11 BMI160_ACCEL_OUTPUT_DATA_RATE_800HZ
12 BMI160_ACCEL_OUTPUT_DATA_RATE_1600HZ
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_power_mode_stat ( u8 v_accel_power_mode_stat_u8)
Parameters
v_accel_power_mode_stat_u8: The value of accel power mode
accel_powermode value
SUSPEND 0x00
NORMAL 0x01
LOW POWER 0x02
Note
The power mode of accel set by the 0x7E command register
using the function "bmi160_set_command_register()"
value mode
0x11 ACCEL_MODE_NORMAL
0x12 ACCEL_LOWPOWER
0x10 ACCEL_SUSPEND
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_range ( u8 v_range_u8)
Parameters
v_range_u8: The value of accel g range
value g_range
0x03 BMI160_ACCEL_RANGE_2G
0x05 BMI160_ACCEL_RANGE_4G
0x08 BMI160_ACCEL_RANGE_8G
0x0C BMI160_ACCEL_RANGE_16G
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_selftest_amp ( u8 v_accel_selftest_amp_u8)
Parameters
v_accel_selftest_amp_u8: The value of accel self test amplitude
Value Description
0x00 LOW
0x01 HIGH
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_selftest_axis ( u8 v_accel_selftest_axis_u8)
Parameters
v_accel_selftest_axis_u8: The value of accel self test axis selection
Value Description
0x00 disabled
0x01 x-axis
0x02 y-axis
0x03 z-axis
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_selftest_sign ( u8 v_accel_selftest_sign_u8)
Parameters
v_accel_selftest_sign_u8The value of accel self test axis sign
Value Description
0x00 negative
0x01 positive
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_accel_under_sampling_parameter ( u8 v_accel_under_sampling_u8)
Parameters
v_accel_under_sampling_u8: The value of accel under sampling
value under_sampling
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_data_rdy_mag ( u8 v_data_rdy_u8)
Parameters
v_data_rdy_u8: The value of mag data ready status
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_drop_cmd_err ( u8 v_drop_cmd_err_u8)
Parameters
v_drop_cmd_err_u8: The status of drop command error
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_err_code ( u8 v_err_code_u8)
Parameters
v_err_code_u8: The status of error codes
error_code description
0x00 no error
0x01 ACC_CONF error (accel ODR and bandwidth not compatible)
0x02 GYR_CONF error (Gyroscope ODR and bandwidth not compatible)
0x03 Under sampling mode and interrupt uses pre filtered data
0x04 reserved
0x05 Selected trigger-readout offset in
- MAG_IF greater than selected ODR
0x06 FIFO configuration error for header less mode
0x07 Under sampling mode and pre filtered data as FIFO source
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_error_status ( u8 v_fatal_er_u8r,
u8 v_err_code_u8,
u8 v_i2c_fail_err_u8,
u8 v_drop_cmd_err_u8,
u8 v_mag_data_rdy_err_u8 
)
Parameters
v_mag_data_rdy_err_u8: The status of mag data ready interrupt
v_fatal_er_u8r: The status of fatal error
v_err_code_u8: The status of error code
v_i2c_fail_err_u8: The status of I2C fail error
v_drop_cmd_err_u8: The status of drop command error
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fatal_err ( u8 v_fatal_err_u8)
Parameters
v_fatal_err_u8: The status of fatal error
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_accel_enable ( u8 v_fifo_accel_u8)
Parameters
v_fifo_accel_u8: The value of fifo accel enble
value fifo accel
0x00 no accel data is stored
0x01 accel data is stored
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_down_accel ( u8 v_fifo_down_u8)
Parameters
v_fifo_down_u8:The value of accel fifo down
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_down_gyro ( u8 v_fifo_down_gyro_u8)
Parameters
v_fifo_down_gyro_u8:The value of gyro fifo down
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_gyro_enable ( u8 v_fifo_gyro_u8)
Parameters
v_fifo_gyro_u8: The value of fifo gyro enble
value fifo gyro
0x00 no gyro data is stored
0x01 gyro data is stored
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_header_enable ( u8 v_fifo_header_u8)
Parameters
v_fifo_header_u8:The value of fifo header
value fifo header
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_mag_enable ( u8 v_fifo_mag_u8)
Parameters
v_fifo_mag_u8: The value of fifo mag enble
value fifo mag
0x00 no magnetometer data is stored
0x01 magnetometer data is stored
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_tag_intr1_enable ( u8 v_fifo_tag_intr1_u8)
Parameters
v_fifo_tag_intr1_u8:The value of fifo tag interrupt1
value fifo tag interrupt
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_tag_intr2_enable ( u8 v_fifo_tag_intr2_u8)
Parameters
v_fifo_tag_intr2_u8: The value of fifo tag interrupt
value fifo tag interrupt
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_time_enable ( u8 v_fifo_time_enable_u8)
Parameters
v_fifo_time_enable_u8: The value of sensor time
value fifo sensor time
0x00 do not return sensortime frame
0x01 return sensortime frame
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_fifo_wm ( u8 v_fifo_wm_u8)
Parameters
v_fifo_wm_u8: The value of fifo water mark level
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_accel_x ( u8 v_foc_accel_x_u8)
Parameters
v_foc_accel_x_u8: the value of accel offset compensation x axis
value Behaviour
0x00 disable
0x01 +1g
0x02 -1g
0x03 0g
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_accel_y ( u8 v_foc_accel_y_u8)
Parameters
v_foc_accel_y_u8: the value of accel offset compensation y axis
value Behaviour
0x00 disable
0x01 +1g
0x01 -1g
0x01 0g
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_accel_z ( u8 v_foc_accel_z_u8)
Parameters
v_foc_accel_z_u8: the value of accel offset compensation z axis
value Behaviour
0x00 disable
0x01 +1g
0x01 -1g
0x01 0g
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_gyro_enable ( u8 v_foc_gyro_u8)
Parameters
v_foc_gyro_u8: The value of gyro fast offset enable
value Description
0 fast offset compensation disabled
1 fast offset compensation enabled
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_foc_rdy ( u8 v_foc_rdy_u8)
Parameters
v_foc_rdy_u8: The status of fast compensation
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_bw ( u8 v_bw_u8)
Parameters
v_bw_u8: The value of gyro bandwidth
value gyro bandwidth
0x00 BMI160_GYRO_OSR4_MODE
0x01 BMI160_GYRO_OSR2_MODE
0x02 BMI160_GYRO_NORMAL_MODE
0x03 BMI160_GYRO_CIC_MODE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_data_rdy ( u8 v_data_rdy_u8)
Parameters
v_data_rdy_u8: The value of gyro data ready
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_fifo_filter_data ( u8 v_gyro_fifo_filter_data_u8)
Parameters
v_gyro_fifo_filter_data_u8:The value of gyro filter data
value gyro_fifo_filter_data
0x00 Unfiltered data
0x01 Filtered data
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_offset_compensation_xaxis ( s16 v_gyro_off_x_s16)
Parameters
v_gyro_off_x_s16The value of gyro manual offset compensation of x axis
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_offset_compensation_yaxis ( s16 v_gyro_off_y_s16)
Parameters
v_gyro_off_y_s16The value of gyro manual offset compensation of y axis
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_offset_compensation_zaxis ( s16 v_gyro_off_z_s16)
Parameters
v_gyro_off_z_s16The value of gyro manual offset compensation of z axis
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_offset_enable ( u8 v_gyro_off_enable_u8)
Parameters
v_gyro_off_enable_u8The value of gyro offset enable
value Description
0x01 ENABLE
0x00 DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_output_data_rate ( u8 v_output_data_rate_u8)
Parameters
v_output_data_rate_u8:The value of gyro output data rate
value gyro output data rate
0x00 BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED
0x01 BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED
0x02 BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED
0x03 BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED
0x04 BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED
0x05 BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED
0x06 BMI160_GYRO_OUTPUT_DATA_RATE_25HZ
0x07 BMI160_GYRO_OUTPUT_DATA_RATE_50HZ
0x08 BMI160_GYRO_OUTPUT_DATA_RATE_100HZ
0x09 BMI160_GYRO_OUTPUT_DATA_RATE_200HZ
0x0A BMI160_GYRO_OUTPUT_DATA_RATE_400HZ
0x0B BMI160_GYRO_OUTPUT_DATA_RATE_800HZ
0x0C BMI160_GYRO_OUTPUT_DATA_RATE_1600HZ
0x0D BMI160_GYRO_OUTPUT_DATA_RATE_3200HZ
0x0E BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED
0x0F BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_power_mode_stat ( u8 v_gyro_power_mode_stat_u8)
Parameters
v_gyro_power_mode_stat_u8: The value of gyro power mode
gyro_powermode value
SUSPEND 0x00
NORMAL 0x01
FAST POWER UP 0x03
Note
The power mode of gyro set by the 0x7E command register
using the function "bmi160_set_command_register()"
value mode
0x14 GYRO_MODE_SUSPEND
0x15 GYRO_MODE_NORMAL
0x17 GYRO_MODE_FASTSTARTUP
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_range ( u8 v_range_u8)
Parameters
v_range_u8: The value of gyro range
value range
0x00 BMI160_GYRO_RANGE_2000_DEG_SEC
0x01 BMI160_GYRO_RANGE_1000_DEG_SEC
0x02 BMI160_GYRO_RANGE_500_DEG_SEC
0x03 BMI160_GYRO_RANGE_250_DEG_SEC
0x04 BMI160_GYRO_RANGE_125_DEG_SEC
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_selftest ( u8 v_gyro_selftest_u8)
Parameters
v_gyro_selftest_u8: The value of gyro self test status
value status
0 Gyroscope self test is running or failed
1 Gyroscope self test completed successfully
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_selftest_start ( u8 v_gyro_selftest_start_u8)
Parameters
v_gyro_selftest_start_u8The value of gyro self test start
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_sleep_state ( u8 v_gyro_sleep_state_u8)
Parameters
v_gyro_sleep_state_u8: The value of gyro sleep mode
Value Description
0x00 Sleep transition to fast wake up state
0x01 Sleep transition to suspend state
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_sleep_trigger ( u8 v_gyro_sleep_trigger_u8)
Parameters
v_gyro_sleep_trigger_u8: The value of gyro sleep trigger
Value Description
0x00 nomotion: no / Not INT1 pin: no / INT2 pin: no
0x01 nomotion: no / Not INT1 pin: no / INT2 pin: yes
0x02 nomotion: no / Not INT1 pin: yes / INT2 pin: no
0x03 nomotion: no / Not INT1 pin: yes / INT2 pin: yes
0x04 nomotion: yes / Not INT1 pin: no / INT2 pin: no
0x05 anymotion: yes / Not INT1 pin: no / INT2 pin: yes
0x06 anymotion: yes / Not INT1 pin: yes / INT2 pin: no
0x07 anymotion: yes / Not INT1 pin: yes / INT2 pin: yes
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_wakeup_intr ( u8 v_gyro_wakeup_intr_u8)
Parameters
v_gyro_wakeup_intr_u8: The valeu of gyro wakeup interrupt
Value Description
0x00 DISABLE
0x01 ENABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_gyro_wakeup_trigger ( u8 v_gyro_wakeup_trigger_u8)
Parameters
v_gyro_wakeup_trigger_u8: The value of gyro wakeup trigger
Value Description
0x00 anymotion: no / INT1 pin: no
0x01 anymotion: no / INT1 pin: yes
0x02 anymotion: yes / INT1 pin: no
0x03 anymotion: yes / INT1 pin: yes
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_i2c_device_addr ( u8 v_i2c_device_addr_u8)
Parameters
v_i2c_device_addr_u8: The value of mag I2C device address
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_i2c_fail_err ( u8 v_i2c_err_code_u8)
Parameters
v_i2c_err_code_u8: The status of i2c fail error
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_i2c_wdt_enable ( u8 v_i2c_wdt_u8)
Parameters
v_i2c_wdt_u8: The value of I2C watchdog enable
Value Description
0 DISABLE
1 ENABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_i2c_wdt_select ( u8 v_i2c_wdt_u8)
Parameters
v_i2c_wdt_u8: The value of I2C watch dog timer
Value Description
0 I2C watchdog v_timeout_u8 after 1 ms
1 I2C watchdog v_timeout_u8 after 50 ms
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_if_mode ( u8 v_if_mode_u8)
Parameters
v_if_mode_u8: The value of interface configuration mode
Value Description
0x00 Primary interface:autoconfig / secondary interface:off
0x01 Primary interface:I2C / secondary interface:OIS
0x02 Primary interface:autoconfig/secondary interface:Magnetometer
0x03 Reserved
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_get_input_enable ( u8  v_channel_u8,
u8 v_input_en_u8 
)

interrupt1 - bit 4 interrupt2 - bit 5

Parameters
v_channel_u8The value of input enable selection
v_channel_u8 input selection
0 BMI160_INTR1_INPUT_ENABLE
1 BMI160_INTR2_INPUT_ENABLE
v_input_en_u8: The value of input enable of interrupt enable
value Behaviour
0x01 BMI160_INPUT
0x00 BMI160_OUTPUT
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_any_motion ( u8  v_channel_u8,
u8 v_intr_any_motion_u8 
)

interrupt1 bit 2 in the register 0x55 interrupt2 bit 2 in the register 0x57

Parameters
v_channel_u8The value of any motion selection
v_channel_u8 interrupt
0 BMI160_INTR1_MAP_ANY_MOTION
1 BMI160_INTR2_MAP_ANY_MOTION
v_intr_any_motion_u8: The value of any motion enable
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_any_motion_durn ( u8 v_any_motion_durn_u8)
Parameters
v_any_motion_durn_u8: The value of any motion duration
Note
Any motion duration can be calculated by "v_any_motion_durn_u8 + 1"
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_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 changes according to accel g range accel g range can be set by the function ""
accel_range any motion threshold
2g v_any_motion_thres_u8*3.91 mg
4g v_any_motion_thres_u8*7.81 mg
8g v_any_motion_thres_u8*15.63 mg
16g v_any_motion_thres_u8*31.25 mg
when v_any_motion_thres_u8 = 0
accel_range any motion threshold
2g 1.95 mg
4g 3.91 mg
8g 7.81 mg
16g 15.63 mg
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_data_rdy ( u8  v_channel_u8,
u8 v_intr_data_rdy_u8 
)

interrupt1 bit 7 in the register 0x56 interrupt2 bit 3 in the register 0x56

Parameters
v_channel_u8The value of data ready interrupt selection
v_channel_u8 interrupt
0 BMI160_INTR1_MAP_DATA_RDY
1 BMI160_INTR2_MAP_DATA_RDY
v_intr_data_rdy_u8: The value of data ready interrupt enable
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_double_tap ( u8  v_channel_u8,
u8 v_intr_double_tap_u8 
)

interrupt1 bit 4 in the register 0x55 interrupt2 bit 4 in the register 0x57

Parameters
v_channel_u8The value of double tap interrupt selection
v_channel_u8 interrupt
0 BMI160_INTR1_MAP_DOUBLE_TAP
1 BMI160_INTR2_MAP_DOUBLE_TAP
v_intr_double_tap_u8: The value of double tap enable
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_edge_ctrl ( u8  v_channel_u8,
u8 v_intr_edge_ctrl_u8 
)

interrupt1 - bit 0 interrupt2 - bit 4

Parameters
v_channel_u8The value of edge trigger selection
v_channel_u8 Edge trigger
0 BMI160_INTR1_EDGE_CTRL
1 BMI160_INTR2_EDGE_CTRL
v_intr_edge_ctrl_u8: The value of edge trigger enable
value interrupt enable
0x01 BMI160_EDGE
0x00 BMI160_LEVEL
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_enable_0 ( u8  v_enable_u8,
u8 v_intr_enable_zero_u8 
)
Parameters
v_enable_u8: Value to decided to select interrupt
v_enable_u8 interrupt
0 BMI160_ANY_MOTION_X_ENABLE
1 BMI160_ANY_MOTION_Y_ENABLE
2 BMI160_ANY_MOTION_Z_ENABLE
3 BMI160_DOUBLE_TAP_ENABLE
4 BMI160_SINGLE_TAP_ENABLE
5 BMI160_ORIENT_ENABLE
6 BMI160_FLAT_ENABLE
v_intr_enable_zero_u8: The interrupt enable value
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_enable_1 ( u8  v_enable_u8,
u8 v_intr_enable_1_u8 
)

It read the high_g_x,high_g_y,high_g_z,low_g_enable data ready, fifo full and fifo water mark.

Parameters
v_enable_u8: The value of interrupt enable
v_enable_u8: Value to decided to select interrupt
v_enable_u8 interrupt
0 BMI160_HIGH_G_X_ENABLE
1 BMI160_HIGH_G_Y_ENABLE
2 BMI160_HIGH_G_Z_ENABLE
3 BMI160_LOW_G_ENABLE
4 BMI160_DATA_RDY_ENABLE
5 BMI160_FIFO_FULL_ENABLE
6 BMI160_FIFO_WM_ENABLE
v_intr_enable_1_u8: The interrupt enable value
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_enable_2 ( u8  v_enable_u8,
u8 v_intr_enable_2_u8 
)

It reads no motion x,y and z

Parameters
v_enable_u8The value of interrupt enable
v_enable_u8 interrupt
0 BMI160_NOMOTION_X_ENABLE
1 BMI160_NOMOTION_Y_ENABLE
2 BMI160_NOMOTION_Z_ENABLE
v_intr_enable_2_u8: The interrupt enable value
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_fifo_full ( u8  v_channel_u8,
u8 v_intr_fifo_full_u8 
)

interrupt1 bit 5 in the register 0x56 interrupt2 bit 1 in the register 0x56

Parameters
v_channel_u8The value of fifo full interrupt selection
v_channel_u8 interrupt
0 BMI160_INTR1_MAP_FIFO_FULL
1 BMI160_INTR2_MAP_FIFO_FULL
v_intr_fifo_full_u8: The value of fifo full interrupt enable
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_fifo_wm ( u8  v_channel_u8,
u8 v_intr_fifo_wm_u8 
)

interrupt1 bit 6 in the register 0x56 interrupt2 bit 2 in the register 0x56

Parameters
v_channel_u8The value of fifo Watermark interrupt selection
v_channel_u8 interrupt
0 BMI160_INTR1_MAP_FIFO_WM
1 BMI160_INTR2_MAP_FIFO_WM
v_intr_fifo_wm_u8: The value of fifo Watermark interrupt enable
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_flat ( u8  v_channel_u8,
u8 v_intr_flat_u8 
)

interrupt1 bit 7 in the register 0x55 interrupt2 bit 7 in the register 0x57

Parameters
v_channel_u8The value of flat interrupt selection
v_channel_u8 interrupt
0 BMI160_INTR1_MAP_FLAT
1 BMI160_INTR2_MAP_FLAT
v_intr_flat_u8: The value of flat enable
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_flat_hold ( u8 v_flat_hold_u8)
Parameters
v_flat_hold_u8: The value of flat hold time
value Behaviour
0x00 0ms
0x01 512ms
0x01 1024ms
0x01 2048ms
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_flat_hyst ( u8 v_flat_hyst_u8)
Parameters
v_flat_hyst_u8: The value of flat hysteresis
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_flat_theta ( u8 v_flat_theta_u8)
Parameters
v_flat_theta_u8: The value of flat angle
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_high_g ( u8  v_channel_u8,
u8 v_intr_high_g_u8 
)

interrupt1 bit 1 in the register 0x55 interrupt2 bit 1 in the register 0x57

Parameters
v_channel_u8The value of high_g selection
v_channel_u8 interrupt
0 BMI160_INTR1_MAP_HIGH_G
1 BMI160_INTR2_MAP_HIGH_G
v_intr_high_g_u8: The value of high_g enable
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_high_g_durn ( u8 v_high_g_durn_u8)
Parameters
v_high_g_durn_u8: The value of high duration
Note
High_g interrupt delay triggered according to v_high_g_durn_u8 * 2.5ms in a range from 2.5ms to 640ms
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_high_g_hyst ( u8 v_high_g_hyst_u8)
Parameters
v_high_g_hyst_u8: The value of high hysteresis
Note
High_g hysteresis changes according to accel g range accel g range can be set by the function ""
accel_range high_g hysteresis
2g high_hy*125 mg
4g high_hy*250 mg
8g high_hy*500 mg
16g high_hy*1000 mg
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_high_g_thres ( u8 v_high_g_thres_u8)
Parameters
v_high_g_thres_u8: Pointer holding the value of Threshold
Note
High_g threshold changes according to accel g range accel g range can be set by the function ""
accel_range high_g threshold
2g v_high_g_thres_u8*7.81 mg
4g v_high_g_thres_u8*15.63 mg
8g v_high_g_thres_u8*31.25 mg
16g v_high_g_thres_u8*62.5 mg
when v_high_g_thres_u8 = 0
accel_range high_g threshold
2g 3.91 mg
4g 7.81 mg
8g 15.63 mg
16g 31.25 mg
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_level ( u8  v_channel_u8,
u8 v_intr_level_u8 
)

interrupt1 - bit 1 interrupt2 - bit 5

Parameters
v_channel_u8The value of level condition selection
v_channel_u8 level selection
0 BMI160_INTR1_LEVEL
1 BMI160_INTR2_LEVEL
v_intr_level_u8: The value of level of interrupt enable
value Behaviour
0x01 BMI160_LEVEL_HIGH
0x00 BMI160_LEVEL_LOW
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g ( u8  v_channel_u8,
u8 v_intr_low_g_u8 
)

interrupt1 bit 0 in the register 0x55 interrupt2 bit 0 in the register 0x57

Parameters
v_channel_u8The value of low_g selection
v_channel_u8 interrupt
0 BMI160_INTR1_MAP_LOW_G
1 BMI160_INTR2_MAP_LOW_G
v_intr_low_g_u8: The value of low_g enable
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g_durn ( u8 v_low_g_durn_u8)
Parameters
v_low_g_durn_u8: The value of low_g duration
Note
Low_g duration trigger trigger delay according to "(v_low_g_durn_u8 * 2.5)ms" in a range from 2.5ms to 640ms. the default corresponds delay is 20ms
When low_g data source of interrupt is unfiltered the sensor must not be in low power mode
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g_hyst ( u8 v_low_hyst_u8)
Parameters
v_low_hyst_u8:The value of low_g hysteresis
Note
Low_g hysteresis calculated by v_low_hyst_u8*125 mg
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g_mode ( u8 v_low_g_mode_u8)
Parameters
v_low_g_mode_u8: The value of low_g mode
Value Description
0 single-axis
1 axis-summing
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_g_thres ( u8 v_low_g_thres_u8)
Parameters
v_low_g_thres_u8: The value of low_g threshold
Note
Low_g interrupt trigger threshold according to (v_low_g_thres_u8 * 7.81)mg for v_low_g_thres_u8 > 0 3.91 mg for v_low_g_thres_u8 = 0 The threshold range is form 3.91mg to 2.000mg
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_low_high_source ( u8 v_low_high_source_u8)
Parameters
v_low_high_source_u8: The value of the tap source
value Description
0x01 UNFILTER_DATA
0x00 FILTER_DATA
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_motion_source ( u8 v_motion_source_u8)
Parameters
v_motion_source_u8: The value of the any/no motion interrupt source
value Description
0x01 UNFILTER_DATA
0x00 FILTER_DATA
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_nomotion ( u8  v_channel_u8,
u8 v_intr_nomotion_u8 
)

interrupt1 bit 3 in the register 0x55 interrupt2 bit 3 in the register 0x57

Parameters
v_channel_u8The value of no motion selection
v_channel_u8 interrupt
0 BMI160_INTR1_MAP_NOMO
1 BMI160_INTR2_MAP_NOMO
v_intr_nomotion_u8: The value of no motion enable
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient ( u8  v_channel_u8,
u8 v_intr_orient_u8 
)

interrupt1 bit 6 in the register 0x55 interrupt2 bit 6 in the register 0x57

Parameters
v_channel_u8The value of orient interrupt selection
v_channel_u8 interrupt
0 BMI160_INTR1_MAP_ORIENT
1 BMI160_INTR2_MAP_ORIENT
v_intr_orient_u8: The value of orient enable
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_axes_enable ( u8 v_orient_axes_u8)
Parameters
v_orient_axes_u8: The value of orient axes assignment
value Behaviour Name
0x00 x = x, y = y, z = zorient_ax_noex
0x01 x = y, y = z, z = xorient_ax_ex
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_blocking ( u8 v_orient_blocking_u8)
Parameters
v_orient_blocking_u8: The value of orient blocking mode
value Behaviour
0x00 No blocking
0x01 Theta blocking or acceleration in any axis > 1.5g
0x02 Theta blocking or acceleration slope in any axis >
- 0.2g or acceleration in any axis > 1.5g
0x03 Theta blocking or acceleration slope in any axis >
- 0.4g or acceleration in any axis >
- 1.5g and value of orient is not stable
- for at least 100 ms
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_hyst ( u8 v_orient_hyst_u8)
Parameters
v_orient_hyst_u8: The value of orient hysteresis
Note
1 LSB corresponds to 62.5 mg, irrespective of the selected accel range
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_mode ( u8 v_orient_mode_u8)
Parameters
v_orient_mode_u8: The value of threshold for orientation
value Behaviour
0x00 symmetrical
0x01 high-asymmetrical
0x02 low-asymmetrical
0x03 symmetrical
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_theta ( u8 v_orient_theta_u8)
Parameters
v_orient_theta_u8: The value of Orient blocking angle
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_orient_ud_enable ( u8 v_orient_ud_u8)
Parameters
v_orient_ud_u8: The value of orient change of up/down
value Behaviour
0x00 Is ignored
0x01 Generates orientation interrupt
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_output_type ( u8  v_channel_u8,
u8 v_intr_output_type_u8 
)

interrupt1 - bit 2 interrupt2 - bit 6

Parameters
v_channel_u8The value of output type enable selection
v_channel_u8 level selection
0 BMI160_INTR1_OUTPUT_TYPE
1 BMI160_INTR2_OUTPUT_TYPE
v_intr_output_type_u8: The value of output type of interrupt enable
value Behaviour
0x01 BMI160_OPEN_DRAIN
0x00 BMI160_PUSH_PULL
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_pmu_trig ( u8  v_channel_u8,
u8 v_intr_pmu_trig_u8 
)

interrupt1 bit 0 in the register 0x56 interrupt2 bit 4 in the register 0x56

Parameters
v_channel_u8The value of pmu trigger selection
v_channel_u8 interrupt
0 BMI160_INTR1_MAP_PMUTRIG
1 BMI160_INTR2_MAP_PMUTRIG
v_intr_pmu_trig_u8: The value of pmu trigger enable
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_significant_motion_proof ( u8 v_significant_motion_proof_u8)
Parameters
v_significant_motion_proof_u8: the value of significant proof time
value Behaviour
0x00 proof time 0.25 seconds
0x01 proof time 0.5 seconds
0x02 proof time 1 seconds
0x03 proof time 2 seconds
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_significant_motion_select ( u8 v_intr_significant_motion_select_u8)
Parameters
v_intr_significant_motion_select_u8: the value of significant or any motion interrupt selection
value Behaviour
0x00 ANY_MOTION
0x01 SIGNIFICANT_MOTION
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_significant_motion_skip ( u8 v_int_sig_mot_skip_u8)
Parameters
v_int_sig_mot_skip_u8: the value of significant skip time
value Behaviour
0x00 skip time 1.5 seconds
0x01 skip time 3 seconds
0x02 skip time 6 seconds
0x03 skip time 12 seconds
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_single_tap ( u8  v_channel_u8,
u8 v_intr_single_tap_u8 
)

interrupt1 bit 5 in the register 0x55 interrupt2 bit 5 in the register 0x57

Parameters
v_channel_u8The value of single tap interrupt selection
v_channel_u8 interrupt
0 BMI160_INTR1_MAP_SINGLE_TAP
1 BMI160_INTR2_MAP_SINGLE_TAP
v_intr_single_tap_u8: The value of single tap enable
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_slow_no_motion_durn ( u8 v_slow_no_motion_u8)
Parameters
v_slow_no_motion_u8:The value of slow no motion duration
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
Note
v_slow_no_motion_u8(5:4)=0b00 -> [v_slow_no_motion_u8(3:0) + 1] * 1.28s (1.28s-20.48s)
v_slow_no_motion_u8(5:4)=1 -> [v_slow_no_motion_u8(3:0)+5] * 5.12s (25.6s-102.4s)
v_slow_no_motion_u8(5)='1' -> [(v_slow_no_motion_u8:0)+11] * 10.24s (112.64s-430.08s);
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_slow_no_motion_select ( u8 v_intr_slow_no_motion_select_u8)
Parameters
v_intr_slow_no_motion_select_u8: The value of slow/no-motion select
value Behaviour
0x00 SLOW_MOTION
0x01 NO_MOTION
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_slow_no_motion_thres ( u8 v_slow_no_motion_thres_u8)
Parameters
v_slow_no_motion_thres_u8: The value of slow no motion threshold
Note
slow no motion threshold changes according to accel g range accel g range can be set by the function ""
accel_range slow no motion threshold
2g v_slow_no_motion_thres_u8*3.91 mg
4g v_slow_no_motion_thres_u8*7.81 mg
8g v_slow_no_motion_thres_u8*15.63 mg
16g v_slow_no_motion_thres_u8*31.25 mg
when v_slow_no_motion_thres_u8 = 0
accel_range slow no motion threshold
2g 1.95 mg
4g 3.91 mg
8g 7.81 mg
16g 15.63 mg
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_durn ( u8 v_tap_durn_u8)
Parameters
v_tap_durn_u8: The value of tap duration
value Behaviour
0x00 BMI160_TAP_DURN_50MS
0x01 BMI160_TAP_DURN_100MS
0x03 BMI160_TAP_DURN_150MS
0x04 BMI160_TAP_DURN_200MS
0x05 BMI160_TAP_DURN_250MS
0x06 BMI160_TAP_DURN_375MS
0x07 BMI160_TAP_DURN_700MS
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_quiet ( u8 v_tap_quiet_u8)
Parameters
v_tap_quiet_u8: The value of tap quiet
value Behaviour
0x00 BMI160_TAP_QUIET_30MS
0x01 BMI160_TAP_QUIET_20MS
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_shock ( u8 v_tap_shock_u8)
Parameters
v_tap_shock_u8:The value of tap shock
value Behaviour
0x00 BMI160_TAP_SHOCK_50MS
0x01 BMI160_TAP_SHOCK_75MS
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_source ( u8 v_tap_source_u8)
Parameters
v_tap_source_u8: The value of the tap source
value Description
0x01 UNFILTER_DATA
0x00 FILTER_DATA
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_intr_tap_thres ( u8 v_tap_thres_u8)
Parameters
v_tap_thres_u8: The value of single/double tap threshold
Note
single/double tap threshold changes according to accel g range accel g range can be set by the function ""
accel_range single/double tap threshold
2g ((v_tap_thres_u8 + 1) * 62.5)mg
4g ((v_tap_thres_u8 + 1) * 125)mg
8g ((v_tap_thres_u8 + 1) * 250)mg
16g ((v_tap_thres_u8 + 1) * 500)mg
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_latch_intr ( u8 v_latch_intr_u8)

This latch selection is not applicable for data ready, orientation and flat interrupts.

Parameters
v_latch_intr_u8: The value of latch duration
Latch Duration value
BMI160_LATCH_DUR_NONE 0x00
BMI160_LATCH_DUR_312_5_MICRO_SEC 0x01
BMI160_LATCH_DUR_625_MICRO_SEC 0x02
BMI160_LATCH_DUR_1_25_MILLI_SEC 0x03
BMI160_LATCH_DUR_2_5_MILLI_SEC 0x04
BMI160_LATCH_DUR_5_MILLI_SEC 0x05
BMI160_LATCH_DUR_10_MILLI_SEC 0x06
BMI160_LATCH_DUR_20_MILLI_SEC 0x07
BMI160_LATCH_DUR_40_MILLI_SEC 0x08
BMI160_LATCH_DUR_80_MILLI_SEC 0x09
BMI160_LATCH_DUR_160_MILLI_SEC 0x0A
BMI160_LATCH_DUR_320_MILLI_SEC 0x0B
BMI160_LATCH_DUR_640_MILLI_SEC 0x0C
BMI160_LATCH_DUR_1_28_SEC 0x0D
BMI160_LATCH_DUR_2_56_SEC 0x0E
BMI160_LATCHED 0x0F
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_burst ( u8 v_mag_burst_u8)
Parameters
v_mag_burst_u8: The data of mag burst read lenth
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_data_rdy_err ( u8 v_mag_data_rdy_err_u8)
Parameters
v_mag_data_rdy_err_u8: The status of mag data ready interrupt
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_manual_enable ( u8 v_mag_manual_u8)
Parameters
v_mag_manual_u8: The value of mag manual enable
value mag manual
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_manual_operation_stat ( u8 v_mag_manual_stat_u8)
Parameters
v_mag_manual_stat_u8: The value of mag manual operation status
value status
0 Indicates no manual magnetometer
- interface operation is ongoing
1 Indicates manual magnetometer
- interface operation is ongoing
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_offset ( u8 v_mag_offset_u8)
Parameters
v_mag_offset_u8: The value of mag offset
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_output_data_rate ( u8 v_output_data_rate_u8)
Parameters
v_output_data_rate_u8: The value of mag output data rate
value mag output data rate
0x00 BMI160_MAG_OUTPUT_DATA_RATE_RESERVED
0x01 BMI160_MAG_OUTPUT_DATA_RATE_0_78HZ
0x02 BMI160_MAG_OUTPUT_DATA_RATE_1_56HZ
0x03 BMI160_MAG_OUTPUT_DATA_RATE_3_12HZ
0x04 BMI160_MAG_OUTPUT_DATA_RATE_6_25HZ
0x05 BMI160_MAG_OUTPUT_DATA_RATE_12_5HZ
0x06 BMI160_MAG_OUTPUT_DATA_RATE_25HZ
0x07 BMI160_MAG_OUTPUT_DATA_RATE_50HZ
0x08 BMI160_MAG_OUTPUT_DATA_RATE_100HZ
0x09 BMI160_MAG_OUTPUT_DATA_RATE_200HZ
0x0A BMI160_MAG_OUTPUT_DATA_RATE_400HZ
0x0B BMI160_MAG_OUTPUT_DATA_RATE_800HZ
0x0C BMI160_MAG_OUTPUT_DATA_RATE_1600HZ
0x0D BMI160_MAG_OUTPUT_DATA_RATE_RESERVED0
0x0E BMI160_MAG_OUTPUT_DATA_RATE_RESERVED1
0x0F BMI160_MAG_OUTPUT_DATA_RATE_RESERVED2
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_power_mode_stat ( u8 v_mag_power_mode_stat_u8)
Parameters
v_mag_power_mode_stat_u8: The value of mag power mode
mag_powermode value
SUSPEND 0x00
NORMAL 0x01
LOW POWER 0x02
Note
The power mode of mag set by the 0x7E command register
using the function "bmi160_set_command_register()"
value mode
0x18 MAG_MODE_SUSPEND
0x19 MAG_MODE_NORMAL
0x1A MAG_MODE_LOWPOWER
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_read_addr ( u8 v_mag_read_addr_u8)

It used to provide mag read address of auxiliary mag

Parameters
v_mag_read_addr_u8: The value of address need to be read
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_write_addr ( u8 v_mag_write_addr_u8)

mag write address writes the address of auxiliary mag to write

Parameters
v_mag_write_addr_u8The data of auxiliary mag address to write data
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_mag_write_data ( u8 v_mag_write_data_u8)

This writes the data will be wrote to mag

Parameters
v_mag_write_data_u8The value of mag data
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_nvm_counter ( u8 v_nvm_counter_u8)
Parameters
v_nvm_counter_u8The value of NVM counter
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_nvm_prog_enable ( u8 v_nvm_prog_u8)
Parameters
v_nvm_prog_u8: The value of NVM program enable
Value Description
0 DISABLE
1 ENABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_nvm_rdy ( u8 v_nvm_rdy_u8)
Parameters
v_nvm_rdy_u8: The value of NVM ready status
value status
0 NVM write operation in progress
1 NVM is ready to accept a new write trigger
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_output_enable ( u8  v_channel_u8,
u8 v_output_enable_u8 
)

interrupt1 - bit 3 interrupt2 - bit 7

Parameters
v_channel_u8The value of output enable selection
v_channel_u8 level selection
0 BMI160_INTR1_OUTPUT_TYPE
1 BMI160_INTR2_OUTPUT_TYPE
v_output_enable_u8: The value of output enable of interrupt enable
value Behaviour
0x01 INTERRUPT OUTPUT ENABLED
0x00 INTERRUPT OUTPUT DISABLED
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_paging_enable ( u8 v_page_enable_u8)
Parameters
v_page_enable_u8The value of page enable
value page
0 DISABLE
1 ENABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

struct bmi160_t* bmi160_get_ptr ( void  )
Returns
the reference and values of bmi160_t
BMI160_RETURN_FUNCTION_TYPE bmi160_get_pullup_configuration ( u8 v_control_pullup_u8)
Parameters
v_control_pullup_u8The value of pull up register
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_get_sensor_time ( u32 v_sensor_time_u32)
Parameters
v_sensor_time_u32: The value of sensor time
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_spare0_trim ( u8 v_spare0_trim_u8)
Parameters
v_spare0_trim_u8The value of spare zero
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_spi3 ( u8 v_spi3_u8)
Parameters
v_spi3_u8: The value of SPI mode selection
Value Description
0 SPI 4-wire mode
1 SPI 3-wire mode
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_spi_enable ( u8 v_spi_enable_u8)
Parameters
v_spi_enable_u8The value of Interface selection
Value Description
0x00 I2C Enable
0x01 I2C DISBALE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_any_motion_intr ( u8 v_any_motion_intr_u8)
Parameters
v_any_motion_intr_u8: The status of any-motion interrupt
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_double_tap_intr ( u8 v_double_tap_intr_u8)
Parameters
v_double_tap_intr_u8:The status of double tab interrupt
Note
Double tap interrupt can be configured by the following functions
INTERRUPT MAPPING
bmi160_set_intr_double_tap()
AXIS MAPPING
bmi160_get_stat2_tap_first_x()
bmi160_get_stat2_tap_first_y()
bmi160_get_stat2_tap_first_z()
DURATION
bmi160_set_intr_tap_durn()
THRESHOLD
bmi160_set_intr_tap_thres()
TAP QUIET
bmi160_set_intr_tap_quiet()
TAP SHOCK
bmi160_set_intr_tap_shock()
TAP SOURCE
bmi160_set_intr_tap_source()
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_flat_intr ( u8 v_flat_intr_u8)
Parameters
v_flat_intr_u8: The status of flat interrupt
Note
For flat configuration use the following functions
STATS
bmi160_get_stat0_flat_intr()
bmi160_get_stat3_flat()
INTERRUPT MAPPING
bmi160_set_intr_flat()
THETA
bmi160_set_intr_flat_theta()
HOLD TIME
bmi160_set_intr_flat_hold()
HYSTERESIS
bmi160_set_intr_flat_hyst()
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_orient_intr ( u8 v_orient_intr_u8)
Parameters
v_orient_intr_u8: The status of orient interrupt
Note
For orient interrupt configuration use the following functions
STATUS
bmi160_get_stat0_orient_intr()
AXIS MAPPING
bmi160_get_stat3_orient_xy()
bmi160_get_stat3_orient_z()
bmi160_set_intr_orient_axes_enable()
INTERRUPT MAPPING
bmi160_set_intr_orient()
INTERRUPT OUTPUT
bmi160_set_intr_orient_ud_enable()
THETA
bmi160_set_intr_orient_theta()
HYSTERESIS
bmi160_set_intr_orient_hyst()
BLOCKING
bmi160_set_intr_orient_blocking()
MODE
bmi160_set_intr_orient_mode()
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_pmu_trigger_intr ( u8 v_pmu_trigger_intr_u8)
Parameters
v_pmu_trigger_intr_u8: The status of power mode trigger interrupt
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_significant_intr ( u8 v_significant_intr_u8)
Parameters
v_significant_intr_u8: The status of step motion interrupt
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_single_tap_intr ( u8 v_single_tap_intr_u8)
Parameters
v_single_tap_intr_u8:The status of single tap interrupt
Note
Single tap interrupt can be configured by the following functions
INTERRUPT MAPPING
bmi160_set_intr_single_tap()
AXIS MAPPING
bmi160_get_stat2_tap_first_x()
bmi160_get_stat2_tap_first_y()
bmi160_get_stat2_tap_first_z()
DURATION
bmi160_set_intr_tap_durn()
THRESHOLD
bmi160_set_intr_tap_thres()
TAP QUIET
bmi160_set_intr_tap_quiet()
TAP SHOCK
bmi160_set_intr_tap_shock()
TAP SOURCE
bmi160_set_intr_tap_source()
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat0_step_intr ( u8 v_step_intr_u8)
Parameters
v_step_intr_u8: The status of step detector interrupt
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_data_rdy_intr ( u8 v_data_rdy_intr_u8)
Parameters
v_data_rdy_intr_u8: The status of data ready interrupt
Note
Data ready interrupt configured by following functions
STATUS
bmi160_get_stat1_data_rdy_intr()
INTERRUPT MAPPING
bmi160_set_intr_data_rdy()
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_fifo_full_intr ( u8 v_fifo_full_intr_u8)
Parameters
v_fifo_full_intr_u8: The status of fifo full interrupt
Note
FIFO full interrupt can be configured by following functions
bmi160_set_intr_fifo_full()
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_fifo_wm_intr ( u8 v_fifo_wm_intr_u8)
Parameters
v_fifo_wm_intr_u8: The status of fifo water mark interrupt
Note
FIFO full interrupt can be configured by following functions
bmi160_set_intr_fifo_wm()
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_high_g_intr ( u8 v_high_g_intr_u8)
Parameters
v_high_g_intr_u8: The status of high_g interrupt
Note
High_g interrupt configured by following functions
STATUS
bmi160_get_stat1_high_g_intr()
AXIS MAPPING
bmi160_get_stat3_high_g_first_x()
bmi160_get_stat3_high_g_first_y()
bmi160_get_stat3_high_g_first_z()
SIGN MAPPING
bmi160_get_stat3_high_g_first_sign()
INTERRUPT MAPPING
bmi160_set_intr_high_g()
HYSTERESIS
bmi160_set_intr_high_g_hyst()
DURATION
bmi160_set_intr_high_g_durn()
THRESHOLD
bmi160_set_intr_high_g_thres()
SOURCE
bmi160_set_intr_low_high_source()
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_low_g_intr ( u8 v_low_g_intr_u8)
Parameters
v_low_g_intr_u8: The status of low_g interrupt
Note
Low_g interrupt configured by following functions
STATUS
bmi160_get_stat1_low_g_intr()
INTERRUPT MAPPING
bmi160_set_intr_low_g()
SOURCE
bmi160_set_intr_low_high_source()
DURATION
bmi160_set_intr_low_g_durn()
THRESHOLD
bmi160_set_intr_low_g_thres()
HYSTERESIS
bmi160_set_intr_low_g_hyst()
MODE
bmi160_set_intr_low_g_mode()
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat1_nomotion_intr ( u8 v_nomotion_intr_u8)
Parameters
v_nomotion_intr_u8: The status of no motion interrupt
Note
No motion interrupt can be configured by following function
STATUS
bmi160_get_stat1_nomotion_intr()
INTERRUPT MAPPING
bmi160_set_intr_nomotion()
DURATION
bmi160_set_intr_slow_no_motion_durn()
THRESHOLD
bmi160_set_intr_slow_no_motion_thres()
SLOW/NO MOTION SELECT
bmi160_set_intr_slow_no_motion_select()
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_any_motion_first_x ( u8 v_anymotion_first_x_u8)
Parameters
v_anymotion_first_x_u8: The status of any motion first x interrupt
value status
0 not triggered
1 triggered by x axis
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_any_motion_first_y ( u8 v_any_motion_first_y_u8)
Parameters
v_any_motion_first_y_u8: The status of any motion first y interrupt
value status
0 not triggered
1 triggered by y axis
@return results of bus communication function
@retval 0 -> Success
@retval -1 -> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_any_motion_first_z ( u8 v_any_motion_first_z_u8)
Parameters
v_any_motion_first_z_u8: The status of any motion first z interrupt
value status
0 not triggered
1 triggered by y axis
@return results of bus communication function
@retval 0 -> Success
@retval -1 -> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_any_motion_sign ( u8 v_anymotion_sign_u8)
Parameters
v_anymotion_sign_u8: The status of any motion sign
value sign
0 positive
1 negative
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_tap_first_x ( u8 v_tap_first_x_u8)
Parameters
v_tap_first_x_u8:The status of any motion tap first x
value status
0 not triggered
1 triggered by x axis
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_tap_first_y ( u8 v_tap_first_y_u8)
Parameters
v_tap_first_y_u8:The status of tap first y interrupt
value status
0 not triggered
1 triggered by y axis
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_tap_first_z ( u8 v_tap_first_z_u8)
Parameters
v_tap_first_z_u8:The status of tap first z interrupt
value status
0 not triggered
1 triggered by z axis
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat2_tap_sign ( u8 v_tap_sign_u8)
Parameters
v_tap_sign_u8: The status of tap sign
value sign
0 positive
1 negative
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_flat ( u8 v_flat_u8)
Parameters
v_flat_u8: The status of flat interrupt
value status
0x00 non flat
0x01 flat position
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_high_g_first_x ( u8 v_high_g_first_x_u8)
Parameters
v_high_g_first_x_u8:The status of high_g first x
value status
0 not triggered
1 triggered by x axis
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_high_g_first_y ( u8 v_high_g_first_y_u8)
Parameters
v_high_g_first_y_u8: The status of high_g first y
value status
0 not triggered
1 triggered by y axis
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_high_g_first_z ( u8 v_high_g_first_z_u8)
Parameters
v_high_g_first_z_u8: The status of high_g first z
value status
0 not triggered
1 triggered by z axis
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_high_g_sign ( u8 v_high_g_sign_u8)
Parameters
v_high_g_sign_u8:The status of high sign
value sign
0 positive
1 negative
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_orient_xy ( u8 v_orient_xy_u8)
Parameters
v_orient_xy_u8:The status of orient_xy plane
value status
0x00 portrait upright
0x01 portrait upside down
0x02 landscape left
0x03 landscape right
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_stat3_orient_z ( u8 v_orient_z_u8)
Parameters
v_orient_z_u8:The status of orient z
value status
0x00 upward looking
0x01 downward looking
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_step_config ( u16 v_step_config_u16)
Parameters
v_step_config_u16: The value of step configuration
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_get_step_counter_enable ( u8 v_step_counter_u8)
Parameters
v_step_counter_u8: The value of step counter enable
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_get_step_detector_enable ( u8 v_step_intr_u8)
Parameters
v_step_intr_u8: The value of step detector interrupt enable
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_get_target_page ( u8 v_target_page_u8)
Parameters
v_target_page_u8The value of target page
value page
0 User data/configure page
1 Chip level trim/test page
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_get_temp ( s16 v_temp_s16)
Parameters
v_temp_s16: The value of temperature
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_init ( struct bmi160_t bmi160)
Parameters
bmi160: structure pointer
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
Note
While changing the parameter of the bmi160_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)

+ Here is the call graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_map_significant_motion_intr ( u8  v_significant_u8)
Parameters
v_significant_u8: The value of interrupt selection
value interrupt
0 BMI160_MAP_INTR1
1 BMI160_MAP_INTR2
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_map_step_detector_intr ( u8  v_step_detector_u8)
Parameters
v_step_detector_u8: The value of interrupt selection
value interrupt
0 BMI160_MAP_INTR1
1 BMI160_MAP_INTR2
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_gyro_sensor_time ( u8  accel_gyro_sensortime_select,
struct bmi160_sensortime_accel_gyro_data accel_gyro_sensor_time 
)
Parameters
accel_gyro_sensortime_select: The value of configuration
value output
0 Accel data and Sensor time
1 Accel data ,Gyro data and Sensor time
accel_gyro_sensor_time: the value of accel gyro and sensor time data
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_x ( s16 v_accel_x_s16)
Parameters
v_accel_x_s16: The value of accel x
Note
For accel configuration use the following functions
bmi160_set_accel_output_data_rate()
bmi160_set_accel_bw()
bmi160_set_accel_under_sampling_parameter()
bmi160_set_accel_range()
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_xyz ( struct bmi160_accel_t accel)
Parameters
accel:The value of accel xyz
Note
For accel configuration use the following functions
bmi160_set_accel_output_data_rate()
bmi160_set_accel_bw()
bmi160_set_accel_under_sampling_parameter()
bmi160_set_accel_range()
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_y ( s16 v_accel_y_s16)
Parameters
v_accel_y_s16: The value of accel y
Note
For accel configuration use the following functions
bmi160_set_accel_output_data_rate()
bmi160_set_accel_bw()
bmi160_set_accel_under_sampling_parameter()
bmi160_set_accel_range()
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_read_accel_z ( s16 v_accel_z_s16)
Parameters
v_accel_z_s16: The value of accel z
Note
For accel configuration use the following functions
bmi160_set_accel_output_data_rate()
bmi160_set_accel_bw()
bmi160_set_accel_under_sampling_parameter()
bmi160_set_accel_range()
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_read_bmm150_mag_trim ( void  )
Note
Before reading the mag trimming values make sure the following two points are addressed
  1. Make sure the mag interface is enabled or not, by using the bmi160_get_if_mode() function. If mag interface is not enabled set the value of 0x02 to the function bmi160_get_if_mode(0x02)
  1. And also confirm the secondary-interface power mode is not in the SUSPEND mode. by using the function bmi160_get_mag_pmu_status(). If the secondary-interface power mode is in SUSPEND mode set the value of 0x19(NORMAL mode)by using the bmi160_set_command_register(0x19) function.
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:

BMI160_RETURN_FUNCTION_TYPE bmi160_read_fifo_header_data ( u8  v_mag_if_u8,
struct bmi160_fifo_data_header_t header_data 
)
Note
Configure the below functions for FIFO header mode
1. bmi160_set_fifo_down_gyro()
2. bmi160_set_gyro_fifo_filter_data()
3. bmi160_set_fifo_down_accel()
4. bmi160_set_accel_fifo_filter_dat()
5. bmi160_set_fifo_mag_enable()
6. bmi160_set_fifo_accel_enable()
7. bmi160_set_fifo_gyro_enable()
8. bmi160_set_fifo_header_enable()
For interrupt configuration
1. bmi160_set_intr_fifo_full()
2. bmi160_set_intr_fifo_wm()
3. bmi160_set_fifo_tag_intr2_enable()
4. bmi160_set_fifo_tag_intr1_enable()
The fifo reads the whole 1024 bytes and processing the data
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_read_fifo_header_data_user_defined_length ( u16  v_fifo_user_length_u16,
u8  v_mag_if_mag_u8,
struct bmi160_fifo_data_header_t fifo_header_data 
)
Note
Configure the below functions for FIFO header mode
1. bmi160_set_fifo_down_gyro()
2. bmi160_set_gyro_fifo_filter_data()
3. bmi160_set_fifo_down_accel()
4. bmi160_set_accel_fifo_filter_dat()
5. bmi160_set_fifo_mag_enable()
6. bmi160_set_fifo_accel_enable()
7. bmi160_set_fifo_gyro_enable()
8. bmi160_set_fifo_header_enable()
For interrupt configuration
1. bmi160_set_intr_fifo_full()
2. bmi160_set_intr_fifo_wm()
3. bmi160_set_fifo_tag_intr2_enable()
4. bmi160_set_fifo_tag_intr1_enable()
The fifo reads the whole 1024 bytes and processing the data
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:

BMI160_RETURN_FUNCTION_TYPE bmi160_read_fifo_headerless_mode ( u8  v_mag_if_u8,
struct bmi160_fifo_data_header_less_t headerless_data 
)
Note
Configure the below functions for FIFO header less mode
1. bmi160_set_fifo_down_gyro
2. bmi160_set_gyro_fifo_filter_data
3. bmi160_set_fifo_down_accel
4. bmi160_set_accel_fifo_filter_dat
5. bmi160_set_fifo_mag_enable
6. bmi160_set_fifo_accel_enable
7. bmi160_set_fifo_gyro_enable
For interrupt configuration
1. bmi160_set_intr_fifo_full
2. bmi160_set_intr_fifo_wm
3. bmi160_set_fifo_tag_intr2_enable
4. bmi160_set_fifo_tag_intr1_enable
The fifo reads the whole 1024 bytes and processing the data
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_read_fifo_headerless_mode_user_defined_length ( u16  v_fifo_user_length_u16,
struct bmi160_fifo_data_header_less_t fifo_data,
u8  v_mag_if_mag_u8 
)
Parameters
v_fifo_user_length_u16The value of length of fifo read data
v_mag_if_mag_u8: the mag interface data
fifo_data: the pointer to fifo_data_header_less_t structure
Note
Configure the below functions for FIFO header less mode
1. bmi160_set_fifo_down_gyro
2. bmi160_set_gyro_fifo_filter_data
3. bmi160_set_fifo_down_accel
4. bmi160_set_accel_fifo_filter_dat
5. bmi160_set_fifo_mag_enable
6. bmi160_set_fifo_accel_enable
7. bmi160_set_fifo_gyro_enable
For interrupt configuration
1. bmi160_set_intr_fifo_full
2. bmi160_set_intr_fifo_wm
3. bmi160_set_fifo_tag_intr2_enable
4. bmi160_set_fifo_tag_intr1_enable
The fifo reads the whole 1024 bytes and processing the data
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:

BMI160_RETURN_FUNCTION_TYPE bmi160_read_gyro_x ( s16 v_gyro_x_s16)
Parameters
v_gyro_x_s16: The value of gyro x data
Note
Gyro Configuration use the following function
bmi160_set_gyro_output_data_rate()
bmi160_set_gyro_bw()
bmi160_set_gyro_range()
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_read_gyro_xyz ( struct bmi160_gyro_t gyro)
Parameters
gyro: The value of gyro xyz
Note
Gyro Configuration use the following function
bmi160_set_gyro_output_data_rate()
bmi160_set_gyro_bw()
bmi160_set_gyro_range()
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_read_gyro_y ( s16 v_gyro_y_s16)
Parameters
v_gyro_y_s16: The value of gyro y data
Note
Gyro Configuration use the following function
bmi160_set_gyro_output_data_rate()
bmi160_set_gyro_bw()
bmi160_set_gyro_range()
Returns
results of bus communication function
Return values
0-> Success
-1-> Error result of communication routines
BMI160_RETURN_FUNCTION_TYPE bmi160_read_gyro_z ( s16 v_gyro_z_s16)
Parameters
v_gyro_z_s16: The value of gyro z data
Note
Gyro Configuration use the following function
bmi160_set_gyro_output_data_rate()
bmi160_set_gyro_bw()
bmi160_set_gyro_range()
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_r ( s16 v_mag_r_s16)
Parameters
v_mag_r_s16: The value of BMM150 r data
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_x ( s16 v_mag_x_s16,
u8  v_sensor_select_u8 
)

The mag sensor data read form auxiliary mag

Parameters
v_mag_x_s16: The value of mag x
v_sensor_select_u8: Mag selection value
value sensor
0 BMM150
1 AKM09911 or AKM09912
Note
For mag data output rate configuration use the following function
bmi160_set_mag_output_data_rate()
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_xyz ( struct bmi160_mag_t mag,
u8  v_sensor_select_u8 
)

The mag sensor data read form auxiliary mag

Parameters
mag: The value of mag xyz data
v_sensor_select_u8: Mag selection value
value sensor
0 BMM150
1 AKM09911 or AKM09912
Note
For mag data output rate configuration use the following function
bmi160_set_mag_output_data_rate()
Returns
results of bus communication function
Return values
0-> Success
-1-> Error *
BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_xyzr ( struct bmi160_mag_xyzr_t mag)
  • The mag sensor data read form auxiliary mag
Parameters
mag: The value of mag-BMM150 xyzr data
Note
For mag data output rate configuration use the following function
bmi160_set_mag_output_data_rate()
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_y ( s16 v_mag_y_s16,
u8  v_sensor_select_u8 
)

The mag sensor data read form auxiliary mag

Parameters
v_mag_y_s16: The value of mag y
v_sensor_select_u8: Mag selection value
value sensor
0 BMM150
1 AKM09911 or AKM09912
Note
For mag data output rate configuration use the following function
bmi160_set_mag_output_data_rate()
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_read_mag_z ( s16 v_mag_z_s16,
u8  v_sensor_select_u8 
)

The mag sensor data read form auxiliary mag

Parameters
v_mag_z_s16: The value of mag z
v_sensor_select_u8: Mag selection value
value sensor
0 BMM150
1 AKM09911 or AKM09912
Note
For mag data output rate configuration use the following function
bmi160_set_mag_output_data_rate()
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_read_reg ( 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

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_read_step_count ( s16 v_step_cnt_s16)
Parameters
v_step_cnt_s16: The value of step counter
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_second_if_mag_compensate_xyz ( struct bmi160_mag_fifo_data_t  mag_fifo_data,
u8  v_mag_second_if_u8 
)
Note
v_mag_x_s16: The value of mag x data
v_mag_y_s16: The value of mag y data
v_mag_z_s16: The value of mag z data
v_mag_r_s16: The value of mag r data
Parameters
v_mag_second_if_u8The value of mag selection
value v_mag_second_if_u8
0 BMM150
1 AKM09911
2 AKM09912
3 YAS532
4 YAS537
Parameters
mag_fifo_dataThe value of compensated mag xyz data
Returns

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_bw ( u8  v_bw_u8)

bandwidth parameter determines filter configuration(acc_us=0) and averaging for under sampling mode(acc_us=1)

Parameters
v_bw_u8: The value of accel bandwidth
Note
accel bandwidth depends on under sampling parameter
under sampling parameter cab be set by the function "BMI160_SET_ACCEL_UNDER_SAMPLING_PARAMETER"
Filter configuration
accel_us Filter configuration
0x00 OSR4 mode
0x01 OSR2 mode
0x02 normal mode
0x03 CIC mode
0x04 Reserved
0x05 Reserved
0x06 Reserved
0x07 Reserved
accel under sampling mode
accel_us Under sampling mode
0x00 no averaging
0x01 average 2 samples
0x02 average 4 samples
0x03 average 8 samples
0x04 average 16 samples
0x05 average 32 samples
0x06 average 64 samples
0x07 average 128 samples
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_fifo_filter_data ( u8  v_accel_fifo_filter_u8)
Parameters
v_accel_fifo_filter_u8:The value of accel filter data
value accel_fifo_filter_data
0x00 Unfiltered data
0x01 Filtered data
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_foc_trigger ( u8  v_axis_u8,
u8  v_foc_accel_u8,
s8 v_accel_offset_s8 
)

This API writes each axis individually FOC_X_AXIS - bit 4 and 5 FOC_Y_AXIS - bit 2 and 3 FOC_Z_AXIS - bit 0 and 1

Parameters
v_foc_accel_u8The value of accel offset compensation
value Behaviour
0x00 disable
0x01 +1g
0x01 -1g
0x01 0g
v_axis_u8The value of accel offset axis selection
value axis
0 FOC_X_AXIS
1 FOC_Y_AXIS
2 FOC_Z_AXIS
v_accel_offset_s8The accel offset value
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_offset_compensation_xaxis ( s8  v_accel_off_x_s8)
Parameters
v_accel_off_x_s8The value of accel manual offset compensation of x axis
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_offset_compensation_yaxis ( s8  v_accel_off_y_s8)
Parameters
v_accel_off_y_s8The value of accel manual offset compensation of y axis
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_offset_compensation_zaxis ( s8  v_accel_off_z_s8)
Parameters
v_accel_off_z_s8The value of accel manual offset compensation of z axis
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_offset_enable ( u8  v_accel_off_enable_u8)
Parameters
v_accel_off_enable_u8The value of accel offset enable
value Description
0x01 ENABLE
0x00 DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_output_data_rate ( u8  v_output_data_rate_u8,
u8  v_accel_bw_u8 
)
Parameters
v_output_data_rate_u8:The value of accel output date rate
value output data rate
0 BMI160_ACCEL_OUTPUT_DATA_RATE_RESERVED
1 BMI160_ACCEL_OUTPUT_DATA_RATE_0_78HZ
2 BMI160_ACCEL_OUTPUT_DATA_RATE_1_56HZ
3 BMI160_ACCEL_OUTPUT_DATA_RATE_3_12HZ
4 BMI160_ACCEL_OUTPUT_DATA_RATE_6_25HZ
5 BMI160_ACCEL_OUTPUT_DATA_RATE_12_5HZ
6 BMI160_ACCEL_OUTPUT_DATA_RATE_25HZ
7 BMI160_ACCEL_OUTPUT_DATA_RATE_50HZ
8 BMI160_ACCEL_OUTPUT_DATA_RATE_100HZ
9 BMI160_ACCEL_OUTPUT_DATA_RATE_200HZ
10 BMI160_ACCEL_OUTPUT_DATA_RATE_400HZ
11 BMI160_ACCEL_OUTPUT_DATA_RATE_800HZ
12 BMI160_ACCEL_OUTPUT_DATA_RATE_1600HZ
v_accel_bw_u8:The value of accel selected accel bandwidth
value output data rate
0 BMI160_ACCEL_OSR4_AVG1
1 BMI160_ACCEL_OSR2_AVG2
2 BMI160_ACCEL_NORMAL_AVG4
3 BMI160_ACCEL_CIC_AVG8
4 BMI160_ACCEL_RES_AVG2
5 BMI160_ACCEL_RES_AVG4
6 BMI160_ACCEL_RES_AVG8
7 BMI160_ACCEL_RES_AVG16
8 BMI160_ACCEL_RES_AVG32
9 BMI160_ACCEL_RES_AVG64
10 BMI160_ACCEL_RES_AVG128
@note Verify the accel bandwidth before setting the

output data rate

bandwidth output data rate under sampling
OSR4 12.5 TO 1600 0
OSR2 12.5 TO 1600 0
NORMAL 12.5 TO 1600 0
CIC 12.5 TO 1600 0
AVG2 0.78 TO 400 1
AVG4 0.78 TO 200 1
AVG8 0.78 TO 100 1
AVG16 0.78 TO 50 1
AVG32 0.78 TO 25 1
AVG64 0.78 TO 12.5 1
AVG128 0.78 TO 6.25 1
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:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_range ( u8  v_range_u8)
Parameters
v_range_u8: The value of accel g range
value g_range
0x03 BMI160_ACCEL_RANGE_2G
0x05 BMI160_ACCEL_RANGE_4G
0x08 BMI160_ACCEL_RANGE_8G
0x0C BMI160_ACCEL_RANGE_16G
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_selftest_amp ( u8  v_accel_selftest_amp_u8)
Parameters
v_accel_selftest_amp_u8: The value of accel self test amplitude
Value Description
0x00 LOW
0x01 HIGH
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_selftest_axis ( u8  v_accel_selftest_axis_u8)
Parameters
v_accel_selftest_axis_u8: The value of accel self test axis selection
Value Description
0x00 disabled
0x01 x-axis
0x02 y-axis
0x03 z-axis
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_selftest_sign ( u8  v_accel_selftest_sign_u8)
Parameters
v_accel_selftest_sign_u8The value of accel self test axis sign
Value Description
0x00 negative
0x01 positive
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_accel_under_sampling_parameter ( u8  v_accel_under_sampling_u8)
Parameters
v_accel_under_sampling_u8: The value of accel under sampling
value under_sampling
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_bmm150_mag_and_secondary_if_power_mode ( u8  v_mag_sec_if_pow_mode_u8)
Note
Before set the mag power mode make sure the following two point is addressed Make sure the mag interface is enabled or not, by using the bmi160_get_if_mode() function. If mag interface is not enabled set the value of 0x02 to the function bmi160_get_if_mode(0x02)
Parameters
v_mag_sec_if_pow_mode_u8: The value of mag power mode
value mode
0 BMI160_MAG_FORCE_MODE
1 BMI160_MAG_SUSPEND_MODE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_bmm150_mag_presetmode ( u8  v_mode_u8)
Note
Before set the mag preset mode make sure the following two points are addressed
  1. Make sure the mag interface is enabled or not, by using the bmi160_get_if_mode() function. If mag interface is not enabled set the value of 0x02 to the function bmi160_get_if_mode(0x02)
  1. And also confirm the secondary-interface power mode is not in the SUSPEND mode. by using the function bmi160_get_mag_pmu_status(). If the secondary-interface power mode is in SUSPEND mode set the value of 0x19(NORMAL mode)by using the bmi160_set_command_register(0x19) function.
Parameters
v_mode_u8The value of pre-set mode selection value
value pre_set mode
1 BMI160_MAG_PRESETMODE_LOWPOWER
2 BMI160_MAG_PRESETMODE_REGULAR
3 BMI160_MAG_PRESETMODE_HIGHACCURACY
4 BMI160_MAG_PRESETMODE_ENHANCED
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:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_command_register ( u8  v_command_reg_u8)
Parameters
v_command_reg_u8: The value to write command register
value Description
0x00 Reserved
0x03 Starts fast offset calibration for the accel and gyro
0x10 Sets the PMU mode for the Accelerometer to suspend
0x11 Sets the PMU mode for the Accelerometer to normal
0x12 Sets the PMU mode for the Accelerometer Lowpower
0x14 Sets the PMU mode for the Gyroscope to suspend
0x15 Sets the PMU mode for the Gyroscope to normal
0x16 Reserved
0x17 Sets the PMU mode for the Gyroscope to fast start-up
0x18 Sets the PMU mode for the Magnetometer to suspend
0x19 Sets the PMU mode for the Magnetometer to normal
0x1A Sets the PMU mode for the Magnetometer to Lowpower
0xB0 Clears all data in the FIFO
0xB1 Resets the interrupt engine
0xB2 step_cnt_clr Clears the step counter
0xB6 Triggers a reset
0x37 See extmode_en_last
0x9A See extmode_en_last
0xC0 Enable the extended mode
0xC4 Erase NVM cell
0xC8 Load NVM cell
0xF0 Reset acceleration data path
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_accel_enable ( u8  v_fifo_accel_u8)
Parameters
v_fifo_accel_u8: The value of fifo accel enble
value fifo accel
0x00 no accel data is stored
0x01 accel data is stored
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_down_accel ( u8  v_fifo_down_u8)
Parameters
v_fifo_down_u8:The value of accel fifo down
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_down_gyro ( u8  v_fifo_down_gyro_u8)
Parameters
v_fifo_down_gyro_u8:The value of gyro fifo down
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_gyro_enable ( u8  v_fifo_gyro_u8)
Parameters
v_fifo_gyro_u8: The value of fifo gyro enble
value fifo gyro
0x00 no gyro data is stored
0x01 gyro data is stored
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_header_enable ( u8  v_fifo_header_u8)
Parameters
v_fifo_header_u8:The value of fifo header
value fifo header
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_mag_enable ( u8  v_fifo_mag_u8)
Parameters
v_fifo_mag_u8: The value of fifo mag enble
value fifo mag
0x00 no magnetometer data is stored
0x01 magnetometer data is stored
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_tag_intr1_enable ( u8  v_fifo_tag_intr1_u8)
Parameters
v_fifo_tag_intr1_u8:The value of fifo tag interrupt1
value fifo tag interrupt
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_tag_intr2_enable ( u8  v_fifo_tag_intr2_u8)
Parameters
v_fifo_tag_intr2_u8: The value of fifo tag interrupt
value fifo tag interrupt
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_time_enable ( u8  v_fifo_time_enable_u8)
Parameters
v_fifo_time_enable_u8: The value of sensor time
value fifo sensor time
0x00 do not return sensortime frame
0x01 return sensortime frame
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_fifo_wm ( u8  v_fifo_wm_u8)
Parameters
v_fifo_wm_u8: The value of fifo water mark level
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_foc_accel_x ( u8  v_foc_accel_x_u8)
Parameters
v_foc_accel_x_u8: the value of accel offset compensation x axis
value Behaviour
0x00 disable
0x01 +1g
0x01 -1g
0x01 0g
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_foc_accel_y ( u8  v_foc_accel_y_u8)
Parameters
v_foc_accel_y_u8: the value of accel offset compensation y axis
value Behaviour
0x00 disable
0x01 +1g
0x02 -1g
0x03 0g
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_foc_accel_z ( u8  v_foc_accel_z_u8)
Parameters
v_foc_accel_z_u8: the value of accel offset compensation z axis
value Behaviour
0x00 disable
0x01 +1g
0x01 -1g
0x01 0g
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_foc_gyro_enable ( u8  v_foc_gyro_u8,
s16 v_gyro_off_x_s16,
s16 v_gyro_off_y_s16,
s16 v_gyro_off_z_s16 
)
Parameters
v_foc_gyro_u8: The value of gyro fast offset enable
value Description
0 fast offset compensation disabled
1 fast offset compensation enabled
v_gyro_off_x_s16: The value of gyro fast offset x axis data
v_gyro_off_y_s16: The value of gyro fast offset y axis data
v_gyro_off_z_s16: The value of gyro fast offset z axis data
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_bw ( u8  v_bw_u8)
Parameters
v_bw_u8: The value of gyro bandwidth
value gyro bandwidth
0x00 BMI160_GYRO_OSR4_MODE
0x01 BMI160_GYRO_OSR2_MODE
0x02 BMI160_GYRO_NORMAL_MODE
0x03 BMI160_GYRO_CIC_MODE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_fifo_filter_data ( u8  v_gyro_fifo_filter_data_u8)
Parameters
v_gyro_fifo_filter_data_u8:The value of gyro filter data
value gyro_fifo_filter_data
0x00 Unfiltered data
0x01 Filtered data
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_offset_compensation_xaxis ( s16  v_gyro_off_x_s16)
Parameters
v_gyro_off_x_s16The value of gyro manual offset compensation of x axis
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_offset_compensation_yaxis ( s16  v_gyro_off_y_s16)
Parameters
v_gyro_off_y_s16The value of gyro manual offset compensation of y axis
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_offset_compensation_zaxis ( s16  v_gyro_off_z_s16)
Parameters
v_gyro_off_z_s16The value of gyro manual offset compensation of z axis
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_offset_enable ( u8  v_gyro_off_enable_u8)
Parameters
v_gyro_off_enable_u8The value of gyro offset enable
value Description
0x01 ENABLE
0x00 DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_output_data_rate ( u8  v_output_data_rate_u8)
Parameters
v_output_data_rate_u8:The value of gyro output data rate
value gyro output data rate
0x00 BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED
0x01 BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED
0x02 BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED
0x03 BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED
0x04 BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED
0x05 BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED
0x06 BMI160_GYRO_OUTPUT_DATA_RATE_25HZ
0x07 BMI160_GYRO_OUTPUT_DATA_RATE_50HZ
0x08 BMI160_GYRO_OUTPUT_DATA_RATE_100HZ
0x09 BMI160_GYRO_OUTPUT_DATA_RATE_200HZ
0x0A BMI160_GYRO_OUTPUT_DATA_RATE_400HZ
0x0B BMI160_GYRO_OUTPUT_DATA_RATE_800HZ
0x0C BMI160_GYRO_OUTPUT_DATA_RATE_1600HZ
0x0D BMI160_GYRO_OUTPUT_DATA_RATE_3200HZ
0x0E BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED
0x0F BMI160_GYRO_OUTPUT_DATA_RATE_RESERVED
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_range ( u8  v_range_u8)
Parameters
v_range_u8: The value of gyro range
value range
0x00 BMI160_GYRO_RANGE_2000_DEG_SEC
0x01 BMI160_GYRO_RANGE_1000_DEG_SEC
0x02 BMI160_GYRO_RANGE_500_DEG_SEC
0x03 BMI160_GYRO_RANGE_250_DEG_SEC
0x04 BMI160_GYRO_RANGE_125_DEG_SEC
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_selftest_start ( u8  v_gyro_selftest_start_u8)
Parameters
v_gyro_selftest_start_u8The value of gyro self test start
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_sleep_state ( u8  v_gyro_sleep_state_u8)
Parameters
v_gyro_sleep_state_u8: The value of gyro sleep mode
Value Description
0x00 Sleep transition to fast wake up state
0x01 Sleep transition to suspend state
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_sleep_trigger ( u8  v_gyro_sleep_trigger_u8)
Parameters
v_gyro_sleep_trigger_u8: The value of gyro sleep trigger
Value Description
0x00 nomotion: no / Not INT1 pin: no / INT2 pin: no
0x01 nomotion: no / Not INT1 pin: no / INT2 pin: yes
0x02 nomotion: no / Not INT1 pin: yes / INT2 pin: no
0x03 nomotion: no / Not INT1 pin: yes / INT2 pin: yes
0x04 nomotion: yes / Not INT1 pin: no / INT2 pin: no
0x05 anymotion: yes / Not INT1 pin: no / INT2 pin: yes
0x06 anymotion: yes / Not INT1 pin: yes / INT2 pin: no
0x07 anymotion: yes / Not INT1 pin: yes / INT2 pin: yes
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_wakeup_intr ( u8  v_gyro_wakeup_intr_u8)
Parameters
v_gyro_wakeup_intr_u8: The valeu of gyro wakeup interrupt
Value Description
0x00 DISABLE
0x01 ENABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_gyro_wakeup_trigger ( u8  v_gyro_wakeup_trigger_u8)
Parameters
v_gyro_wakeup_trigger_u8: The value of gyro wakeup trigger
Value Description
0x00 anymotion: no / INT1 pin: no
0x01 anymotion: no / INT1 pin: yes
0x02 anymotion: yes / INT1 pin: no
0x03 anymotion: yes / INT1 pin: yes
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_i2c_device_addr ( u8  v_i2c_device_addr_u8)
Parameters
v_i2c_device_addr_u8: The value of mag I2C device address
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_i2c_wdt_enable ( u8  v_i2c_wdt_u8)
Parameters
v_i2c_wdt_u8: The value of I2C watchdog enable
Value Description
0 DISABLE
1 ENABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_i2c_wdt_select ( u8  v_i2c_wdt_u8)
Parameters
v_i2c_wdt_u8: The value of I2C watch dog timer
Value Description
0 I2C watchdog v_timeout_u8 after 1 ms
1 I2C watchdog v_timeout_u8 after 50 ms
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_if_mode ( u8  v_if_mode_u8)
Parameters
v_if_mode_u8: The value of interface configuration mode
Value Description
0x00 Primary interface:autoconfig / secondary interface:off
0x01 Primary interface:I2C / secondary interface:OIS
0x02 Primary interface:autoconfig/secondary interface:Magnetometer
0x03 Reserved
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_input_enable ( u8  v_channel_u8,
u8  v_input_en_u8 
)

interrupt1 - bit 4 interrupt2 - bit 5

Parameters
v_channel_u8The value of input enable selection
v_channel_u8 input selection
0 BMI160_INTR1_INPUT_ENABLE
1 BMI160_INTR2_INPUT_ENABLE
v_input_en_u8: The value of input enable of interrupt enable
value Behaviour
0x01 BMI160_INPUT
0x00 BMI160_OUTPUT
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_any_motion ( u8  v_channel_u8,
u8  v_intr_any_motion_u8 
)

interrupt1 bit 2 in the register 0x55 interrupt2 bit 2 in the register 0x57

Parameters
v_channel_u8The value of any motion selection
v_channel_u8 interrupt
0 BMI160_INTR1_MAP_ANY_MOTION
1 BMI160_INTR2_MAP_ANY_MOTION
v_intr_any_motion_u8: The value of any motion enable
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_any_motion_durn ( u8  v_any_motion_durn_u8)
Parameters
v_any_motion_durn_u8: The value of any motion duration
Note
Any motion duration can be calculated by "v_any_motion_durn_u8 + 1"
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_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 changes according to accel g range accel g range can be set by the function ""
accel_range any motion threshold
2g v_any_motion_thres_u8*3.91 mg
4g v_any_motion_thres_u8*7.81 mg
8g v_any_motion_thres_u8*15.63 mg
16g v_any_motion_thres_u8*31.25 mg
when v_any_motion_thres_u8 = 0
accel_range any motion threshold
2g 1.95 mg
4g 3.91 mg
8g 7.81 mg
16g 15.63 mg
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_data_rdy ( u8  v_channel_u8,
u8  v_intr_data_rdy_u8 
)

interrupt1 bit 7 in the register 0x56 interrupt2 bit 3 in the register 0x56

Parameters
v_channel_u8The value of data ready interrupt selection
v_channel_u8 interrupt
0 BMI160_INTR1_MAP_DATA_RDY
1 BMI160_INTR2_MAP_DATA_RDY
v_intr_data_rdy_u8: The value of data ready interrupt enable
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_double_tap ( u8  v_channel_u8,
u8  v_intr_double_tap_u8 
)

interrupt1 bit 4 in the register 0x55 interrupt2 bit 4 in the register 0x57

Parameters
v_channel_u8The value of double tap interrupt selection
v_channel_u8 interrupt
0 BMI160_INTR1_MAP_DOUBLE_TAP
1 BMI160_INTR2_MAP_DOUBLE_TAP
v_intr_double_tap_u8: The value of double tap enable
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_edge_ctrl ( u8  v_channel_u8,
u8  v_intr_edge_ctrl_u8 
)

interrupt1 - bit 0 interrupt2 - bit 4

Parameters
v_channel_u8The value of edge trigger selection
v_channel_u8 Edge trigger
0 BMI160_INTR1_EDGE_CTRL
1 BMI160_INTR2_EDGE_CTRL
v_intr_edge_ctrl_u8: The value of edge trigger enable
value interrupt enable
0x01 BMI160_EDGE
0x00 BMI160_LEVEL
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_enable_0 ( u8  v_enable_u8,
u8  v_intr_enable_zero_u8 
)
Parameters
v_enable_u8: Value to decided to select interrupt
v_enable_u8 interrupt
0 BMI160_ANY_MOTION_X_ENABLE
1 BMI160_ANY_MOTION_Y_ENABLE
2 BMI160_ANY_MOTION_Z_ENABLE
3 BMI160_DOUBLE_TAP_ENABLE
4 BMI160_SINGLE_TAP_ENABLE
5 BMI160_ORIENT_ENABLE
6 BMI160_FLAT_ENABLE
v_intr_enable_zero_u8: The interrupt enable value
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_enable_1 ( u8  v_enable_u8,
u8  v_intr_enable_1_u8 
)

It read the high_g_x,high_g_y,high_g_z,low_g_enable data ready, fifo full and fifo water mark.

Parameters
v_enable_u8: The value of interrupt enable
v_enable_u8: Value to decided to select interrupt
v_enable_u8 interrupt
0 BMI160_HIGH_G_X_ENABLE
1 BMI160_HIGH_G_Y_ENABLE
2 BMI160_HIGH_G_Z_ENABLE
3 BMI160_LOW_G_ENABLE
4 BMI160_DATA_RDY_ENABLE
5 BMI160_FIFO_FULL_ENABLE
6 BMI160_FIFO_WM_ENABLE
v_intr_enable_1_u8: The interrupt enable value
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_enable_2 ( u8  v_enable_u8,
u8  v_intr_enable_2_u8 
)

It reads no motion x,y and z

Parameters
v_enable_u8The value of interrupt enable
v_enable_u8 interrupt
0 BMI160_NOMOTION_X_ENABLE
1 BMI160_NOMOTION_Y_ENABLE
2 BMI160_NOMOTION_Z_ENABLE
v_intr_enable_2_u8: The interrupt enable value
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_fifo_full ( u8  v_channel_u8,
u8  v_intr_fifo_full_u8 
)

interrupt1 bit 5 in the register 0x56 interrupt2 bit 1 in the register 0x56

Parameters
v_channel_u8The value of fifo full interrupt selection
v_channel_u8 interrupt
0 BMI160_INTR1_MAP_FIFO_FULL
1 BMI160_INTR2_MAP_FIFO_FULL
v_intr_fifo_full_u8: The value of fifo full interrupt enable
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_fifo_wm ( u8  v_channel_u8,
u8  v_intr_fifo_wm_u8 
)

interrupt1 bit 6 in the register 0x56 interrupt2 bit 2 in the register 0x56

Parameters
v_channel_u8The value of fifo Watermark interrupt selection
v_channel_u8 interrupt
0 BMI160_INTR1_MAP_FIFO_WM
1 BMI160_INTR2_MAP_FIFO_WM
v_intr_fifo_wm_u8: The value of fifo Watermark interrupt enable
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_flat ( u8  v_channel_u8,
u8  v_intr_flat_u8 
)

interrupt1 bit 7 in the register 0x55 interrupt2 bit 7 in the register 0x57

Parameters
v_channel_u8The value of flat interrupt selection
v_channel_u8 interrupt
0 BMI160_INTR1_MAP_FLAT
1 BMI160_INTR2_MAP_FLAT
v_intr_flat_u8: The value of flat enable
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_flat_hold ( u8  v_flat_hold_u8)
Parameters
v_flat_hold_u8: The value of flat hold time
value Behaviour
0x00 0ms
0x01 512ms
0x01 1024ms
0x01 2048ms
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_flat_hyst ( u8  v_flat_hyst_u8)
Parameters
v_flat_hyst_u8: The value of flat hysteresis
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_flat_theta ( u8  v_flat_theta_u8)
Parameters
v_flat_theta_u8: The value of flat angle
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_high_g ( u8  v_channel_u8,
u8  v_intr_high_g_u8 
)

interrupt1 bit 1 in the register 0x55 interrupt2 bit 1 in the register 0x57

Parameters
v_channel_u8The value of high_g selection
v_channel_u8 interrupt
0 BMI160_INTR1_MAP_HIGH_G
1 BMI160_INTR2_MAP_HIGH_G
v_intr_high_g_u8: The value of high_g enable
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_high_g_durn ( u8  v_high_g_durn_u8)
Parameters
v_high_g_durn_u8: The value of high duration
Note
High_g interrupt delay triggered according to v_high_g_durn_u8 * 2.5ms in a range from 2.5ms to 640ms
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_high_g_hyst ( u8  v_high_g_hyst_u8)
Parameters
v_high_g_hyst_u8: The value of high hysteresis
Note
High_g hysteresis changes according to accel g range accel g range can be set by the function ""
accel_range high_g hysteresis
2g high_hy*125 mg
4g high_hy*250 mg
8g high_hy*500 mg
16g high_hy*1000 mg
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_high_g_thres ( u8  v_high_g_thres_u8)
Parameters
v_high_g_thres_u8: Pointer holding the value of Threshold
Note
High_g threshold changes according to accel g range accel g range can be set by the function ""
accel_range high_g threshold
2g v_high_g_thres_u8*7.81 mg
4g v_high_g_thres_u8*15.63 mg
8g v_high_g_thres_u8*31.25 mg
16g v_high_g_thres_u8*62.5 mg
when v_high_g_thres_u8 = 0
accel_range high_g threshold
2g 3.91 mg
4g 7.81 mg
8g 15.63 mg
16g 31.25 mg
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_level ( u8  v_channel_u8,
u8  v_intr_level_u8 
)

interrupt1 - bit 1 interrupt2 - bit 5

Parameters
v_channel_u8The value of level condition selection
v_channel_u8 level selection
0 BMI160_INTR1_LEVEL
1 BMI160_INTR2_LEVEL
v_intr_level_u8: The value of level of interrupt enable
value Behaviour
0x01 BMI160_LEVEL_HIGH
0x00 BMI160_LEVEL_LOW
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g ( u8  v_channel_u8,
u8  v_intr_low_g_u8 
)

interrupt1 bit 0 in the register 0x55 interrupt2 bit 0 in the register 0x57

Parameters
v_channel_u8The value of low_g selection
v_channel_u8 interrupt
0 BMI160_INTR1_MAP_LOW_G
1 BMI160_INTR2_MAP_LOW_G
v_intr_low_g_u8: The value of low_g enable
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g_durn ( u8  v_low_g_durn_u8)
Parameters
v_low_g_durn_u8: The value of low_g duration
Note
Low_g duration trigger trigger delay according to "(v_low_g_durn_u8 * 2.5)ms" in a range from 2.5ms to 640ms. the default corresponds delay is 20ms
When low_g data source of interrupt is unfiltered the sensor must not be in low power mode
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g_hyst ( u8  v_low_hyst_u8)
Parameters
v_low_hyst_u8:The value of low_g hysteresis
Note
Low_g hysteresis calculated by v_low_hyst_u8*125 mg
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g_mode ( u8  v_low_g_mode_u8)
Parameters
v_low_g_mode_u8: The value of low_g mode
Value Description
0 single-axis
1 axis-summing
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_g_thres ( u8  v_low_g_thres_u8)
Parameters
v_low_g_thres_u8: The value of low_g threshold
Note
Low_g interrupt trigger threshold according to (v_low_g_thres_u8 * 7.81)mg for v_low_g_thres_u8 > 0 3.91 mg for v_low_g_thres_u8 = 0 The threshold range is form 3.91mg to 2.000mg
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_low_high_source ( u8  v_low_high_source_u8)
Parameters
v_low_high_source_u8: The value of the tap source
value Description
0x01 UNFILTER_DATA
0x00 FILTER_DATA
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_motion_source ( u8  v_motion_source_u8)
Parameters
v_motion_source_u8: The value of the any/no motion interrupt source
value Description
0x01 UNFILTER_DATA
0x00 FILTER_DATA
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_nomotion ( u8  v_channel_u8,
u8  v_intr_nomotion_u8 
)

interrupt1 bit 3 in the register 0x55 interrupt2 bit 3 in the register 0x57

Parameters
v_channel_u8The value of no motion selection
v_channel_u8 interrupt
0 BMI160_INTR1_MAP_NOMO
1 BMI160_INTR2_MAP_NOMO
v_intr_nomotion_u8: The value of no motion enable
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient ( u8  v_channel_u8,
u8  v_intr_orient_u8 
)

interrupt1 bit 6 in the register 0x55 interrupt2 bit 6 in the register 0x57

Parameters
v_channel_u8The value of orient interrupt selection
v_channel_u8 interrupt
0 BMI160_INTR1_MAP_ORIENT
1 BMI160_INTR2_MAP_ORIENT
v_intr_orient_u8: The value of orient enable
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_axes_enable ( u8  v_orient_axes_u8)
Parameters
v_orient_axes_u8: The value of orient axes assignment
value Behaviour Name
0x00 x = x, y = y, z = zorient_ax_noex
0x01 x = y, y = z, z = xorient_ax_ex
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_blocking ( u8  v_orient_blocking_u8)
Parameters
v_orient_blocking_u8: The value of orient blocking mode
value Behaviour
0x00 No blocking
0x01 Theta blocking or acceleration in any axis > 1.5g
0x02 Theta blocking or acceleration slope in any axis >
- 0.2g or acceleration in any axis > 1.5g
0x03 Theta blocking or acceleration slope in any axis >
- 0.4g or acceleration in any axis >
- 1.5g and value of orient is not stable
- for at least 100 ms
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_hyst ( u8  v_orient_hyst_u8)
Parameters
v_orient_hyst_u8: The value of orient hysteresis
Note
1 LSB corresponds to 62.5 mg, irrespective of the selected accel range
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_mode ( u8  v_orient_mode_u8)
Parameters
v_orient_mode_u8: The value of threshold for orientation
value Behaviour
0x00 symmetrical
0x01 high-asymmetrical
0x02 low-asymmetrical
0x03 symmetrical
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_theta ( u8  v_orient_theta_u8)
Parameters
v_orient_theta_u8: The value of Orient blocking angle
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_orient_ud_enable ( u8  v_orient_ud_u8)
Parameters
v_orient_ud_u8: The value of orient change of up/down
value Behaviour
0x00 Is ignored
0x01 Generates orientation interrupt
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_output_type ( u8  v_channel_u8,
u8  v_intr_output_type_u8 
)

interrupt1 - bit 2 interrupt2 - bit 6

Parameters
v_channel_u8The value of output type enable selection
v_channel_u8 level selection
0 BMI160_INTR1_OUTPUT_TYPE
1 BMI160_INTR2_OUTPUT_TYPE
v_intr_output_type_u8: The value of output type of interrupt enable
value Behaviour
0x01 BMI160_OPEN_DRAIN
0x00 BMI160_PUSH_PULL
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_pmu_trig ( u8  v_channel_u8,
u8  v_intr_pmu_trig_u8 
)

interrupt1 bit 0 in the register 0x56 interrupt2 bit 4 in the register 0x56

Parameters
v_channel_u8The value of pmu trigger selection
v_channel_u8 interrupt
0 BMI160_INTR1_MAP_PMUTRIG
1 BMI160_INTR2_MAP_PMUTRIG
v_intr_pmu_trig_u8: The value of pmu trigger enable
value trigger enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_significant_motion_proof ( u8  v_significant_motion_proof_u8)
Parameters
v_significant_motion_proof_u8: the value of significant proof time
value Behaviour
0x00 proof time 0.25 seconds
0x01 proof time 0.5 seconds
0x02 proof time 1 seconds
0x03 proof time 2 seconds
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_significant_motion_select ( u8  v_intr_significant_motion_select_u8)
Parameters
v_intr_significant_motion_select_u8: the value of significant or any motion interrupt selection
value Behaviour
0x00 ANY_MOTION
0x01 SIGNIFICANT_MOTION
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_significant_motion_skip ( u8  v_int_sig_mot_skip_u8)
Parameters
v_int_sig_mot_skip_u8: the value of significant skip time
value Behaviour
0x00 skip time 1.5 seconds
0x01 skip time 3 seconds
0x02 skip time 6 seconds
0x03 skip time 12 seconds
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_single_tap ( u8  v_channel_u8,
u8  v_intr_single_tap_u8 
)

interrupt1 bit 5 in the register 0x55 interrupt2 bit 5 in the register 0x57

Parameters
v_channel_u8The value of single tap interrupt selection
v_channel_u8 interrupt
0 BMI160_INTR1_MAP_SINGLE_TAP
1 BMI160_INTR2_MAP_SINGLE_TAP
v_intr_single_tap_u8: The value of single tap enable
value interrupt enable
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_slow_no_motion_durn ( u8  v_slow_no_motion_u8)
Parameters
v_slow_no_motion_u8:The value of slow no motion duration
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
Note
v_slow_no_motion_u8(5:4)=0b00 -> [v_slow_no_motion_u8(3:0) + 1] * 1.28s (1.28s-20.48s)
v_slow_no_motion_u8(5:4)=1 -> [v_slow_no_motion_u8(3:0)+5] * 5.12s (25.6s-102.4s)
v_slow_no_motion_u8(5)='1' -> [(v_slow_no_motion_u8:0)+11] * 10.24s (112.64s-430.08s);
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_slow_no_motion_select ( u8  v_intr_slow_no_motion_select_u8)
Parameters
v_intr_slow_no_motion_select_u8: The value of slow/no-motion select
value Behaviour
0x00 SLOW_MOTION
0x01 NO_MOTION
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_slow_no_motion_thres ( u8  v_slow_no_motion_thres_u8)
Parameters
v_slow_no_motion_thres_u8: The value of slow no motion threshold
Note
slow no motion threshold changes according to accel g range accel g range can be set by the function ""
accel_range slow no motion threshold
2g v_slow_no_motion_thres_u8*3.91 mg
4g v_slow_no_motion_thres_u8*7.81 mg
8g v_slow_no_motion_thres_u8*15.63 mg
16g v_slow_no_motion_thres_u8*31.25 mg
when v_slow_no_motion_thres_u8 = 0
accel_range slow no motion threshold
2g 1.95 mg
4g 3.91 mg
8g 7.81 mg
16g 15.63 mg
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_durn ( u8  v_tap_durn_u8)
Parameters
v_tap_durn_u8: The value of tap duration
value Behaviour
0x00 BMI160_TAP_DURN_50MS
0x01 BMI160_TAP_DURN_100MS
0x03 BMI160_TAP_DURN_150MS
0x04 BMI160_TAP_DURN_200MS
0x05 BMI160_TAP_DURN_250MS
0x06 BMI160_TAP_DURN_375MS
0x07 BMI160_TAP_DURN_700MS
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_quiet ( u8  v_tap_quiet_u8)
Parameters
v_tap_quiet_u8: The value of tap quiet
value Behaviour
0x00 BMI160_TAP_QUIET_30MS
0x01 BMI160_TAP_QUIET_20MS
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_shock ( u8  v_tap_shock_u8)
Parameters
v_tap_shock_u8:The value of tap shock
value Behaviour
0x00 BMI160_TAP_SHOCK_50MS
0x01 BMI160_TAP_SHOCK_75MS
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_source ( u8  v_tap_source_u8)
Parameters
v_tap_source_u8: The value of the tap source
value Description
0x01 UNFILTER_DATA
0x00 FILTER_DATA
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_intr_tap_thres ( u8  v_tap_thres_u8)
Parameters
v_tap_thres_u8: The value of single/double tap threshold
Note
single/double tap threshold changes according to accel g range accel g range can be set by the function ""
accel_range single/double tap threshold
2g ((v_tap_thres_u8 + 1) * 62.5)mg
4g ((v_tap_thres_u8 + 1) * 125)mg
8g ((v_tap_thres_u8 + 1) * 250)mg
16g ((v_tap_thres_u8 + 1) * 500)mg
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_latch_intr ( u8  v_latch_intr_u8)

This latch selection is not applicable for data ready, orientation and flat interrupts.

Parameters
v_latch_intr_u8: The value of latch duration
Latch Duration value
BMI160_LATCH_DUR_NONE 0x00
BMI160_LATCH_DUR_312_5_MICRO_SEC 0x01
BMI160_LATCH_DUR_625_MICRO_SEC 0x02
BMI160_LATCH_DUR_1_25_MILLI_SEC 0x03
BMI160_LATCH_DUR_2_5_MILLI_SEC 0x04
BMI160_LATCH_DUR_5_MILLI_SEC 0x05
BMI160_LATCH_DUR_10_MILLI_SEC 0x06
BMI160_LATCH_DUR_20_MILLI_SEC 0x07
BMI160_LATCH_DUR_40_MILLI_SEC 0x08
BMI160_LATCH_DUR_80_MILLI_SEC 0x09
BMI160_LATCH_DUR_160_MILLI_SEC 0x0A
BMI160_LATCH_DUR_320_MILLI_SEC 0x0B
BMI160_LATCH_DUR_640_MILLI_SEC 0x0C
BMI160_LATCH_DUR_1_28_SEC 0x0D
BMI160_LATCH_DUR_2_56_SEC 0x0E
BMI160_LATCHED 0x0F
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_burst ( u8  v_mag_burst_u8)
Parameters
v_mag_burst_u8: The data of mag burst read lenth
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_interface_normal ( void  )
Returns
results of bus communication function and current MAG_PMU result
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_manual_enable ( u8  v_mag_manual_u8)
Parameters
v_mag_manual_u8: The value of mag manual enable
value mag manual
0x01 BMI160_ENABLE
0x00 BMI160_DISABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_offset ( u8  v_mag_offset_u8)
Parameters
v_mag_offset_u8: The value of mag offset
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_output_data_rate ( u8  v_output_data_rate_u8)
Parameters
v_output_data_rate_u8: The value of mag output data rate
value mag output data rate
0x00 BMI160_MAG_OUTPUT_DATA_RATE_RESERVED
0x01 BMI160_MAG_OUTPUT_DATA_RATE_0_78HZ
0x02 BMI160_MAG_OUTPUT_DATA_RATE_1_56HZ
0x03 BMI160_MAG_OUTPUT_DATA_RATE_3_12HZ
0x04 BMI160_MAG_OUTPUT_DATA_RATE_6_25HZ
0x05 BMI160_MAG_OUTPUT_DATA_RATE_12_5HZ
0x06 BMI160_MAG_OUTPUT_DATA_RATE_25HZ
0x07 BMI160_MAG_OUTPUT_DATA_RATE_50HZ
0x08 BMI160_MAG_OUTPUT_DATA_RATE_100HZ
0x09 BMI160_MAG_OUTPUT_DATA_RATE_200HZ
0x0A BMI160_MAG_OUTPUT_DATA_RATE_400HZ
0x0B BMI160_MAG_OUTPUT_DATA_RATE_800HZ
0x0C BMI160_MAG_OUTPUT_DATA_RATE_1600HZ
0x0D BMI160_MAG_OUTPUT_DATA_RATE_RESERVED0
0x0E BMI160_MAG_OUTPUT_DATA_RATE_RESERVED1
0x0F BMI160_MAG_OUTPUT_DATA_RATE_RESERVED2
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_read_addr ( u8  v_mag_read_addr_u8)

mag write address writes the address of auxiliary mag to write

Parameters
v_mag_read_addr_u8The data of auxiliary mag address to write data
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_write_addr ( u8  v_mag_write_addr_u8)

mag write address writes the address of auxiliary mag to write

Parameters
v_mag_write_addr_u8The data of auxiliary mag address to write data
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_mag_write_data ( u8  v_mag_write_data_u8)

This writes the data will be wrote to mag

Parameters
v_mag_write_data_u8The value of mag data
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_nvm_counter ( u8  v_nvm_counter_u8)
Parameters
v_nvm_counter_u8The value of NVM counter
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_nvm_prog_enable ( u8  v_nvm_prog_u8)
Parameters
v_nvm_prog_u8: The value of NVM program enable
Value Description
0 DISABLE
1 ENABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_output_enable ( u8  v_channel_u8,
u8  v_output_enable_u8 
)

interrupt1 - bit 3 interrupt2 - bit 7

Parameters
v_channel_u8The value of output enable selection
v_channel_u8 level selection
0 BMI160_INTR1_OUTPUT_TYPE
1 BMI160_INTR2_OUTPUT_TYPE
v_output_enable_u8: The value of output enable of interrupt enable
value Behaviour
0x01 INTERRUPT OUTPUT ENABLED
0x00 INTERRUPT OUTPUT DISABLED
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_paging_enable ( u8  v_page_enable_u8)
Parameters
v_page_enable_u8The value of page enable
value page
0 DISABLE
1 ENABLE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_pullup_configuration ( u8  v_control_pullup_u8)
Parameters
v_control_pullup_u8The value of pull up register
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_spare0_trim ( u8  v_spare0_trim_u8)
Parameters
v_spare0_trim_u8The value of spare zero
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_spi3 ( u8  v_spi3_u8)
Parameters
v_spi3_u8: The value of SPI mode selection
Value Description
0 SPI 4-wire mode
1 SPI 3-wire mode
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_spi_enable ( u8  v_spi_enable_u8)
Parameters
v_spi_enable_u8The value of Interface selection
Value Description
0x00 I2C Enable
0x01 I2C DISBALE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error
BMI160_RETURN_FUNCTION_TYPE bmi160_set_step_config ( u16  v_step_config_u16)
Parameters
v_step_config_u16: the value of Enable step configuration
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_step_counter_enable ( u8  v_step_counter_u8)
Parameters
v_step_counter_u8: The value of step counter enable
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_step_detector_enable ( u8  v_step_intr_u8)
Parameters
v_step_intr_u8: The value of step detector interrupt enable
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_step_mode ( u8  v_step_mode_u8)
Parameters
v_step_mode_u8: The value of step counter mode
value mode
0 BMI160_STEP_NORMAL_MODE
1 BMI160_STEP_SENSITIVE_MODE
2 BMI160_STEP_ROBUST_MODE
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the call graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_set_target_page ( u8  v_target_page_u8)
Parameters
v_target_page_u8The value of target page
value page
0 User data/configure page
1 Chip level trim/test page
Returns
results of bus communication function
Return values
0-> Success
-1-> Error

+ Here is the caller graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_unmap_significant_motion_intr ( u8  v_significant_u8)

brief This API used to unmap the signification motion interrupt

Parameters
v_significant_u8: The value of interrupt selection
BMI160_MAP_INTR1   0
BMI160_MAP_INTR2   1
Returns
results of communication routine

+ Here is the call graph for this function:

BMI160_RETURN_FUNCTION_TYPE bmi160_write_reg ( 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

+ Here is the caller graph for this function:

static BMI160_RETURN_FUNCTION_TYPE invalid_magnetic_field ( u16 v_cur_u16,
u16 v_last_u16 
)
static
Parameters
v_cur_u16The value of current mag data
v_last_u16The value of last mag data
Returns
results of magnetic field data's validity
Return values
0-> VALID DATA
1-> INVALID DATA

+ Here is the caller graph for this function:

static void xy1y2_to_xyz ( u16 xy1y2,
s32 xyz 
)
static
Parameters
xy1y2The value of raw xy1y2 data
xyzThe value of xyz data
Returns
None

+ Here is the caller graph for this function:

Variable Documentation

struct yas_vector fifo_vector_xyz
struct bmi160_mag_fifo_data_t mag_data
struct trim_data_t mag_trim
struct bmi160_t* p_bmi160

file BMI160 brief Sensor driver for BMI160

struct bmi160_mag_xyz_s32_t processed_data
u8 V_bmm150_maual_auto_condition_u8 = BMI160_INIT_VALUE
u8 v_fifo_data_u8[FIFO_FRAME]
static
struct yas537_t yas537_data

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:43 by doxygen 1.8.8