From 6689f900fc0ed9022706af7605d40225a3348f63 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 13 May 2019 14:48:53 -0700 Subject: Consolidate RGB Matrix layer indication function And changes to iris --- users/drashna/rgb_stuff.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'users/drashna/rgb_stuff.c') diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index 9e19747fa3..3421866170 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c @@ -334,3 +334,14 @@ uint32_t layer_state_set_rgb(uint32_t state) { return state; } + +#ifdef RGB_MATRIX_ENABLE +extern led_config_t g_led_config; +void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, uint8_t led_type) { + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + if (HAS_FLAGS(g_led_config.flags[i], led_type)) { + rgb_matrix_set_color( i, red, green, blue ); + } + } +} +#endif -- cgit v1.2.3