/* This API sets the default configuration parameters of accel & gyro. Also maintain the previous state of configurations.  */
static void default_param_settg(struct bmi160_dev *dev)
/* This API sets the default configuration parameters of accel & gyro. Also maintain the previous state of configurations.  */
static void default_param_settg(struct bmi160_dev *dev)
{
    dev->accel_cfg.bw = BMI160_ACCEL_BW_NORMAL_AVG4;
    dev->accel_cfg.odr = BMI160_ACCEL_ODR_100HZ;
    dev->accel_cfg.power = BMI160_ACCEL_SUSPEND_MODE;
    dev->accel_cfg.range = BMI160_ACCEL_RANGE_2G;
    dev->gyro_cfg.bw = BMI160_GYRO_BW_NORMAL_MODE;
    dev->gyro_cfg.odr = BMI160_GYRO_ODR_100HZ;
    dev->gyro_cfg.power = BMI160_GYRO_SUSPEND_MODE;
    dev->gyro_cfg.range = BMI160_GYRO_RANGE_2000_DPS;
    dev->prev_accel_cfg = dev->accel_cfg;
    dev->prev_gyro_cfg = dev->gyro_cfg;
}