/* This API enable the external mode configuration. 
This API configure the secondary interface. */
static int8_t config_sec_if(const struct bmi160_dev *dev)
/* This API enable the external mode configuration. 
This API configure the secondary interface. */
static int8_t config_sec_if(const struct bmi160_dev *dev)
{
    int8_t rslt;
    uint8_t if_conf = 0;
    uint8_t cmd = BMI160_AUX_NORMAL_MODE;
    rslt = bmi160_set_regs(BMI160_COMMAND_REG_ADDR, &cmd, 1, dev);
    if (rslt == BMI160_OK)
    {
        dev->delay_ms(1);
        rslt = bmi160_get_regs(BMI160_IF_CONF_ADDR, &if_conf, 1, dev);
        if_conf |= (uint8_t)(1 << 5);
        if (rslt == BMI160_OK)
        {
            rslt = bmi160_set_regs(BMI160_IF_CONF_ADDR, &if_conf, 1, dev);
        }
    }
    return rslt;
}