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:
Martin Preuss
2026-03-24 23:13:28 +01:00
parent 42874f27cd
commit 67be74d2ac
10 changed files with 262 additions and 209 deletions

View 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