diff options
Diffstat (limited to 'keyboards/duck/jetfire/jetfire.c')
-rw-r--r-- | keyboards/duck/jetfire/jetfire.c | 61 |
1 files changed, 8 insertions, 53 deletions
diff --git a/keyboards/duck/jetfire/jetfire.c b/keyboards/duck/jetfire/jetfire.c index 9bb02ca22c..d648287156 100644 --- a/keyboards/duck/jetfire/jetfire.c +++ b/keyboards/duck/jetfire/jetfire.c @@ -44,61 +44,16 @@ uint8_t backlight_state_led = 1<<STATE_LED_LAYER_0; void backlight_toggle_rgb(bool enabled) { + uint8_t rgb[RGBLED_NUM][3] = { 0 }; + if(enabled) { - uint8_t rgb[RGBLED_NUM][3] = { - {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, - {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, - {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, - {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, - {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, - {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, - {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, - {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, - {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, - {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, - {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, - {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, - {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, - {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, - {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, - {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, - {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, - {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, - {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, - {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, - {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, - {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b}, - {backlight_rgb_r, backlight_rgb_g, backlight_rgb_b} - }; - backlight_set_rgb(rgb); - } else { - uint8_t rgb[RGBLED_NUM][3] = { - {0, 0, 0}, - {0, 0, 0}, - {0, 0, 0}, - {0, 0, 0}, - {0, 0, 0}, - {0, 0, 0}, - {0, 0, 0}, - {0, 0, 0}, - {0, 0, 0}, - {0, 0, 0}, - {0, 0, 0}, - {0, 0, 0}, - {0, 0, 0}, - {0, 0, 0}, - {0, 0, 0}, - {0, 0, 0}, - {0, 0, 0}, - {0, 0, 0}, - {0, 0, 0}, - {0, 0, 0}, - {0, 0, 0}, - {0, 0, 0}, - {0, 0, 0} - }; - backlight_set_rgb(rgb); + for(uint8_t i = 0; i < RGBLED_NUM; ++i) { + rgb[i][0] = backlight_rgb_r; + rgb[i][1] = backlight_rgb_g; + rgb[i][2] = backlight_rgb_b; + } } + backlight_set_rgb(rgb); } void backlight_set_rgb(uint8_t cfg[RGBLED_NUM][3]) |