summaryrefslogtreecommitdiffstats
path: root/quantum/rgb_matrix.h
diff options
context:
space:
mode:
authorXScorpion2 <rcalt2vt@gmail.com>2019-04-30 00:18:50 +0200
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-04-30 00:18:50 +0200
commita7113c8ed090d0ac647f30ee9b8ef41252e568ed (patch)
tree24d33db679b4d1357efef2784e69fea48e98d0ed /quantum/rgb_matrix.h
parent1d784f0f9575b70e35c9c8338b0ff80dc7316d7e (diff)
downloadqmk_firmware-a7113c8ed090d0ac647f30ee9b8ef41252e568ed.tar.gz
qmk_firmware-a7113c8ed090d0ac647f30ee9b8ef41252e568ed.tar.xz
Updated rgb_led struct field modifier to flags (#5619)
Updated effects to test led flags Updated massdrop to use new flags field for led toggle
Diffstat (limited to 'quantum/rgb_matrix.h')
-rw-r--r--quantum/rgb_matrix.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h
index 775cbeac0..33665ffff 100644
--- a/quantum/rgb_matrix.h
+++ b/quantum/rgb_matrix.h
@@ -54,7 +54,9 @@
uint8_t max = DRIVER_LED_TOTAL;
#endif
-extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
+#define RGB_MATRIX_TEST_LED_FLAGS() if (!HAS_ANY_FLAGS(g_rgb_leds[i].flags, params->flags)) continue
+
+extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
typedef struct
{
@@ -209,6 +211,8 @@ void rgb_matrix_increase_val(void);
void rgb_matrix_decrease_val(void);
void rgb_matrix_increase_speed(void);
void rgb_matrix_decrease_speed(void);
+led_flags_t rgb_matrix_get_flags(void);
+void rgb_matrix_set_flags(led_flags_t flags);
void rgb_matrix_mode(uint8_t mode);
void rgb_matrix_mode_noeeprom(uint8_t mode);
uint8_t rgb_matrix_get_mode(void);