/* This API sets the step detection interrupt.This interrupt occurs when the single step causes accel values to go above preset threshold.  */
static int8_t set_accel_step_detect_int(struct bmi160_int_settg *int_config, const struct bmi160_dev *dev)
/* This API sets the step detection interrupt.This interrupt occurs when the single step causes accel values to go above preset threshold.  */
static int8_t set_accel_step_detect_int(struct bmi160_int_settg *int_config, const 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_step_detect_int_cfg *step_detect_int_cfg = &(int_config->int_type_cfg.acc_step_detect_int);
        rslt = enable_step_detect_int(step_detect_int_cfg, dev);
        if (rslt == BMI160_OK)
        {
            rslt = set_intr_pin_config(int_config, dev);
            if (rslt == BMI160_OK)
            {
                rslt = map_feature_interrupt(int_config, dev);
                if (rslt == BMI160_OK)
                {
                    rslt = config_step_detect(step_detect_int_cfg, dev);
                }
            }
        }
    }
    return rslt;
}