/* This API sets the any-motion interrupt of the sensor. This interrupt occurs when accel values exceeds preset threshold for a certain period of time.  */
static int8_t set_accel_any_motion_int(struct bmi160_int_settg *int_config, struct bmi160_dev *dev)
/* This API sets the any-motion interrupt of the sensor. This interrupt occurs when accel values exceeds preset threshold for a certain period of time.  */
static int8_t set_accel_any_motion_int(struct bmi160_int_settg *int_config, struct bmi160_dev *dev)
{
    int8_t rslt;
    rslt = null_ptr_check(dev);
    if ((rslt != BMI160_OK) || (int_config == NULL))
    {
        rslt = BMI160_E_NULL_PTR;
    }
    else
    {
        struct bmi160_acc_any_mot_int_cfg *any_motion_int_cfg = &(int_config->int_type_cfg.acc_any_motion_int);
        rslt = enable_accel_any_motion_int(any_motion_int_cfg, dev);
        if (rslt == BMI160_OK)
        {
            rslt = config_any_motion_int_settg(int_config, any_motion_int_cfg, dev);
        }
    }
    return rslt;
}