refactor: modular RGB effect registration API
Replace hardcoded effect enum/switch-case with STRUCT_SECTION_ITERABLE registration. Effects register via ZMK_RGB_EFFECT_DEFINE macro. Core API (rgb_effect.h): - zmk_rgb_effect_ctx passed to render callbacks - zmk_rgb_request_refresh() for static effects - ZMK_RGB_EFFECT_STATIC flag skips animation timer - on_select/on_deselect lifecycle hooks - zmk_rgb_hsb_to_rgb/scale helpers now public Built-in effects (solid/breathe/spectrum/swirl) use same API. Per-key layer RGB, behaviors, DTS bindings extracted to external zmk-rgb-effects module.
This commit is contained in:
parent
d94d1597c1
commit
8f3c4d3929
16 changed files with 209 additions and 656 deletions
9
app/include/linker/zmk-rgb-effects.ld
Normal file
9
app/include/linker/zmk-rgb-effects.ld
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright (c) 2024 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <zephyr/linker/linker-defs.h>
|
||||
|
||||
ITERABLE_SECTION_ROM(zmk_rgb_effect, 4)
|
||||
Loading…
Add table
Add a link
Reference in a new issue