/* This API is used to read the raw uncompensated auxiliary sensor data of 8 bytes from BMI160 register address 0x04 to 0x0B.  */
int8_t bmi160_read_aux_data_auto_mode(uint8_t *aux_data, const struct bmi160_dev *dev)
/* This API is used to read the raw uncompensated auxiliary sensor data of 8 bytes from BMI160 register address 0x04 to 0x0B.  */
int8_t bmi160_read_aux_data_auto_mode(uint8_t *aux_data, const struct bmi160_dev *dev)
{
    int8_t rslt;
    rslt = null_ptr_check(dev);
    if (rslt != BMI160_OK)
    {
        rslt = BMI160_E_NULL_PTR;
    }
    else
    {
        if ((dev->aux_cfg.aux_sensor_enable == BMI160_ENABLE) && (dev->aux_cfg.manual_enable == BMI160_DISABLE))
        {
            rslt = bmi160_get_regs(BMI160_AUX_DATA_ADDR, aux_data, 8, dev);
        }
        else
        {
            rslt = BMI160_E_INVALID_INPUT;
        }
    }
    return rslt;
}