Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove rgblight_list.h #18878

Merged
merged 5 commits into from
Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/feature_eeprom.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void keyboard_post_init_user(void) {
// Set default layer, if enabled
if (user_config.rgb_layer_change) {
rgblight_enable_noeeprom();
rgblight_sethsv_noeeprom_cyan();
rgblight_sethsv_noeeprom(HSV_CYAN);
rgblight_mode_noeeprom(1);
}
}
Expand All @@ -51,19 +51,19 @@ The above function will use the EEPROM config immediately after reading it, to s
layer_state_t layer_state_set_user(layer_state_t state) {
switch (get_highest_layer(state)) {
case _RAISE:
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_magenta(); rgblight_mode_noeeprom(1); }
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_MAGENTA); rgblight_mode_noeeprom(1); }
break;
case _LOWER:
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_red(); rgblight_mode_noeeprom(1); }
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_RED); rgblight_mode_noeeprom(1); }
break;
case _PLOVER:
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_green(); rgblight_mode_noeeprom(1); }
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_GREEN); rgblight_mode_noeeprom(1); }
break;
case _ADJUST:
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_white(); rgblight_mode_noeeprom(1); }
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_WHITE); rgblight_mode_noeeprom(1); }
break;
default: // for any other layers, or the default layer
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_cyan(); rgblight_mode_noeeprom(1); }
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_CYAN); rgblight_mode_noeeprom(1); }
break;
}
return state;
Expand Down Expand Up @@ -119,7 +119,7 @@ void eeconfig_init_user(void) { // EEPROM is getting reset!

// use the non noeeprom versions, to write these values to EEPROM too
rgblight_enable(); // Enable RGB by default
rgblight_sethsv_cyan(); // Set it to CYAN by default
rgblight_sethsv(HSV_CYAN); // Set it to CYAN by default
rgblight_mode(1); // set to solid by default
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,6 @@ void matrix_scan_user(void) {
//EEPROM Reset Function
void eeconfig_init_user(void) {
rgblight_enable(); // Enable RGB by default
rgblight_sethsv_orange(); // Set it to orange by default
rgblight_sethsv(HSV_ORANGE); // Set it to orange by default
}

2 changes: 1 addition & 1 deletion keyboards/bastardkb/charybdis/3x5/keymaps/bstiq/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ void shutdown_user(void) {
#ifdef RGBLIGHT_ENABLE
rgblight_enable_noeeprom();
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
rgblight_setrgb_red();
rgblight_setrgb(RGB_RED);
#endif // RGBLIGHT_ENABLE
#ifdef RGB_MATRIX_ENABLE
rgb_matrix_set_color_all(RGB_RED);
Expand Down
2 changes: 1 addition & 1 deletion keyboards/bastardkb/charybdis/3x5/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ void shutdown_user(void) {
#ifdef RGBLIGHT_ENABLE
rgblight_enable_noeeprom();
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
rgblight_setrgb_red();
rgblight_setrgb(RGB_RED);
#endif // RGBLIGHT_ENABLE
#ifdef RGB_MATRIX_ENABLE
rgb_matrix_set_color_all(RGB_RED);
Expand Down
2 changes: 1 addition & 1 deletion keyboards/bastardkb/charybdis/3x6/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void shutdown_user(void) {
#ifdef RGBLIGHT_ENABLE
rgblight_enable_noeeprom();
rgblight_mode_noeeprom(1);
rgblight_setrgb_red();
rgblight_setrgb(RGB_RED);
#endif // RGBLIGHT_ENABLE
#ifdef RGB_MATRIX_ENABLE
rgb_matrix_set_color_all(RGB_RED);
Expand Down
2 changes: 1 addition & 1 deletion keyboards/bastardkb/charybdis/4x6/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ void shutdown_user(void) {
#ifdef RGBLIGHT_ENABLE
rgblight_enable_noeeprom();
rgblight_mode_noeeprom(1);
rgblight_setrgb_red();
rgblight_setrgb(RGB_RED);
#endif // RGBLIGHT_ENABLE
#ifdef RGB_MATRIX_ENABLE
rgb_matrix_set_color_all(RGB_RED);
Expand Down
2 changes: 1 addition & 1 deletion keyboards/bastardkb/dilemma/keymaps/bstiq/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ void shutdown_user(void) {
#ifdef RGBLIGHT_ENABLE
rgblight_enable_noeeprom();
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
rgblight_setrgb_red();
rgblight_setrgb(RGB_RED);
#endif // RGBLIGHT_ENABLE
#ifdef RGB_MATRIX_ENABLE
rgb_matrix_set_color_all(RGB_RED);
Expand Down
10 changes: 5 additions & 5 deletions keyboards/biacco42/ergo42/keymaps/hdbx/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ layer_state_t layer_state_set_keymap (layer_state_t state) {
void matrix_init_user(void) {
#ifdef RGBLIGHT_ENABLE
rgblight_enable();
rgblight_setrgb_teal();
rgblight_setrgb(RGB_TEAL);
#endif
}

Expand All @@ -150,16 +150,16 @@ layer_state_t layer_state_set_user(layer_state_t state) {
#ifdef RGBLIGHT_ENABLE
switch (get_highest_layer(state)) {
case _RAISE:
rgblight_setrgb_chartreuse(); // RAISE:シャルトリューズ
rgblight_setrgb(RGB_CHARTREUSE); // RAISE:シャルトリューズ
break;
case _LOWER:
rgblight_setrgb_pink(); // LOWER:ピンク
rgblight_setrgb(RGB_PINK); // LOWER:ピンク
break;
case _ADJUST:
rgblight_setrgb_red(); // ADJUST:レッド
rgblight_setrgb(RGB_RED); // ADJUST:レッド
break;
default: // for any other layers, or the default layer
rgblight_setrgb_teal(); // 他:ティール
rgblight_setrgb(RGB_TEAL); // 他:ティール
break;
}
#endif
Expand Down
6 changes: 3 additions & 3 deletions keyboards/crkbd/keymaps/edvorakjp/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ layer_state_t layer_state_set_keymap(layer_state_t state) {
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
switch (get_highest_layer(state)) {
case L_EDVORAKJP_LOWER:
rgblight_sethsv_noeeprom_red();
rgblight_sethsv_noeeprom(HSV_RED);
break;
case L_EDVORAKJP_RAISE:
rgblight_sethsv_noeeprom_green();
rgblight_sethsv_noeeprom(HSV_GREEN);
break;
default: // for any other layers, or the default layer
rgblight_mode(RGBLIGHT_MODE_STATIC_GRADIENT + 3);
rgblight_sethsv_red();
rgblight_sethsv(HSV_RED);
break;
}
return state;
Expand Down
1 change: 0 additions & 1 deletion keyboards/dp60/keymaps/indicator/indicator.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

#include "dp60.h"

#include "rgblight_list.h"
#include "rgblight.h"


Expand Down
8 changes: 4 additions & 4 deletions keyboards/dz60/keymaps/iso_split-spacebar/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@
#define RGB_XMS RGB_M_X //rgb christmas
//
#define RGB_BL_MODE rgblight_mode_noeeprom(3) //rgb mode for BL layer
#define RGB_BL_LIGHT rgblight_sethsv_noeeprom_turquoise() //rgb light for BL layer
#define RGB_BL_LIGHT rgblight_sethsv_noeeprom(HSV_TURQUOISE) //rgb light for BL layer
//
#define RGB_FL_MODE rgblight_mode_noeeprom(1) //rgb mode for FL layer
#define RGB_FL_LIGHT rgblight_sethsv_noeeprom_orange() //rgb light for FL layer
#define RGB_FL_LIGHT rgblight_sethsv_noeeprom(HSV_ORANGE) //rgb light for FL layer
//
#define RGB_NL_MODE rgblight_mode_noeeprom(12) //rgb mode for NL layer
#define RGB_NL_LIGHT rgblight_sethsv_noeeprom_turquoise() //rgb light for NL layer
#define RGB_NL_LIGHT rgblight_sethsv_noeeprom(HSV_TURQUOISE) //rgb light for NL layer
//
#define RGB_RL_MODE rgblight_mode_noeeprom(22) //rgb mode for RL layer
#define RGB_RL_LIGHT rgblight_sethsv_noeeprom_red() //rgb light for RL layer
#define RGB_RL_LIGHT rgblight_sethsv_noeeprom(HSV_RED) //rgb light for RL layer


const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
Expand Down
4 changes: 2 additions & 2 deletions keyboards/dz60/keymaps/mechmerlin/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};

// Set underglow RGB leds to yellow
// Find the list of available colors in quantum/rgblight_list.h
// Find the list of available colors in quantum/color.h
void matrix_init_user(void) {
rgblight_sethsv_noeeprom_yellow();
rgblight_sethsv_noeeprom(HSV_YELLOW);
}
2 changes: 1 addition & 1 deletion keyboards/dz60/keymaps/mechmerlin/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ This is set in `mechmerlin/config.h` so that when the computer goes to sleep, th

### RGB Underglow Color: Yellow

This is set in `mechmerlin/keymap.c` in the `matrix_init_user` function. The list of available colors can be found in [`quantum/rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/388df5359b913eaf1ce6fb0ef624e430ad010ea5/quantum/rgblight_list.h#L59-L121).
This is set in `mechmerlin/keymap.c` in the `matrix_init_user` function. The list of available colors can be found in [`quantum/color.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/color.h).
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {

switch (layer) {
case DVORAK:
rgblight_sethsv_noeeprom_green();
rgblight_sethsv_noeeprom(GREEN);
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);

if (PLOVER_MODE) {
Expand All @@ -15,7 +15,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
break;

case PLOVER:
rgblight_sethsv_noeeprom_red();
rgblight_sethsv_noeeprom(HSV_RED);
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3);

if (!(PLOVER_MODE)) {
Expand All @@ -26,7 +26,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
break;

case GAMING:
rgblight_sethsv_noeeprom_red();
rgblight_sethsv_noeeprom(HSV_RED);
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);

if (PLOVER_MODE) {
Expand All @@ -37,7 +37,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
break;

case ARROWS:
rgblight_sethsv_noeeprom_blue();
rgblight_sethsv_noeeprom(HSV_BLUE);
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);

if (PLOVER_MODE) {
Expand All @@ -48,7 +48,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
break;

case MOUSE:
rgblight_sethsv_noeeprom_blue();
rgblight_sethsv_noeeprom(HSV_BLUE);
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);

if (PLOVER_MODE) {
Expand All @@ -59,7 +59,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
break;

case NUMPAD:
rgblight_sethsv_noeeprom_blue();
rgblight_sethsv_noeeprom(HSV_BLUE);
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);

if (PLOVER_MODE) {
Expand All @@ -70,7 +70,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
break;

case LAYERS:
rgblight_sethsv_noeeprom_cyan();
rgblight_sethsv_noeeprom(HSV_CYAN);
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);

if (PLOVER_MODE) {
Expand All @@ -81,7 +81,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
break;

case MEDIA_FN:
rgblight_sethsv_noeeprom_yellow();
rgblight_sethsv_noeeprom(HSV_YELLOW);
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);

if (PLOVER_MODE) {
Expand All @@ -92,7 +92,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
break;

case CHORD:
rgblight_sethsv_noeeprom_magenta();
rgblight_sethsv_noeeprom(HSV_MAGENTA);
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);

if (PLOVER_MODE) {
Expand All @@ -103,7 +103,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
break;

case FIRMWARE:
rgblight_sethsv_noeeprom_magenta();
rgblight_sethsv_noeeprom(HSV_MAGENTA);
rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2);

if (PLOVER_MODE) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ bool MATRIX_SCANNED = false;

void matrix_scan_user(void) {
if (!(MATRIX_SCANNED)) {
rgblight_sethsv_noeeprom_green();
rgblight_sethsv_noeeprom(HSV_GREEN);
MATRIX_SCANNED = true;
}

Expand Down
20 changes: 10 additions & 10 deletions keyboards/ergodox_ez/keymaps/rgb_layer/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

void eeconfig_init_user(void) {
rgblight_enable();
rgblight_sethsv_cyan();
rgblight_sethsv(HSV_CYAN);
rgblight_mode(1);
user_config.rgb_layer_change = true;
eeconfig_update_user(user_config.raw);
Expand Down Expand Up @@ -213,7 +213,7 @@ void matrix_init_user(void) {
// Set default layer, if enabled
if (user_config.rgb_layer_change) {
rgblight_enable_noeeprom();
rgblight_sethsv_noeeprom_cyan();
rgblight_sethsv_noeeprom(HSV_CYAN);
rgblight_mode_noeeprom(1);
}
}
Expand All @@ -231,39 +231,39 @@ layer_state_t layer_state_set_user(layer_state_t state) {
switch (get_highest_layer(state)) {
case SYMB:
ergodox_right_led_1_on();
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_red(); rgblight_mode_noeeprom(1); }
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_RED); rgblight_mode_noeeprom(1); }
break;
case MDIA:
ergodox_right_led_2_on();
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_green(); rgblight_mode_noeeprom(1); }
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_GREEN); rgblight_mode_noeeprom(1); }
break;
case 3:
ergodox_right_led_3_on();
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_blue(); rgblight_mode_noeeprom(1); }
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_BLUE); rgblight_mode_noeeprom(1); }
break;
case 4:
ergodox_right_led_1_on();
ergodox_right_led_2_on();
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_orange(); rgblight_mode_noeeprom(1); }
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_ORANGE); rgblight_mode_noeeprom(1); }
break;
case 5:
ergodox_right_led_1_on();
ergodox_right_led_3_on();
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_yellow(); rgblight_mode_noeeprom(1); }
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_YELLOW); rgblight_mode_noeeprom(1); }
break;
case 6:
ergodox_right_led_2_on();
ergodox_right_led_3_on();
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_pink(); rgblight_mode_noeeprom(1); }
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_PINK); rgblight_mode_noeeprom(1); }
break;
case 7:
ergodox_right_led_1_on();
ergodox_right_led_2_on();
ergodox_right_led_3_on();
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_white(); rgblight_mode_noeeprom(1); }
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_WHITE); rgblight_mode_noeeprom(1); }
break;
default: // for any other layers, or the default layer
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_cyan(); rgblight_mode_noeeprom(1); }
if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom(HSV_CYAN); rgblight_mode_noeeprom(1); }
break;
}
return state;
Expand Down
2 changes: 1 addition & 1 deletion keyboards/handwired/heisenberg/keymaps/turkishish/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,6 @@ void keyboard_post_init_user(void) {
//rgblight_config.val = 255;
rgblight_enable_noeeprom(); // enables Rgb, without saving settings
rgblight_sethsv_noeeprom(100, 255, 255); // sets the color to greenish without saving
//rgblight_sethsv_noeeprom_turquoise();
//rgblight_sethsv_noeeprom(HSV_TURQUOISE);

}
2 changes: 1 addition & 1 deletion keyboards/handwired/onekey/keymaps/apa102/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ void keyboard_post_init_user(void) {
apa102_set_brightness(5);

rgblight_enable_noeeprom();
rgblight_sethsv_noeeprom_cyan();
rgblight_sethsv_noeeprom(HSV_CYAN);
rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL);
}
2 changes: 1 addition & 1 deletion keyboards/handwired/onekey/keymaps/rgb/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

void keyboard_post_init_user(void) {
rgblight_enable_noeeprom();
rgblight_sethsv_noeeprom_cyan();
rgblight_sethsv_noeeprom(HSV_CYAN);
rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL);
}
6 changes: 3 additions & 3 deletions keyboards/helix/rev2/keymaps/edvorakjp/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ layer_state_t layer_state_set_keymap(layer_state_t state) {
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
switch (get_highest_layer(state)) {
case L_EDVORAKJP_LOWER:
rgblight_sethsv_noeeprom_red();
rgblight_sethsv_noeeprom(HSV_RED);
break;
case L_EDVORAKJP_RAISE:
rgblight_sethsv_noeeprom_green();
rgblight_sethsv_noeeprom(HSV_GREEN);
break;
default: // for any other layers, or the default layer
rgblight_mode(RGBLIGHT_MODE_STATIC_GRADIENT + 3);
rgblight_sethsv_red();
rgblight_sethsv(HSV_RED);
break;
}
return state;
Expand Down
Loading