diff options
author | QMK Bot <[email protected]> | 2024-06-12 00:50:57 +0000 |
---|---|---|
committer | QMK Bot <[email protected]> | 2024-06-12 00:50:57 +0000 |
commit | e239d0383a123e67464030bc9ebdce1a1d856824 (patch) | |
tree | b136ecf6455031ba594d1b1dc65870dd24d79184 /docs/features/rgb_matrix.md | |
parent | 354a2e40cf8348d043d39b34ca63223f6b5b689c (diff) | |
parent | 8041a88f5d39709548bdb44908afe0548651d640 (diff) | |
download | qmk_firmware-e239d0383a123e67464030bc9ebdce1a1d856824.tar.gz qmk_firmware-e239d0383a123e67464030bc9ebdce1a1d856824.zip |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'docs/features/rgb_matrix.md')
-rw-r--r-- | docs/features/rgb_matrix.md | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/features/rgb_matrix.md b/docs/features/rgb_matrix.md index f7f693f239..448d1cdfb5 100644 --- a/docs/features/rgb_matrix.md +++ b/docs/features/rgb_matrix.md @@ -807,12 +807,6 @@ By setting `RGB_MATRIX_CUSTOM_USER = yes` in `rules.mk`, new effects can be defi Hardware maintainers who want to limit custom effects to a specific keyboard can create a `rgb_matrix_kb.inc` file in the root of the keyboard directory, and add `RGB_MATRIX_CUSTOM_KB = yes` to the keyboard level `rules.mk`. ::: -To use custom effects in your code, simply prepend `RGB_MATRIX_CUSTOM_` to the effect name specified in `RGB_MATRIX_EFFECT()`. For example, an effect declared as `RGB_MATRIX_EFFECT(my_cool_effect)` would be referenced with: - -```c -rgb_matrix_mode(RGB_MATRIX_CUSTOM_my_cool_effect); -``` - ```c // !!! DO NOT ADD #pragma once !!! // @@ -856,6 +850,12 @@ static bool my_cool_effect2(effect_params_t* params) { #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS ``` +To switch to your custom effect programmatically, simply call `rgb_matrix_mode()` and prepend `RGB_MATRIX_CUSTOM_` to the effect name you specified in `RGB_MATRIX_EFFECT()`. For example, an effect declared as `RGB_MATRIX_EFFECT(my_cool_effect)` would be referenced with: + +```c +rgb_matrix_mode(RGB_MATRIX_CUSTOM_my_cool_effect); +``` + For inspiration and examples, check out the built-in effects under `quantum/rgb_matrix/animations/`. |