/* This internal API sets the oversampling settings for pressure, temperature and humidity in the sensor.  */
static int8_t set_osr_settings(uint8_t desired_settings, const struct bme280_settings *settings, struct bme280_dev *dev)
/* This internal API sets the oversampling settings for pressure, temperature and humidity in the sensor.  */
static int8_t set_osr_settings(uint8_t desired_settings, const struct bme280_settings *settings, struct bme280_dev *dev)
{
    int8_t rslt = BME280_W_INVALID_OSR_MACRO;
    if (desired_settings & BME280_OSR_HUM_SEL)
    {
        rslt = set_osr_humidity_settings(settings, dev);
    }
    if (desired_settings & (BME280_OSR_PRESS_SEL | BME280_OSR_TEMP_SEL))
    {
        rslt = set_osr_press_temp_settings(desired_settings, settings, dev);
    }
    return rslt;
}