浏览代码

[Docs] Add clarification on use of custom RGB Matrix effect (#11176)

* Update feature_rgb_matrix.md

Added more clarification on how to use a newly created rgb effect as it was unclear that the prefix 'RGB_MATRIX_CUSTOM_' had to be added.
Also included an example consistent with the documentation example.

* Update docs/feature_rgb_matrix.md

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update docs/feature_rgb_matrix.md

Co-authored-by: Joel Challis <git@zvecr.com>

Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Joel Challis <git@zvecr.com>
Daniele De Vincenti 4 年之前
父节点
当前提交
498d89f4b3
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      docs/feature_rgb_matrix.md

+ 6 - 0
docs/feature_rgb_matrix.md

@@ -306,6 +306,12 @@ To declare new effects, create a new `rgb_matrix_user/kb.inc` that looks somethi
 `rgb_matrix_user.inc` should go in the root of the keymap directory.
 `rgb_matrix_kb.inc` should go in the root of the keyboard directory.
 
+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 !!! //