/* This API reads the mention no of byte of data from the given register address of auxiliary sensor.  */
int8_t bmi160_aux_read(uint8_t reg_addr, uint8_t *aux_data, uint16_t len, const struct bmi160_dev *dev)
/* This API reads the mention no of byte of data from the given register address of auxiliary sensor.  */
int8_t bmi160_aux_read(uint8_t reg_addr, uint8_t *aux_data, uint16_t len, const struct bmi160_dev *dev)
{
    int8_t rslt = BMI160_OK;
    uint16_t map_len = 0;
    if ((dev == NULL) || (dev->read == NULL))
    {
        rslt = BMI160_E_NULL_PTR;
    }
    else
    {
        if (dev->aux_cfg.aux_sensor_enable == BMI160_ENABLE)
        {
            rslt = map_read_len(&map_len, dev);
            if (rslt == BMI160_OK)
            {
                rslt = extract_aux_read(map_len, reg_addr, aux_data, len, dev);
            }
        }
        else
        {
            rslt = BMI160_E_INVALID_INPUT;
        }
    }
    return rslt;
}