avr: move timing control from ma_light to sk6812.
This allows for better control over the LED strip. We can now trigger the LED strip externally (e.g. by setting a new RGBW value).
This commit is contained in:
31
avr/modules/sk6812/send.asm
Normal file
31
avr/modules/sk6812/send.asm
Normal file
@@ -0,0 +1,31 @@
|
||||
; ***************************************************************************
|
||||
; copyright : (C) 2024 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. *
|
||||
; ***************************************************************************
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine sk6812ReportState
|
||||
;
|
||||
; @param R18 state (0=off, 1=on)
|
||||
; @clobbers R16, R17, R18, R19, R20, R21, R22, R23, R24, R25, X
|
||||
|
||||
sk6812ReportState:
|
||||
ldi r17, VALUE_ID_MAL_STATE
|
||||
clr r19
|
||||
ldi r20, 1
|
||||
clr r21
|
||||
ldi r22, AQHOME_VALUETYPE_ONOFF
|
||||
push yl
|
||||
push yh
|
||||
rcall Main_SendValueReport ; (R16, R17, R18, R19, R20, R21, R23, R24, R25, X)
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user