/* This API sets tap interrupts.Interrupt is fired when tap movements happen.  */
static int8_t set_accel_tap_int(struct bmi160_int_settg *int_config, const struct bmi160_dev *dev)
/* This API sets tap interrupts.Interrupt is fired when tap movements happen.  */
static int8_t set_accel_tap_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_tap_int_cfg *tap_int_cfg = &(int_config->int_type_cfg.acc_tap_int);
        rslt = enable_tap_int(int_config, tap_int_cfg, dev);
        if (rslt == BMI160_OK)
        {
            rslt = set_intr_pin_config(int_config, dev);
            if (rslt == BMI160_OK)
            {
                rslt = config_tap_int_settg(int_config, tap_int_cfg, dev);
            }
        }
    }
    return rslt;
}