diff options
author | Xelus22 <17491233+Xelus22@users.noreply.github.com> | 2021-07-26 15:34:39 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-25 22:34:39 -0700 |
commit | b9902a3f59b72f2b54396ce6063c726e7fbd60f3 (patch) | |
tree | 3fc672f8cc22e1aaab50975e3648acaf10ae98a0 /keyboards/xelus/valor/rev2/rgb_matrix_kb.inc | |
parent | 9e782e4f1415e25b0f8349d51400fdfe29ebb0c1 (diff) |
[Keyboard] Valor Rev 2 (#13551)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'keyboards/xelus/valor/rev2/rgb_matrix_kb.inc')
-rw-r--r-- | keyboards/xelus/valor/rev2/rgb_matrix_kb.inc | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/keyboards/xelus/valor/rev2/rgb_matrix_kb.inc b/keyboards/xelus/valor/rev2/rgb_matrix_kb.inc new file mode 100644 index 0000000000..3518406090 --- /dev/null +++ b/keyboards/xelus/valor/rev2/rgb_matrix_kb.inc @@ -0,0 +1,34 @@ +// Step 1. +// Declare custom effects using the RGB_MATRIX_EFFECT macro +// (note the lack of semicolon after the macro!) +RGB_MATRIX_EFFECT(test_mode) + +// Step 2. +// Define effects inside the `RGB_MATRIX_CUSTOM_EFFECT_IMPLS` ifdef block +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +// e.g: A simple effect, self-contained within a single method +static bool test_mode(effect_params_t* params) { + uint8_t factor = 9; + switch ((g_rgb_timer & (0b11 << factor)) >> factor) { + case 0: { + rgb_matrix_set_color_all(150, 0, 0); + break; + } + case 1: { + rgb_matrix_set_color_all(0, 150, 0); + break; + } + case 2: { + rgb_matrix_set_color_all(0, 0, 150); + break; + } + case 3: { + rgb_matrix_set_color_all(150, 150, 150); + break; + } + } + return false; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS |