diff options
| author | Drashna Jaelre <drashna@live.com> | 2019-05-13 14:48:53 -0700 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2019-05-17 15:02:19 -0700 |
| commit | 6689f900fc0ed9022706af7605d40225a3348f63 (patch) | |
| tree | 2cd43786afb5540a0db850db4ba5e3336fa6e217 /users/drashna | |
| parent | f520316124fb789af0981fd6e5381f090c300acb (diff) | |
| download | qmk_firmware-6689f900fc0ed9022706af7605d40225a3348f63.tar.gz qmk_firmware-6689f900fc0ed9022706af7605d40225a3348f63.zip | |
Consolidate RGB Matrix layer indication function
And changes to iris
Diffstat (limited to 'users/drashna')
| -rw-r--r-- | users/drashna/rgb_stuff.c | 11 | ||||
| -rw-r--r-- | users/drashna/rgb_stuff.h | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index 9e19747fa..342186617 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) { | |||
| 334 | 334 | ||
| 335 | return state; | 335 | return state; |
| 336 | } | 336 | } |
| 337 | |||
| 338 | #ifdef RGB_MATRIX_ENABLE | ||
| 339 | extern led_config_t g_led_config; | ||
| 340 | void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, uint8_t led_type) { | ||
| 341 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { | ||
| 342 | if (HAS_FLAGS(g_led_config.flags[i], led_type)) { | ||
| 343 | rgb_matrix_set_color( i, red, green, blue ); | ||
| 344 | } | ||
| 345 | } | ||
| 346 | } | ||
| 347 | #endif | ||
diff --git a/users/drashna/rgb_stuff.h b/users/drashna/rgb_stuff.h index 886f20ffc..572104612 100644 --- a/users/drashna/rgb_stuff.h +++ b/users/drashna/rgb_stuff.h | |||
| @@ -19,3 +19,5 @@ uint32_t layer_state_set_rgb(uint32_t state); | |||
| 19 | uint32_t default_layer_state_set_rgb(uint32_t state); | 19 | uint32_t default_layer_state_set_rgb(uint32_t state); |
| 20 | void rgblight_sethsv_default_helper(uint8_t index); | 20 | void rgblight_sethsv_default_helper(uint8_t index); |
| 21 | void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); | 21 | void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); |
| 22 | |||
| 23 | void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, uint8_t led_type); | ||
