aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2019-12-16 20:27:53 +0000
committerDrashna Jaelre <drashna@live.com>2019-12-16 12:27:53 -0800
commitae40fc498b185d3d23908780a3d3425eb5ff05b5 (patch)
tree56d13173bdd6fae4faf4e88eb4c55a692c5878d2
parent0082ecf1f3328eb45a865bf50d3f44ca632d9f7b (diff)
downloadqmk_firmware-ae40fc498b185d3d23908780a3d3425eb5ff05b5.tar.gz
qmk_firmware-ae40fc498b185d3d23908780a3d3425eb5ff05b5.zip
Relocate RGB keycode processing (#7508)
* Move rgb keycode logic to process_keycode * Fixes for rgb matrix * Fixes for mxss * Fix inc/dec logic, add comments * Fix return RAINBOW_SWIRL logic * stop external use of rgb helper functions * merge fix * Fix 'defined but not used' when all animations are disabled
-rw-r--r--common_features.mk6
-rw-r--r--keyboards/mxss/rules.mk1
-rw-r--r--quantum/process_keycode/process_rgb.c141
-rw-r--r--quantum/process_keycode/process_rgb.h20
-rw-r--r--quantum/quantum.c168
-rw-r--r--quantum/quantum.h4
-rw-r--r--quantum/rgb_matrix.h40
7 files changed, 199 insertions, 181 deletions
diff --git a/common_features.mk b/common_features.mk
index 9b60eeed0..640539fd6 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -109,6 +109,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
109 SRC += $(QUANTUM_DIR)/rgblight.c 109 SRC += $(QUANTUM_DIR)/rgblight.c
110 CIE1931_CURVE = yes 110 CIE1931_CURVE = yes
111 LED_BREATHING_TABLE = yes 111 LED_BREATHING_TABLE = yes
112 RGB_KEYCODES_ENABLE = yes
112 ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes) 113 ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes)
113 OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER 114 OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER
114 else 115 else
@@ -147,6 +148,7 @@ endif
147 SRC += $(QUANTUM_DIR)/rgb_matrix.c 148 SRC += $(QUANTUM_DIR)/rgb_matrix.c
148 SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c 149 SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c
149 CIE1931_CURVE = yes 150 CIE1931_CURVE = yes
151 RGB_KEYCODES_ENABLE = yes
150endif 152endif
151 153
152ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) 154ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
@@ -187,6 +189,10 @@ ifeq ($(strip $(RGB_MATRIX_CUSTOM_USER)), yes)
187 OPT_DEFS += -DRGB_MATRIX_CUSTOM_USER 189 OPT_DEFS += -DRGB_MATRIX_CUSTOM_USER
188endif 190endif
189 191
192ifeq ($(strip $(RGB_KEYCODES_ENABLE)), yes)
193 SRC += $(QUANTUM_DIR)/process_keycode/process_rgb.c
194endif
195
190ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) 196ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
191 OPT_DEFS += -DTAP_DANCE_ENABLE 197 OPT_DEFS += -DTAP_DANCE_ENABLE
192 SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c 198 SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
diff --git a/keyboards/mxss/rules.mk b/keyboards/mxss/rules.mk
index 7df851758..f9210319e 100644
--- a/keyboards/mxss/rules.mk
+++ b/keyboards/mxss/rules.mk
@@ -32,6 +32,7 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
32 32
33# Remove the common RGB light code and use my iteration instead 33# Remove the common RGB light code and use my iteration instead
34OPT_DEFS += -DRGBLIGHT_ENABLE 34OPT_DEFS += -DRGBLIGHT_ENABLE
35SRC += $(QUANTUM_DIR)/process_keycode/process_rgb.c
35SRC += rgblight.c 36SRC += rgblight.c
36SRC += ws2812.c 37SRC += ws2812.c
37CIE1931_CURVE = yes 38CIE1931_CURVE = yes
diff --git a/quantum/process_keycode/process_rgb.c b/quantum/process_keycode/process_rgb.c
new file mode 100644
index 000000000..c76166342
--- /dev/null
+++ b/quantum/process_keycode/process_rgb.c
@@ -0,0 +1,141 @@
1/* Copyright 2019
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include "process_rgb.h"
17#include "rgb.h"
18
19typedef void (*rgb_func_pointer)(void);
20
21/**
22 * Wrapper for inc/dec rgb keycode
23 *
24 * noinline to optimise for firmware size not speed (not in hot path)
25 */
26static void __attribute__((noinline)) handleKeycodeRGB(const uint8_t is_shifted, const rgb_func_pointer inc_func, const rgb_func_pointer dec_func) {
27 if (is_shifted) {
28 dec_func();
29 } else {
30 inc_func();
31 }
32}
33
34/**
35 * Wrapper for animation mode
36 * - if not in animation family -> jump to that animation
37 * - otherwise -> wrap round animation speed
38 *
39 * noinline to optimise for firmware size not speed (not in hot path)
40 */
41static void __attribute__((noinline,unused)) handleKeycodeRGBMode(const uint8_t start, const uint8_t end) {
42 if ((start <= rgblight_get_mode()) && (rgblight_get_mode() < end)) {
43 rgblight_step();
44 } else {
45 rgblight_mode(start);
46 }
47}
48
49/**
50 * Handle keycodes for both rgblight and rgbmatrix
51 */
52bool process_rgb(const uint16_t keycode, const keyrecord_t *record) {
53#ifndef SPLIT_KEYBOARD
54 if (record->event.pressed) {
55#else
56 // Split keyboards need to trigger on key-up for edge-case issue
57 if (!record->event.pressed) {
58#endif
59 uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT));
60 switch (keycode) {
61 case RGB_TOG:
62 rgblight_toggle();
63 return false;
64 case RGB_MODE_FORWARD:
65 handleKeycodeRGB(shifted, rgblight_step, rgblight_step_reverse);
66 return false;
67 case RGB_MODE_REVERSE:
68 handleKeycodeRGB(shifted, rgblight_step_reverse, rgblight_step);
69 return false;
70 case RGB_HUI:
71 handleKeycodeRGB(shifted, rgblight_increase_hue, rgblight_decrease_hue);
72 return false;
73 case RGB_HUD:
74 handleKeycodeRGB(shifted, rgblight_decrease_hue, rgblight_increase_hue);
75 return false;
76 case RGB_SAI:
77 handleKeycodeRGB(shifted, rgblight_increase_sat, rgblight_decrease_sat);
78 return false;
79 case RGB_SAD:
80 handleKeycodeRGB(shifted, rgblight_decrease_sat, rgblight_increase_sat);
81 return false;
82 case RGB_VAI:
83 handleKeycodeRGB(shifted, rgblight_increase_val, rgblight_decrease_val);
84 return false;
85 case RGB_VAD:
86 handleKeycodeRGB(shifted, rgblight_decrease_val, rgblight_increase_val);
87 return false;
88 case RGB_SPI:
89 handleKeycodeRGB(shifted, rgblight_increase_speed, rgblight_decrease_speed);
90 return false;
91 case RGB_SPD:
92 handleKeycodeRGB(shifted, rgblight_decrease_speed, rgblight_increase_speed);
93 return false;
94 case RGB_MODE_PLAIN:
95 rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
96 return false;
97 case RGB_MODE_BREATHE:
98#ifdef RGBLIGHT_EFFECT_BREATHING
99 handleKeycodeRGBMode(RGBLIGHT_MODE_BREATHING, RGBLIGHT_MODE_BREATHING_end);
100#endif
101 return false;
102 case RGB_MODE_RAINBOW:
103#ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD
104 handleKeycodeRGBMode(RGBLIGHT_MODE_RAINBOW_MOOD, RGBLIGHT_MODE_RAINBOW_MOOD_end);
105#endif
106 return false;
107 case RGB_MODE_SWIRL:
108#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL
109 handleKeycodeRGBMode(RGBLIGHT_MODE_RAINBOW_SWIRL, RGBLIGHT_MODE_RAINBOW_SWIRL_end);
110#endif
111 return false;
112 case RGB_MODE_SNAKE:
113#ifdef RGBLIGHT_EFFECT_SNAKE
114 handleKeycodeRGBMode(RGBLIGHT_MODE_SNAKE, RGBLIGHT_MODE_SNAKE_end);
115#endif
116 return false;
117 case RGB_MODE_KNIGHT:
118#ifdef RGBLIGHT_EFFECT_KNIGHT
119 handleKeycodeRGBMode(RGBLIGHT_MODE_KNIGHT, RGBLIGHT_MODE_KNIGHT_end);
120#endif
121 return false;
122 case RGB_MODE_XMAS:
123#ifdef RGBLIGHT_EFFECT_CHRISTMAS
124 rgblight_mode(RGBLIGHT_MODE_CHRISTMAS);
125#endif
126 return false;
127 case RGB_MODE_GRADIENT:
128#ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT
129 handleKeycodeRGBMode(RGBLIGHT_MODE_STATIC_GRADIENT, RGBLIGHT_MODE_STATIC_GRADIENT_end);
130#endif
131 return false;
132 case RGB_MODE_RGBTEST:
133#ifdef RGBLIGHT_EFFECT_RGB_TEST
134 rgblight_mode(RGBLIGHT_MODE_RGB_TEST);
135#endif
136 return false;
137 }
138 }
139
140 return true;
141}
diff --git a/quantum/process_keycode/process_rgb.h b/quantum/process_keycode/process_rgb.h
new file mode 100644
index 000000000..26aca4689
--- /dev/null
+++ b/quantum/process_keycode/process_rgb.h
@@ -0,0 +1,20 @@
1/* Copyright 2019
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#pragma once
17
18#include "quantum.h"
19
20bool process_rgb(const uint16_t keycode, const keyrecord_t *record);
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 2def99ac8..4c501785c 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -16,10 +16,6 @@
16 16
17#include "quantum.h" 17#include "quantum.h"
18 18
19#if !defined(RGBLIGHT_ENABLE) && !defined(RGB_MATRIX_ENABLE)
20# include "rgb.h"
21#endif
22
23#ifdef PROTOCOL_LUFA 19#ifdef PROTOCOL_LUFA
24# include "outputselect.h" 20# include "outputselect.h"
25#endif 21#endif
@@ -254,6 +250,9 @@ bool process_record_quantum(keyrecord_t *record) {
254#ifdef MAGIC_KEYCODE_ENABLE 250#ifdef MAGIC_KEYCODE_ENABLE
255 process_magic(keycode, record) && 251 process_magic(keycode, record) &&
256#endif 252#endif
253#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
254 process_rgb(keycode, record) &&
255#endif
257 true)) { 256 true)) {
258 return false; 257 return false;
259 } 258 }
@@ -293,176 +292,24 @@ bool process_record_quantum(keyrecord_t *record) {
293 return false; 292 return false;
294#endif 293#endif
295#ifdef BLUETOOTH_ENABLE 294#ifdef BLUETOOTH_ENABLE
296 case OUT_AUTO: 295 case OUT_AUTO:
297 set_output(OUTPUT_AUTO); 296 set_output(OUTPUT_AUTO);
298 return false; 297 return false;
299 case OUT_USB: 298 case OUT_USB:
300 set_output(OUTPUT_USB); 299 set_output(OUTPUT_USB);
301 return false; 300 return false;
302 case OUT_BT: 301 case OUT_BT:
303 set_output(OUTPUT_BLUETOOTH); 302 set_output(OUTPUT_BLUETOOTH);
304 return false; 303 return false;
305#endif 304#endif
306#if defined(BACKLIGHT_ENABLE) && defined(BACKLIGHT_BREATHING) 305#if defined(BACKLIGHT_ENABLE) && defined(BACKLIGHT_BREATHING)
307 case BL_BRTG: 306 case BL_BRTG:
308 backlight_toggle_breathing(); 307 backlight_toggle_breathing();
309 return false; 308 return false;
310#endif 309#endif
311 } 310 }
312 } 311 }
313 312
314#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
315# ifndef SPLIT_KEYBOARD
316 if (record->event.pressed) {
317# else
318 // Split keyboards need to trigger on key-up for edge-case issue
319 if (!record->event.pressed) {
320# endif
321 uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT));
322 switch (keycode) {
323 case RGB_TOG:
324 rgblight_toggle();
325 return false;
326 case RGB_MODE_FORWARD:
327 if (shifted) {
328 rgblight_step_reverse();
329 } else {
330 rgblight_step();
331 }
332 return false;
333 case RGB_MODE_REVERSE:
334 if (shifted) {
335 rgblight_step();
336 } else {
337 rgblight_step_reverse();
338 }
339 return false;
340 case RGB_HUI:
341 if (shifted) {
342 rgblight_decrease_hue();
343 } else {
344 rgblight_increase_hue();
345 }
346 return false;
347 case RGB_HUD:
348 if (shifted) {
349 rgblight_increase_hue();
350 } else {
351 rgblight_decrease_hue();
352 }
353 return false;
354 case RGB_SAI:
355 if (shifted) {
356 rgblight_decrease_sat();
357 } else {
358 rgblight_increase_sat();
359 }
360 return false;
361 case RGB_SAD:
362 if (shifted) {
363 rgblight_increase_sat();
364 } else {
365 rgblight_decrease_sat();
366 }
367 return false;
368 case RGB_VAI:
369 if (shifted) {
370 rgblight_decrease_val();
371 } else {
372 rgblight_increase_val();
373 }
374 return false;
375 case RGB_VAD:
376 if (shifted) {
377 rgblight_increase_val();
378 } else {
379 rgblight_decrease_val();
380 }
381 return false;
382 case RGB_SPI:
383 if (shifted) {
384 rgblight_decrease_speed();
385 } else {
386 rgblight_increase_speed();
387 }
388 return false;
389 case RGB_SPD:
390 if (shifted) {
391 rgblight_increase_speed();
392 } else {
393 rgblight_decrease_speed();
394 }
395 return false;
396 case RGB_MODE_PLAIN:
397 rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);
398 return false;
399 case RGB_MODE_BREATHE:
400# ifdef RGBLIGHT_EFFECT_BREATHING
401 if ((RGBLIGHT_MODE_BREATHING <= rgblight_get_mode()) && (rgblight_get_mode() < RGBLIGHT_MODE_BREATHING_end)) {
402 rgblight_step();
403 } else {
404 rgblight_mode(RGBLIGHT_MODE_BREATHING);
405 }
406# endif
407 return false;
408 case RGB_MODE_RAINBOW:
409# ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD
410 if ((RGBLIGHT_MODE_RAINBOW_MOOD <= rgblight_get_mode()) && (rgblight_get_mode() < RGBLIGHT_MODE_RAINBOW_MOOD_end)) {
411 rgblight_step();
412 } else {
413 rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD);
414 }
415# endif
416 case RGB_MODE_SWIRL:
417# ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL
418 if ((RGBLIGHT_MODE_RAINBOW_SWIRL <= rgblight_get_mode()) && (rgblight_get_mode() < RGBLIGHT_MODE_RAINBOW_SWIRL_end)) {
419 rgblight_step();
420 } else {
421 rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL);
422 }
423# endif
424 return false;
425 case RGB_MODE_SNAKE:
426# ifdef RGBLIGHT_EFFECT_SNAKE
427 if ((RGBLIGHT_MODE_SNAKE <= rgblight_get_mode()) && (rgblight_get_mode() < RGBLIGHT_MODE_SNAKE_end)) {
428 rgblight_step();
429 } else {
430 rgblight_mode(RGBLIGHT_MODE_SNAKE);
431 }
432# endif
433 return false;
434 case RGB_MODE_KNIGHT:
435# ifdef RGBLIGHT_EFFECT_KNIGHT
436 if ((RGBLIGHT_MODE_KNIGHT <= rgblight_get_mode()) && (rgblight_get_mode() < RGBLIGHT_MODE_KNIGHT_end)) {
437 rgblight_step();
438 } else {
439 rgblight_mode(RGBLIGHT_MODE_KNIGHT);
440 }
441# endif
442 return false;
443 case RGB_MODE_XMAS:
444# ifdef RGBLIGHT_EFFECT_CHRISTMAS
445 rgblight_mode(RGBLIGHT_MODE_CHRISTMAS);
446# endif
447 return false;
448 case RGB_MODE_GRADIENT:
449# ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT
450 if ((RGBLIGHT_MODE_STATIC_GRADIENT <= rgblight_get_mode()) && (rgblight_get_mode() < RGBLIGHT_MODE_STATIC_GRADIENT_end)) {
451 rgblight_step();
452 } else {
453 rgblight_mode(RGBLIGHT_MODE_STATIC_GRADIENT);
454 }
455# endif
456 return false;
457 case RGB_MODE_RGBTEST:
458# ifdef RGBLIGHT_EFFECT_RGB_TEST
459 rgblight_mode(RGBLIGHT_MODE_RGB_TEST);
460# endif
461 return false;
462 }
463 }
464#endif
465
466 // keycodes that depend on both pressed and non-pressed state 313 // keycodes that depend on both pressed and non-pressed state
467 switch (keycode) { 314 switch (keycode) {
468 case GRAVE_ESC: { 315 case GRAVE_ESC: {
@@ -513,7 +360,6 @@ bool process_record_quantum(keyrecord_t *record) {
513 send_keyboard_report(); 360 send_keyboard_report();
514 return false; 361 return false;
515 } 362 }
516
517 } 363 }
518 364
519 return process_action_kb(record); 365 return process_action_kb(record);
diff --git a/quantum/quantum.h b/quantum/quantum.h
index 2ee261e60..b9e7eea24 100644
--- a/quantum/quantum.h
+++ b/quantum/quantum.h
@@ -137,6 +137,10 @@ extern layer_state_t layer_state;
137# include "process_magic.h" 137# include "process_magic.h"
138#endif 138#endif
139 139
140#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
141# include "process_rgb.h"
142#endif
143
140#ifdef HD44780_ENABLE 144#ifdef HD44780_ENABLE
141# include "hd44780.h" 145# include "hd44780.h"
142#endif 146#endif
diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h
index 16ec96f03..96494836e 100644
--- a/quantum/rgb_matrix.h
+++ b/quantum/rgb_matrix.h
@@ -128,26 +128,26 @@ void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val);
128void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val); 128void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val);
129 129
130#ifndef RGBLIGHT_ENABLE 130#ifndef RGBLIGHT_ENABLE
131# define rgblight_toggle() rgb_matrix_toggle() 131# define rgblight_toggle rgb_matrix_toggle
132# define rgblight_enable() rgb_matrix_enable() 132# define rgblight_enable rgb_matrix_enable
133# define rgblight_enable_noeeprom() rgb_matrix_enable_noeeprom() 133# define rgblight_enable_noeeprom rgb_matrix_enable_noeeprom
134# define rgblight_disable() rgb_matrix_disable() 134# define rgblight_disable rgb_matrix_disable
135# define rgblight_disable_noeeprom() rgb_matrix_disable_noeeprom() 135# define rgblight_disable_noeeprom rgb_matrix_disable_noeeprom
136# define rgblight_step() rgb_matrix_step() 136# define rgblight_step rgb_matrix_step
137# define rgblight_sethsv(hue, sat, val) rgb_matrix_sethsv(hue, sat, val) 137# define rgblight_sethsv rgb_matrix_sethsv
138# define rgblight_sethsv_noeeprom(hue, sat, val) rgb_matrix_sethsv_noeeprom(hue, sat, val) 138# define rgblight_sethsv_noeeprom rgb_matrix_sethsv_noeeprom
139# define rgblight_step_reverse() rgb_matrix_step_reverse() 139# define rgblight_step_reverse rgb_matrix_step_reverse
140# define rgblight_increase_hue() rgb_matrix_increase_hue() 140# define rgblight_increase_hue rgb_matrix_increase_hue
141# define rgblight_decrease_hue() rgb_matrix_decrease_hue() 141# define rgblight_decrease_hue rgb_matrix_decrease_hue
142# define rgblight_increase_sat() rgb_matrix_increase_sat() 142# define rgblight_increase_sat rgb_matrix_increase_sat
143# define rgblight_decrease_sat() rgb_matrix_decrease_sat() 143# define rgblight_decrease_sat rgb_matrix_decrease_sat
144# define rgblight_increase_val() rgb_matrix_increase_val() 144# define rgblight_increase_val rgb_matrix_increase_val
145# define rgblight_decrease_val() rgb_matrix_decrease_val() 145# define rgblight_decrease_val rgb_matrix_decrease_val
146# define rgblight_increase_speed() rgb_matrix_increase_speed() 146# define rgblight_increase_speed rgb_matrix_increase_speed
147# define rgblight_decrease_speed() rgb_matrix_decrease_speed() 147# define rgblight_decrease_speed rgb_matrix_decrease_speed
148# define rgblight_mode(mode) rgb_matrix_mode(mode) 148# define rgblight_mode rgb_matrix_mode
149# define rgblight_mode_noeeprom(mode) rgb_matrix_mode_noeeprom(mode) 149# define rgblight_mode_noeeprom rgb_matrix_mode_noeeprom
150# define rgblight_get_mode() rgb_matrix_get_mode() 150# define rgblight_get_mode rgb_matrix_get_mode
151#endif 151#endif
152 152
153typedef struct { 153typedef struct {