/* This API configure the source of data(filter & pre-filter) for high-g interrupt.  */
static int8_t config_high_g_data_src(const struct bmi160_acc_high_g_int_cfg *high_g_int_cfg, const struct bmi160_dev *dev)
/* This API configure the source of data(filter & pre-filter) for high-g interrupt.  */
static int8_t config_high_g_data_src(const struct bmi160_acc_high_g_int_cfg *high_g_int_cfg, const struct bmi160_dev *dev)
{
    int8_t rslt;
    uint8_t data = 0;
    uint8_t temp = 0;
    rslt = bmi160_get_regs(BMI160_INT_DATA_0_ADDR, &data, 1, dev);
    if (rslt == BMI160_OK)
    {
        temp = data & ~BMI160_LOW_HIGH_SRC_INT_MASK;
        data = temp | ((high_g_int_cfg->high_data_src << 7) & BMI160_LOW_HIGH_SRC_INT_MASK);
        rslt = bmi160_set_regs(BMI160_INT_DATA_0_ADDR, &data, 1, dev);
    }
    return rslt;
}