re-enabled CCS811 module, adapted to latest changes.

This commit is contained in:
Martin Preuss
2025-06-05 22:44:27 +02:00
parent 08a1313ba5
commit 284539fd52
4 changed files with 87 additions and 88 deletions

View File

@@ -0,0 +1,44 @@
; ***************************************************************************
; 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 CCS811_SendTVOC
CCS811_SendTVOC:
ldi r16, CCS811_VALUE_TVOC
rcall CCS811_GetValue
brcc CCS811_SendTVOC_end
ldi r17, VALUE_ID_TVOC ; VALUE ID
ldi r22, AQHOME_VALUETYPE_TVOC ; VALUE TYPE
rcall Main_SendValueReport
CCS811_SendTVOC_end:
ret
; @end
; ---------------------------------------------------------------------------
; @routine CCS811_SendCO2
CCS811_SendCO2:
ldi r16, CCS811_VALUE_CO2
rcall CCS811_GetValue
brcc CCS811_SendCO2_end
ldi r17, VALUE_ID_CO2 ; VALUE ID
ldi r22, AQHOME_VALUETYPE_CO2 ; VALUE TYPE
rcall Main_SendValueReport
CCS811_SendCO2_end:
ret
; @end