/* Measures relative humidity and temperature from a Si/21 sensor.  */
sl_status_t sl_si70xx_measure_rh_and_temp(sl_i2cspm_t *i2cspm, uint8_t addr, uint32_t *rhData, int32_t *tData)
/* Measures relative humidity and temperature from a Si/21 sensor.  */
sl_status_t sl_si70xx_measure_rh_and_temp(sl_i2cspm_t *i2cspm, uint8_t addr, uint32_t *rhData, int32_t *tData)
{
  sl_status_t retval;
  retval = sl_si70xx_send_command(i2cspm, addr, rhData, SI70XX_MEASURE_RH);
  if (retval != SL_STATUS_OK) {
    return retval;
  }
  *rhData = sl_si70xx_get_percent_relative_humidity(*rhData);
  retval = sl_si70xx_send_command(i2cspm, addr, (uint32_t *) tData, SI70XX_READ_TEMP);
  if (retval != SL_STATUS_OK) {
    return retval;
  }
  *tData = sl_si70xx_get_celcius_temperature(*tData);
  return retval;
}