/* This API reads the auxiliary I2C interface configuration which is set in the sensor.  */
uint16_t bma4_get_if_mode(uint8_t *if_mode, struct bma4_dev *dev)
/* This API reads the auxiliary I2C interface configuration which is set in the sensor.  */
uint16_t bma4_get_if_mode(uint8_t *if_mode, struct bma4_dev *dev)
{
    uint16_t rslt  = 0;
    uint8_t data = 0;
    if (dev == NULL) {
        rslt |= BMA4_E_NULL_PTR;
    } else {
        rslt |= bma4_read_regs(BMA4_IF_CONFIG_ADDR, &data, 1, dev);
        if (rslt == BMA4_OK)
            *if_mode = BMA4_GET_BITSLICE(data, BMA4_IF_CONFIG_IF_MODE);
    }
    return rslt;
}