/* This internal API parse the oversampling(pressure, temperature and humidity), filter and standby duration settings and store in the device structure.  */
static void parse_device_settings(const uint8_t *reg_data, struct bme280_settings *settings)
/* This internal API parse the oversampling(pressure, temperature and humidity), filter and standby duration settings and store in the device structure.  */
static void parse_device_settings(const uint8_t *reg_data, struct bme280_settings *settings)
{
    settings->osr_h = BME280_GET_BITS_POS_0(reg_data[0], BME280_CTRL_HUM);
    settings->osr_p = BME280_GET_BITS(reg_data[2], BME280_CTRL_PRESS);
    settings->osr_t = BME280_GET_BITS(reg_data[2], BME280_CTRL_TEMP);
    settings->filter = BME280_GET_BITS(reg_data[3], BME280_FILTER);
    settings->standby_time = BME280_GET_BITS(reg_data[3], BME280_STANDBY);
}