; ***************************************************************************
; copyright   : (C) 2025 by Martin Preuss
; email       : martin@libchipcard.de
;
; ***************************************************************************
; * This file is part of the project "AqHome".                              *
; * Please see toplevel file COPYING of that project for license details.   *
; ***************************************************************************

.cseg


; ---------------------------------------------------------------------------
; @routine SI7021_SendTemperature

SI7021_SendTemperature:
  ldi r16, SI7021_VALUE_TEMP
  rcall SI7021_GetValue
  brcc SI7021_SendTemperature_end
  ldi r17, VALUE_ID_SI7021_TEMP       ; VALUE ID
  ldi r22, AQHOME_VALUETYPE_TEMP      ; VALUE TYPE
  rcall Main_SendValueReport
SI7021_SendTemperature_end:
  ret
; @end



; ---------------------------------------------------------------------------
; @routine SI7021_SendHumidity

SI7021_SendHumidity:
  ldi r16, SI7021_VALUE_HUMIDITY
  rcall SI7021_GetValue
  brcc SI7021_SendHumidity_end
  ldi r17, VALUE_ID_SI7021_HUM        ; VALUE ID
  ldi r22, AQHOME_VALUETYPE_HUMIDITY  ; VALUE TYPE
  rcall Main_SendValueReport
SI7021_SendHumidity_end:
  ret
; @end


