// get temperature (C only) and RH Percent struct si7021_thc SI7021::getTempAndRH() { si7021_thc ret; ret.humidityPercent = getHumidityPercent(); ret.celsiusHundredths = _getCelsiusPostHumidity(); return ret; }
// get humidity, then get temperature reading from humidity measurement, calculate Dew Points struct si7021_env SI7021::getHumidityAndTemperature() { si7021_env env = {0, 0, 0}; env.humidityPercent = getHumidityPercent(); env.temperature = _getTemperaturePostHumidity(); env.error_crc = 0; if (env.humidityPercent == 99999){ env.error_crc = 1; } return env; }