avr: added brightness sensor
This commit is contained in:
31
avr/modules/brightness/send.asm
Normal file
31
avr/modules/brightness/send.asm
Normal file
@@ -0,0 +1,31 @@
|
||||
; ***************************************************************************
|
||||
; 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 Brightness_Send
|
||||
|
||||
Brightness_Send:
|
||||
rcall Brightness_GetValue
|
||||
brcc Brightness_Send_end
|
||||
mov r18, r16
|
||||
clr r19
|
||||
ldi r20, 1
|
||||
clr r21
|
||||
ldi r17, VALUE_ID_BRIGHTNESS ; VALUE ID
|
||||
ldi r22, AQHOME_VALUETYPE_LIGHT ; VALUE TYPE
|
||||
rcall Main_SendValueReport
|
||||
Brightness_Send_end:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user