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