added modules for SGP30/40.
This commit is contained in:
43
avr/modules/sgp30/send.asm
Normal file
43
avr/modules/sgp30/send.asm
Normal file
@@ -0,0 +1,43 @@
|
||||
; ***************************************************************************
|
||||
; 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 SGP30_SendTVOC
|
||||
|
||||
SGP30_SendTVOC:
|
||||
ldi r16, SGP30_VALUE_TVOC
|
||||
rcall SGP30_GetValue
|
||||
brcc SGP30_SendTVOC_end
|
||||
ldi r17, VALUE_ID_TVOC ; VALUE ID
|
||||
ldi r22, AQHOME_VALUETYPE_TVOC ; VALUE TYPE
|
||||
rcall Main_SendValueReport
|
||||
SGP30_SendTVOC_end:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine SGP30_SendCO2
|
||||
|
||||
SGP30_SendCO2:
|
||||
ldi r16, SGP30_VALUE_CO2
|
||||
rcall SGP30_GetValue
|
||||
brcc SGP30_SendCO2_end
|
||||
ldi r17, VALUE_ID_CO2 ; VALUE ID
|
||||
ldi r22, AQHOME_VALUETYPE_CO2 ; VALUE TYPE
|
||||
rcall Main_SendValueReport
|
||||
SGP30_SendCO2_end:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user