diff options
| -rw-r--r-- | keyboards/input_club/ergodox_infinity/ergodox_infinity.c | 3 | ||||
| -rw-r--r-- | keyboards/input_club/k_type/k_type.c | 3 | ||||
| -rw-r--r-- | keyboards/input_club/whitefox/whitefox.c | 3 | ||||
| -rw-r--r-- | keyboards/kbdfans/kbd67/mkiirgb/v3/info.json | 3 | ||||
| -rwxr-xr-x | keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c | 8 | ||||
| -rw-r--r-- | keyboards/teleport/native/ansi/keymaps/default/keymap.c | 6 | ||||
| -rw-r--r-- | keyboards/teleport/native/ansi/keymaps/perfmode/keymap.c | 6 | ||||
| -rw-r--r-- | keyboards/teleport/native/ansi/keymaps/via/keymap.c | 6 | ||||
| -rw-r--r-- | keyboards/teleport/native/config.h | 7 | ||||
| -rw-r--r-- | keyboards/teleport/native/iso/keymaps/default/keymap.c | 6 | ||||
| -rw-r--r-- | keyboards/teleport/native/iso/keymaps/perfmode/keymap.c | 6 | ||||
| -rw-r--r-- | keyboards/teleport/native/iso/keymaps/via/keymap.c | 6 | ||||
| -rw-r--r-- | keyboards/zykrah/fuyu/keymaps/via/keymap.c | 8 | ||||
| -rw-r--r-- | quantum/led_matrix/led_matrix.c | 31 | ||||
| -rw-r--r-- | quantum/led_matrix/led_matrix.h | 28 | ||||
| -rw-r--r-- | quantum/rgb_matrix/rgb_matrix.c | 52 | ||||
| -rw-r--r-- | quantum/rgb_matrix/rgb_matrix.h | 49 | ||||
| -rw-r--r-- | quantum/via.c | 10 |
18 files changed, 103 insertions, 138 deletions
diff --git a/keyboards/input_club/ergodox_infinity/ergodox_infinity.c b/keyboards/input_club/ergodox_infinity/ergodox_infinity.c index b8f0d4ae13..70cd26a3f3 100644 --- a/keyboards/input_club/ergodox_infinity/ergodox_infinity.c +++ b/keyboards/input_club/ergodox_infinity/ergodox_infinity.c | |||
| @@ -117,9 +117,6 @@ void matrix_init_kb(void) { | |||
| 117 | * Since K20x is stuck with a 32 byte EEPROM (see tmk_core/common/chibios/eeprom_teensy.c), | 117 | * Since K20x is stuck with a 32 byte EEPROM (see tmk_core/common/chibios/eeprom_teensy.c), |
| 118 | * and neither led_matrix_eeconfig.speed or .flags fit in this boundary, just force their values to default on boot. | 118 | * and neither led_matrix_eeconfig.speed or .flags fit in this boundary, just force their values to default on boot. |
| 119 | */ | 119 | */ |
| 120 | # if !defined(LED_MATRIX_DEFAULT_SPD) | ||
| 121 | # define LED_MATRIX_DEFAULT_SPD UINT8_MAX / 2 | ||
| 122 | # endif | ||
| 123 | led_matrix_set_speed(LED_MATRIX_DEFAULT_SPD); | 120 | led_matrix_set_speed(LED_MATRIX_DEFAULT_SPD); |
| 124 | led_matrix_set_flags(LED_FLAG_ALL); | 121 | led_matrix_set_flags(LED_FLAG_ALL); |
| 125 | #endif | 122 | #endif |
diff --git a/keyboards/input_club/k_type/k_type.c b/keyboards/input_club/k_type/k_type.c index dc1ca9dc25..0d0b763b20 100644 --- a/keyboards/input_club/k_type/k_type.c +++ b/keyboards/input_club/k_type/k_type.c | |||
| @@ -217,9 +217,6 @@ void matrix_init_kb(void) { | |||
| 217 | * Since K20x is stuck with a 32 byte EEPROM (see tmk_core/common/chibios/eeprom_teensy.c), | 217 | * Since K20x is stuck with a 32 byte EEPROM (see tmk_core/common/chibios/eeprom_teensy.c), |
| 218 | * and neither led_matrix_eeconfig.speed or .flags fit in this boundary, just force their values to default on boot. | 218 | * and neither led_matrix_eeconfig.speed or .flags fit in this boundary, just force their values to default on boot. |
| 219 | */ | 219 | */ |
| 220 | # if !defined(RGB_MATRIX_DEFAULT_SPD) | ||
| 221 | # define RGB_MATRIX_DEFAULT_SPD UINT8_MAX / 2 | ||
| 222 | # endif | ||
| 223 | rgb_matrix_set_speed(RGB_MATRIX_DEFAULT_SPD), | 220 | rgb_matrix_set_speed(RGB_MATRIX_DEFAULT_SPD), |
| 224 | rgb_matrix_set_flags(LED_FLAG_ALL); | 221 | rgb_matrix_set_flags(LED_FLAG_ALL); |
| 225 | 222 | ||
diff --git a/keyboards/input_club/whitefox/whitefox.c b/keyboards/input_club/whitefox/whitefox.c index 4aa12586f3..b0f0f03776 100644 --- a/keyboards/input_club/whitefox/whitefox.c +++ b/keyboards/input_club/whitefox/whitefox.c | |||
| @@ -83,9 +83,6 @@ void matrix_init_kb(void) { | |||
| 83 | * Since K20x is stuck with a 32 byte EEPROM (see tmk_core/common/chibios/eeprom_teensy.c), | 83 | * Since K20x is stuck with a 32 byte EEPROM (see tmk_core/common/chibios/eeprom_teensy.c), |
| 84 | * and neither led_matrix_eeconfig.speed or .flags fit in this boundary, just force their values to default on boot. | 84 | * and neither led_matrix_eeconfig.speed or .flags fit in this boundary, just force their values to default on boot. |
| 85 | */ | 85 | */ |
| 86 | # if !defined(LED_MATRIX_DEFAULT_SPD) | ||
| 87 | # define LED_MATRIX_DEFAULT_SPD UINT8_MAX / 2 | ||
| 88 | # endif | ||
| 89 | led_matrix_set_speed(LED_MATRIX_DEFAULT_SPD), | 86 | led_matrix_set_speed(LED_MATRIX_DEFAULT_SPD), |
| 90 | led_matrix_set_flags(LED_FLAG_ALL); | 87 | led_matrix_set_flags(LED_FLAG_ALL); |
| 91 | #endif | 88 | #endif |
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v3/info.json b/keyboards/kbdfans/kbd67/mkiirgb/v3/info.json index 165db96293..284461c2a7 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v3/info.json +++ b/keyboards/kbdfans/kbd67/mkiirgb/v3/info.json | |||
| @@ -5,7 +5,8 @@ | |||
| 5 | "device_version": "0.0.3" | 5 | "device_version": "0.0.3" |
| 6 | }, | 6 | }, |
| 7 | "rgb_matrix": { | 7 | "rgb_matrix": { |
| 8 | "driver": "is31fl3741" | 8 | "driver": "is31fl3741", |
| 9 | "val_steps": 8 | ||
| 9 | }, | 10 | }, |
| 10 | "matrix_pins": { | 11 | "matrix_pins": { |
| 11 | "cols": ["F7", "F6", "F5", "C7", "B0", "B1", "B2", "B3", "B4", "D7", "D6", "D4", "D5", "D3", "D2"], | 12 | "cols": ["F7", "F6", "F5", "C7", "B0", "B1", "B2", "B3", "B4", "D7", "D6", "D4", "D5", "D3", "D2"], |
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c b/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c index 4329893ac1..c0f892980e 100755 --- a/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c +++ b/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c | |||
| @@ -125,16 +125,12 @@ led_config_t g_led_config = { { | |||
| 125 | 125 | ||
| 126 | #if defined(RGB_MATRIX_ENABLE) && defined(CAPS_LOCK_LED_INDEX) | 126 | #if defined(RGB_MATRIX_ENABLE) && defined(CAPS_LOCK_LED_INDEX) |
| 127 | 127 | ||
| 128 | #ifdef RGB_MATRIX_MAXIMUM_BRIGHTNESS | 128 | #if !defined(CAPS_LOCK_MAX_BRIGHTNESS) |
| 129 | #define CAPS_LOCK_MAX_BRIGHTNESS RGB_MATRIX_MAXIMUM_BRIGHTNESS | 129 | #define CAPS_LOCK_MAX_BRIGHTNESS RGB_MATRIX_MAXIMUM_BRIGHTNESS |
| 130 | #else | ||
| 131 | #define CAPS_LOCK_MAX_BRIGHTNESS 0xFF | ||
| 132 | #endif | 130 | #endif |
| 133 | 131 | ||
| 134 | #ifdef RGB_MATRIX_VAL_STEP | 132 | #if !defined(CAPS_LOCK_VAL_STEP) |
| 135 | #define CAPS_LOCK_VAL_STEP RGB_MATRIX_VAL_STEP | 133 | #define CAPS_LOCK_VAL_STEP RGB_MATRIX_VAL_STEP |
| 136 | #else | ||
| 137 | #define CAPS_LOCK_VAL_STEP 8 | ||
| 138 | #endif | 134 | #endif |
| 139 | 135 | ||
| 140 | bool rgb_matrix_indicators_kb(void) { | 136 | bool rgb_matrix_indicators_kb(void) { |
diff --git a/keyboards/teleport/native/ansi/keymaps/default/keymap.c b/keyboards/teleport/native/ansi/keymaps/default/keymap.c index fcea5c41f3..2780fdda7d 100644 --- a/keyboards/teleport/native/ansi/keymaps/default/keymap.c +++ b/keyboards/teleport/native/ansi/keymaps/default/keymap.c | |||
| @@ -53,11 +53,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 53 | 53 | ||
| 54 | /* RGB matrix indicator code | 54 | /* RGB matrix indicator code |
| 55 | It reads the current matrix color, offsets the hue by 30, | 55 | It reads the current matrix color, offsets the hue by 30, |
| 56 | and sets val to either 255 or, if defined, RGB_MATRIX_MAXIMUM_BRIGHTNESS | 56 | and sets val to RGB_MATRIX_MAXIMUM_BRIGHTNESS (by default, 255) |
| 57 | This is applied to both caps lock, and other indicator keys for layer 1 */ | 57 | This is applied to both caps lock, and other indicator keys for layer 1 */ |
| 58 | 58 | ||
| 59 | bool rgb_matrix_indicators_user(void) { | 59 | bool rgb_matrix_indicators_user(void) { |
| 60 | HSV hsv_ind = {rgb_matrix_get_hue()+30,255,INDICATOR_MAX_BRIGHTNESS}; | 60 | HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS}; |
| 61 | RGB rgb_ind = hsv_to_rgb(hsv_ind); | 61 | RGB rgb_ind = hsv_to_rgb(hsv_ind); |
| 62 | 62 | ||
| 63 | /* Sets Caps to different color as indicator. If RGB mode is rain, and caps indicator is off, the LED will always be off. | 63 | /* Sets Caps to different color as indicator. If RGB mode is rain, and caps indicator is off, the LED will always be off. |
| @@ -70,7 +70,7 @@ bool rgb_matrix_indicators_user(void) { | |||
| 70 | 70 | ||
| 71 | /* Sets W, A, S, D, LGUI to a different color as layer indicator */ | 71 | /* Sets W, A, S, D, LGUI to a different color as layer indicator */ |
| 72 | if(IS_LAYER_ON(1)) { | 72 | if(IS_LAYER_ON(1)) { |
| 73 | HSV hsv_ind = {rgb_matrix_get_hue()+30,255,INDICATOR_MAX_BRIGHTNESS}; | 73 | HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS}; |
| 74 | RGB rgb_ind = hsv_to_rgb(hsv_ind); | 74 | RGB rgb_ind = hsv_to_rgb(hsv_ind); |
| 75 | 75 | ||
| 76 | rgb_matrix_set_color(W_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b); | 76 | rgb_matrix_set_color(W_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b); |
diff --git a/keyboards/teleport/native/ansi/keymaps/perfmode/keymap.c b/keyboards/teleport/native/ansi/keymaps/perfmode/keymap.c index 1a7852a062..ab598dd5e6 100644 --- a/keyboards/teleport/native/ansi/keymaps/perfmode/keymap.c +++ b/keyboards/teleport/native/ansi/keymaps/perfmode/keymap.c | |||
| @@ -144,13 +144,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 144 | 144 | ||
| 145 | /* RGB matrix indicator code | 145 | /* RGB matrix indicator code |
| 146 | It reads the current matrix color, offsets the hue by 30, | 146 | It reads the current matrix color, offsets the hue by 30, |
| 147 | and sets val to either 255 or, if defined, RGB_MATRIX_MAXIMUM_BRIGHTNESS | 147 | and sets val to RGB_MATRIX_MAXIMUM_BRIGHTNESS (by default, 255) |
| 148 | This is applied to both caps lock, and other indicator keys for layer 1 */ | 148 | This is applied to both caps lock, and other indicator keys for layer 1 */ |
| 149 | 149 | ||
| 150 | bool rgb_matrix_indicators_user(void) { | 150 | bool rgb_matrix_indicators_user(void) { |
| 151 | /* Layer 2 (perf mode on this keymap) is not supposed to have LED refreshes, hence excluded */ | 151 | /* Layer 2 (perf mode on this keymap) is not supposed to have LED refreshes, hence excluded */ |
| 152 | if (!IS_LAYER_ON(2)) { | 152 | if (!IS_LAYER_ON(2)) { |
| 153 | HSV hsv_ind = {rgb_matrix_get_hue()+30,255,INDICATOR_MAX_BRIGHTNESS}; | 153 | HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS}; |
| 154 | RGB rgb_ind = hsv_to_rgb(hsv_ind); | 154 | RGB rgb_ind = hsv_to_rgb(hsv_ind); |
| 155 | 155 | ||
| 156 | /* Sets Caps to different color as indicator. If RGB mode is rain, and caps indicator is off, the LED will always be off. | 156 | /* Sets Caps to different color as indicator. If RGB mode is rain, and caps indicator is off, the LED will always be off. |
| @@ -163,7 +163,7 @@ bool rgb_matrix_indicators_user(void) { | |||
| 163 | 163 | ||
| 164 | /* Sets W, A, S, D, LGUI to a different color as layer indicator */ | 164 | /* Sets W, A, S, D, LGUI to a different color as layer indicator */ |
| 165 | if(IS_LAYER_ON(1)) { | 165 | if(IS_LAYER_ON(1)) { |
| 166 | HSV hsv_ind = {rgb_matrix_get_hue()+30,255,INDICATOR_MAX_BRIGHTNESS}; | 166 | HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS}; |
| 167 | RGB rgb_ind = hsv_to_rgb(hsv_ind); | 167 | RGB rgb_ind = hsv_to_rgb(hsv_ind); |
| 168 | 168 | ||
| 169 | rgb_matrix_set_color(W_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b); | 169 | rgb_matrix_set_color(W_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b); |
diff --git a/keyboards/teleport/native/ansi/keymaps/via/keymap.c b/keyboards/teleport/native/ansi/keymaps/via/keymap.c index e1fbd285ec..95a5bc58b1 100644 --- a/keyboards/teleport/native/ansi/keymaps/via/keymap.c +++ b/keyboards/teleport/native/ansi/keymaps/via/keymap.c | |||
| @@ -53,11 +53,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 53 | 53 | ||
| 54 | /* RGB matrix indicator code | 54 | /* RGB matrix indicator code |
| 55 | It reads the current matrix color, offsets the hue by 30, | 55 | It reads the current matrix color, offsets the hue by 30, |
| 56 | and sets val to either 255 or, if defined, RGB_MATRIX_MAXIMUM_BRIGHTNESS | 56 | and sets val to RGB_MATRIX_MAXIMUM_BRIGHTNESS (by default, 255) |
| 57 | This is applied to both caps lock, and other indicator keys for layer 1 */ | 57 | This is applied to both caps lock, and other indicator keys for layer 1 */ |
| 58 | 58 | ||
| 59 | bool rgb_matrix_indicators_user(void) { | 59 | bool rgb_matrix_indicators_user(void) { |
| 60 | HSV hsv_ind = {rgb_matrix_get_hue()+30,255,INDICATOR_MAX_BRIGHTNESS}; | 60 | HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS}; |
| 61 | RGB rgb_ind = hsv_to_rgb(hsv_ind); | 61 | RGB rgb_ind = hsv_to_rgb(hsv_ind); |
| 62 | 62 | ||
| 63 | /* Sets Caps to different color as indicator. If RGB mode is rain, and caps indicator is off, the LED will always be off. | 63 | /* Sets Caps to different color as indicator. If RGB mode is rain, and caps indicator is off, the LED will always be off. |
| @@ -70,7 +70,7 @@ bool rgb_matrix_indicators_user(void) { | |||
| 70 | 70 | ||
| 71 | /* Sets W, A, S, D, LGUI to a different color as layer indicator */ | 71 | /* Sets W, A, S, D, LGUI to a different color as layer indicator */ |
| 72 | if(IS_LAYER_ON(1)) { | 72 | if(IS_LAYER_ON(1)) { |
| 73 | HSV hsv_ind = {rgb_matrix_get_hue()+30,255,INDICATOR_MAX_BRIGHTNESS}; | 73 | HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS}; |
| 74 | RGB rgb_ind = hsv_to_rgb(hsv_ind); | 74 | RGB rgb_ind = hsv_to_rgb(hsv_ind); |
| 75 | 75 | ||
| 76 | rgb_matrix_set_color(W_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b); | 76 | rgb_matrix_set_color(W_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b); |
diff --git a/keyboards/teleport/native/config.h b/keyboards/teleport/native/config.h index ed858db0c7..c607aa0afe 100644 --- a/keyboards/teleport/native/config.h +++ b/keyboards/teleport/native/config.h | |||
| @@ -61,13 +61,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 61 | #define ENABLE_RGB_MATRIX_CUSTOM_SINGLE_COLOR_RAINDROPS // 0 Single color raindrops, random keys lighting up at randomized intensity | 61 | #define ENABLE_RGB_MATRIX_CUSTOM_SINGLE_COLOR_RAINDROPS // 0 Single color raindrops, random keys lighting up at randomized intensity |
| 62 | #define ENABLE_RGB_MATRIX_CUSTOM_STATIC_GAME_MODE // - Game mode sets the entire matrix (static) once, then stops LED refreshes | 62 | #define ENABLE_RGB_MATRIX_CUSTOM_STATIC_GAME_MODE // - Game mode sets the entire matrix (static) once, then stops LED refreshes |
| 63 | 63 | ||
| 64 | #define INDICATOR_MAX_BRIGHTNESS 255 | ||
| 65 | #ifdef RGB_MATRIX_MAXIMUM_BRIGHTNESS | ||
| 66 | #undef INDICATOR_MAX_BRIGHTNESS | ||
| 67 | #define INDICATOR_MAX_BRIGHTNESS RGB_MATRIX_MAXIMUM_BRIGHTNESS | ||
| 68 | #endif | ||
| 69 | |||
| 70 | |||
| 71 | /* Define indicator LED indices, used for lighting effects */ | 64 | /* Define indicator LED indices, used for lighting effects */ |
| 72 | #define W_LED_INDEX 33 | 65 | #define W_LED_INDEX 33 |
| 73 | #define A_LED_INDEX 47 | 66 | #define A_LED_INDEX 47 |
diff --git a/keyboards/teleport/native/iso/keymaps/default/keymap.c b/keyboards/teleport/native/iso/keymaps/default/keymap.c index c1ed3cd4f4..b6f2e7ab82 100644 --- a/keyboards/teleport/native/iso/keymaps/default/keymap.c +++ b/keyboards/teleport/native/iso/keymaps/default/keymap.c | |||
| @@ -53,11 +53,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 53 | 53 | ||
| 54 | /* RGB matrix indicator code | 54 | /* RGB matrix indicator code |
| 55 | It reads the current matrix color, offsets the hue by 30, | 55 | It reads the current matrix color, offsets the hue by 30, |
| 56 | and sets val to either 255 or, if defined, RGB_MATRIX_MAXIMUM_BRIGHTNESS | 56 | and sets val to RGB_MATRIX_MAXIMUM_BRIGHTNESS (by default, 255) |
| 57 | This is applied to both caps lock, and other indicator keys for layer 1 */ | 57 | This is applied to both caps lock, and other indicator keys for layer 1 */ |
| 58 | 58 | ||
| 59 | bool rgb_matrix_indicators_user(void) { | 59 | bool rgb_matrix_indicators_user(void) { |
| 60 | HSV hsv_ind = {rgb_matrix_get_hue()+30,255,INDICATOR_MAX_BRIGHTNESS}; | 60 | HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS}; |
| 61 | RGB rgb_ind = hsv_to_rgb(hsv_ind); | 61 | RGB rgb_ind = hsv_to_rgb(hsv_ind); |
| 62 | 62 | ||
| 63 | /* Sets Caps to different color as indicator. If RGB mode is rain, and caps indicator is off, the LED will always be off. | 63 | /* Sets Caps to different color as indicator. If RGB mode is rain, and caps indicator is off, the LED will always be off. |
| @@ -70,7 +70,7 @@ bool rgb_matrix_indicators_user(void) { | |||
| 70 | 70 | ||
| 71 | /* Sets W, A, S, D, LGUI to a different color as layer indicator */ | 71 | /* Sets W, A, S, D, LGUI to a different color as layer indicator */ |
| 72 | if(IS_LAYER_ON(1)) { | 72 | if(IS_LAYER_ON(1)) { |
| 73 | HSV hsv_ind = {rgb_matrix_get_hue()+30,255,INDICATOR_MAX_BRIGHTNESS}; | 73 | HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS}; |
| 74 | RGB rgb_ind = hsv_to_rgb(hsv_ind); | 74 | RGB rgb_ind = hsv_to_rgb(hsv_ind); |
| 75 | 75 | ||
| 76 | rgb_matrix_set_color(W_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b); | 76 | rgb_matrix_set_color(W_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b); |
diff --git a/keyboards/teleport/native/iso/keymaps/perfmode/keymap.c b/keyboards/teleport/native/iso/keymaps/perfmode/keymap.c index 3be8eec3dd..f95391358a 100644 --- a/keyboards/teleport/native/iso/keymaps/perfmode/keymap.c +++ b/keyboards/teleport/native/iso/keymaps/perfmode/keymap.c | |||
| @@ -144,13 +144,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 144 | 144 | ||
| 145 | /* RGB matrix indicator code | 145 | /* RGB matrix indicator code |
| 146 | It reads the current matrix color, offsets the hue by 30, | 146 | It reads the current matrix color, offsets the hue by 30, |
| 147 | and sets val to either 255 or, if defined, RGB_MATRIX_MAXIMUM_BRIGHTNESS | 147 | and sets val to RGB_MATRIX_MAXIMUM_BRIGHTNESS (by default, 255) |
| 148 | This is applied to both caps lock, and other indicator keys for layer 1 */ | 148 | This is applied to both caps lock, and other indicator keys for layer 1 */ |
| 149 | 149 | ||
| 150 | bool rgb_matrix_indicators_user(void) { | 150 | bool rgb_matrix_indicators_user(void) { |
| 151 | /* Layer 2 (perf mode on this keymap) is not supposed to have LED refreshes, hence excluded */ | 151 | /* Layer 2 (perf mode on this keymap) is not supposed to have LED refreshes, hence excluded */ |
| 152 | if (!IS_LAYER_ON(2)) { | 152 | if (!IS_LAYER_ON(2)) { |
| 153 | HSV hsv_ind = {rgb_matrix_get_hue()+30,255,INDICATOR_MAX_BRIGHTNESS}; | 153 | HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS}; |
| 154 | RGB rgb_ind = hsv_to_rgb(hsv_ind); | 154 | RGB rgb_ind = hsv_to_rgb(hsv_ind); |
| 155 | 155 | ||
| 156 | /* Sets Caps to different color as indicator. If RGB mode is rain, and caps indicator is off, the LED will always be off. | 156 | /* Sets Caps to different color as indicator. If RGB mode is rain, and caps indicator is off, the LED will always be off. |
| @@ -163,7 +163,7 @@ bool rgb_matrix_indicators_user(void) { | |||
| 163 | 163 | ||
| 164 | /* Sets W, A, S, D, LGUI to a different color as layer indicator */ | 164 | /* Sets W, A, S, D, LGUI to a different color as layer indicator */ |
| 165 | if(IS_LAYER_ON(1)) { | 165 | if(IS_LAYER_ON(1)) { |
| 166 | HSV hsv_ind = {rgb_matrix_get_hue()+30,255,INDICATOR_MAX_BRIGHTNESS}; | 166 | HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS}; |
| 167 | RGB rgb_ind = hsv_to_rgb(hsv_ind); | 167 | RGB rgb_ind = hsv_to_rgb(hsv_ind); |
| 168 | 168 | ||
| 169 | rgb_matrix_set_color(W_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b); | 169 | rgb_matrix_set_color(W_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b); |
diff --git a/keyboards/teleport/native/iso/keymaps/via/keymap.c b/keyboards/teleport/native/iso/keymaps/via/keymap.c index c1ed3cd4f4..b6f2e7ab82 100644 --- a/keyboards/teleport/native/iso/keymaps/via/keymap.c +++ b/keyboards/teleport/native/iso/keymaps/via/keymap.c | |||
| @@ -53,11 +53,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 53 | 53 | ||
| 54 | /* RGB matrix indicator code | 54 | /* RGB matrix indicator code |
| 55 | It reads the current matrix color, offsets the hue by 30, | 55 | It reads the current matrix color, offsets the hue by 30, |
| 56 | and sets val to either 255 or, if defined, RGB_MATRIX_MAXIMUM_BRIGHTNESS | 56 | and sets val to RGB_MATRIX_MAXIMUM_BRIGHTNESS (by default, 255) |
| 57 | This is applied to both caps lock, and other indicator keys for layer 1 */ | 57 | This is applied to both caps lock, and other indicator keys for layer 1 */ |
| 58 | 58 | ||
| 59 | bool rgb_matrix_indicators_user(void) { | 59 | bool rgb_matrix_indicators_user(void) { |
| 60 | HSV hsv_ind = {rgb_matrix_get_hue()+30,255,INDICATOR_MAX_BRIGHTNESS}; | 60 | HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS}; |
| 61 | RGB rgb_ind = hsv_to_rgb(hsv_ind); | 61 | RGB rgb_ind = hsv_to_rgb(hsv_ind); |
| 62 | 62 | ||
| 63 | /* Sets Caps to different color as indicator. If RGB mode is rain, and caps indicator is off, the LED will always be off. | 63 | /* Sets Caps to different color as indicator. If RGB mode is rain, and caps indicator is off, the LED will always be off. |
| @@ -70,7 +70,7 @@ bool rgb_matrix_indicators_user(void) { | |||
| 70 | 70 | ||
| 71 | /* Sets W, A, S, D, LGUI to a different color as layer indicator */ | 71 | /* Sets W, A, S, D, LGUI to a different color as layer indicator */ |
| 72 | if(IS_LAYER_ON(1)) { | 72 | if(IS_LAYER_ON(1)) { |
| 73 | HSV hsv_ind = {rgb_matrix_get_hue()+30,255,INDICATOR_MAX_BRIGHTNESS}; | 73 | HSV hsv_ind = {rgb_matrix_get_hue()+30,255,RGB_MATRIX_MAXIMUM_BRIGHTNESS}; |
| 74 | RGB rgb_ind = hsv_to_rgb(hsv_ind); | 74 | RGB rgb_ind = hsv_to_rgb(hsv_ind); |
| 75 | 75 | ||
| 76 | rgb_matrix_set_color(W_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b); | 76 | rgb_matrix_set_color(W_LED_INDEX, rgb_ind.r, rgb_ind.g, rgb_ind.b); |
diff --git a/keyboards/zykrah/fuyu/keymaps/via/keymap.c b/keyboards/zykrah/fuyu/keymaps/via/keymap.c index 1ad867731e..95eb2692cb 100644 --- a/keyboards/zykrah/fuyu/keymaps/via/keymap.c +++ b/keyboards/zykrah/fuyu/keymaps/via/keymap.c | |||
| @@ -73,15 +73,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 73 | // Code for Caps Locks indicator | 73 | // Code for Caps Locks indicator |
| 74 | #if defined(RGB_MATRIX_ENABLE) && defined(CAPS_LOCK_LED_INDEX) | 74 | #if defined(RGB_MATRIX_ENABLE) && defined(CAPS_LOCK_LED_INDEX) |
| 75 | 75 | ||
| 76 | #define CAPS_LOCK_MAX_BRIGHTNESS 0xFF | 76 | #if !defined(CAPS_LOCK_MAX_BRIGHTNESS) |
| 77 | #ifdef RGB_MATRIX_MAXIMUM_BRIGHTNESS | ||
| 78 | #undef CAPS_LOCK_MAX_BRIGHTNESS | ||
| 79 | #define CAPS_LOCK_MAX_BRIGHTNESS RGB_MATRIX_MAXIMUM_BRIGHTNESS | 77 | #define CAPS_LOCK_MAX_BRIGHTNESS RGB_MATRIX_MAXIMUM_BRIGHTNESS |
| 80 | #endif | 78 | #endif |
| 81 | 79 | ||
| 82 | #define CAPS_LOCK_VAL_STEP 8 | 80 | #if !defined(CAPS_LOCK_VAL_STEP) |
| 83 | #ifdef RGB_MATRIX_VAL_STEP | ||
| 84 | #undef CAPS_LOCK_VAL_STEP | ||
| 85 | #define CAPS_LOCK_VAL_STEP RGB_MATRIX_VAL_STEP | 81 | #define CAPS_LOCK_VAL_STEP RGB_MATRIX_VAL_STEP |
| 86 | #endif | 82 | #endif |
| 87 | 83 | ||
diff --git a/quantum/led_matrix/led_matrix.c b/quantum/led_matrix/led_matrix.c index 1676a60aa3..a59d475521 100644 --- a/quantum/led_matrix/led_matrix.c +++ b/quantum/led_matrix/led_matrix.c | |||
| @@ -58,35 +58,6 @@ const led_point_t k_led_matrix_center = LED_MATRIX_CENTER; | |||
| 58 | // -----End led effect includes macros------- | 58 | // -----End led effect includes macros------- |
| 59 | // ------------------------------------------ | 59 | // ------------------------------------------ |
| 60 | 60 | ||
| 61 | #ifndef LED_MATRIX_TIMEOUT | ||
| 62 | # define LED_MATRIX_TIMEOUT 0 | ||
| 63 | #endif | ||
| 64 | |||
| 65 | #if !defined(LED_MATRIX_MAXIMUM_BRIGHTNESS) || LED_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX | ||
| 66 | # undef LED_MATRIX_MAXIMUM_BRIGHTNESS | ||
| 67 | # define LED_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX | ||
| 68 | #endif | ||
| 69 | |||
| 70 | #if !defined(LED_MATRIX_VAL_STEP) | ||
| 71 | # define LED_MATRIX_VAL_STEP 8 | ||
| 72 | #endif | ||
| 73 | |||
| 74 | #if !defined(LED_MATRIX_SPD_STEP) | ||
| 75 | # define LED_MATRIX_SPD_STEP 16 | ||
| 76 | #endif | ||
| 77 | |||
| 78 | #if !defined(LED_MATRIX_DEFAULT_MODE) | ||
| 79 | # define LED_MATRIX_DEFAULT_MODE LED_MATRIX_SOLID | ||
| 80 | #endif | ||
| 81 | |||
| 82 | #if !defined(LED_MATRIX_DEFAULT_VAL) | ||
| 83 | # define LED_MATRIX_DEFAULT_VAL LED_MATRIX_MAXIMUM_BRIGHTNESS | ||
| 84 | #endif | ||
| 85 | |||
| 86 | #if !defined(LED_MATRIX_DEFAULT_SPD) | ||
| 87 | # define LED_MATRIX_DEFAULT_SPD UINT8_MAX / 2 | ||
| 88 | #endif | ||
| 89 | |||
| 90 | // globals | 61 | // globals |
| 91 | led_eeconfig_t led_matrix_eeconfig; // TODO: would like to prefix this with g_ for global consistancy, do this in another pr | 62 | led_eeconfig_t led_matrix_eeconfig; // TODO: would like to prefix this with g_ for global consistancy, do this in another pr |
| 92 | uint32_t g_led_timer; | 63 | uint32_t g_led_timer; |
| @@ -632,7 +603,7 @@ void led_matrix_decrease_speed(void) { | |||
| 632 | void led_matrix_set_flags_eeprom_helper(led_flags_t flags, bool write_to_eeprom) { | 603 | void led_matrix_set_flags_eeprom_helper(led_flags_t flags, bool write_to_eeprom) { |
| 633 | led_matrix_eeconfig.flags = flags; | 604 | led_matrix_eeconfig.flags = flags; |
| 634 | eeconfig_flag_led_matrix(write_to_eeprom); | 605 | eeconfig_flag_led_matrix(write_to_eeprom); |
| 635 | dprintf("led matrix set speed [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.flags); | 606 | dprintf("led matrix set flags [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.flags); |
| 636 | } | 607 | } |
| 637 | 608 | ||
| 638 | led_flags_t led_matrix_get_flags(void) { | 609 | led_flags_t led_matrix_get_flags(void) { |
diff --git a/quantum/led_matrix/led_matrix.h b/quantum/led_matrix/led_matrix.h index cdc90097bb..771afc47ec 100644 --- a/quantum/led_matrix/led_matrix.h +++ b/quantum/led_matrix/led_matrix.h | |||
| @@ -43,6 +43,34 @@ | |||
| 43 | # include "ckled2001-simple.h" | 43 | # include "ckled2001-simple.h" |
| 44 | #endif | 44 | #endif |
| 45 | 45 | ||
| 46 | #ifndef LED_MATRIX_TIMEOUT | ||
| 47 | # define LED_MATRIX_TIMEOUT 0 | ||
| 48 | #endif | ||
| 49 | |||
| 50 | #ifndef LED_MATRIX_MAXIMUM_BRIGHTNESS | ||
| 51 | # define LED_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX | ||
| 52 | #endif | ||
| 53 | |||
| 54 | #ifndef LED_MATRIX_VAL_STEP | ||
| 55 | # define LED_MATRIX_VAL_STEP 8 | ||
| 56 | #endif | ||
| 57 | |||
| 58 | #ifndef LED_MATRIX_SPD_STEP | ||
| 59 | # define LED_MATRIX_SPD_STEP 16 | ||
| 60 | #endif | ||
| 61 | |||
| 62 | #ifndef LED_MATRIX_DEFAULT_MODE | ||
| 63 | # define LED_MATRIX_DEFAULT_MODE LED_MATRIX_SOLID | ||
| 64 | #endif | ||
| 65 | |||
| 66 | #ifndef LED_MATRIX_DEFAULT_VAL | ||
| 67 | # define LED_MATRIX_DEFAULT_VAL LED_MATRIX_MAXIMUM_BRIGHTNESS | ||
| 68 | #endif | ||
| 69 | |||
| 70 | #ifndef LED_MATRIX_DEFAULT_SPD | ||
| 71 | # define LED_MATRIX_DEFAULT_SPD UINT8_MAX / 2 | ||
| 72 | #endif | ||
| 73 | |||
| 46 | #ifndef LED_MATRIX_LED_FLUSH_LIMIT | 74 | #ifndef LED_MATRIX_LED_FLUSH_LIMIT |
| 47 | # define LED_MATRIX_LED_FLUSH_LIMIT 16 | 75 | # define LED_MATRIX_LED_FLUSH_LIMIT 16 |
| 48 | #endif | 76 | #endif |
diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c index 96be615162..ff3e5b2b35 100644 --- a/quantum/rgb_matrix/rgb_matrix.c +++ b/quantum/rgb_matrix/rgb_matrix.c | |||
| @@ -60,56 +60,6 @@ __attribute__((weak)) RGB rgb_matrix_hsv_to_rgb(HSV hsv) { | |||
| 60 | // -----End rgb effect includes macros------- | 60 | // -----End rgb effect includes macros------- |
| 61 | // ------------------------------------------ | 61 | // ------------------------------------------ |
| 62 | 62 | ||
| 63 | #ifndef RGB_MATRIX_TIMEOUT | ||
| 64 | # define RGB_MATRIX_TIMEOUT 0 | ||
| 65 | #endif | ||
| 66 | |||
| 67 | #if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX | ||
| 68 | # undef RGB_MATRIX_MAXIMUM_BRIGHTNESS | ||
| 69 | # define RGB_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX | ||
| 70 | #endif | ||
| 71 | |||
| 72 | #if !defined(RGB_MATRIX_HUE_STEP) | ||
| 73 | # define RGB_MATRIX_HUE_STEP 8 | ||
| 74 | #endif | ||
| 75 | |||
| 76 | #if !defined(RGB_MATRIX_SAT_STEP) | ||
| 77 | # define RGB_MATRIX_SAT_STEP 16 | ||
| 78 | #endif | ||
| 79 | |||
| 80 | #if !defined(RGB_MATRIX_VAL_STEP) | ||
| 81 | # define RGB_MATRIX_VAL_STEP 16 | ||
| 82 | #endif | ||
| 83 | |||
| 84 | #if !defined(RGB_MATRIX_SPD_STEP) | ||
| 85 | # define RGB_MATRIX_SPD_STEP 16 | ||
| 86 | #endif | ||
| 87 | |||
| 88 | #if !defined(RGB_MATRIX_DEFAULT_MODE) | ||
| 89 | # ifdef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT | ||
| 90 | # define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT | ||
| 91 | # else | ||
| 92 | // fallback to solid colors if RGB_MATRIX_CYCLE_LEFT_RIGHT is disabled in userspace | ||
| 93 | # define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR | ||
| 94 | # endif | ||
| 95 | #endif | ||
| 96 | |||
| 97 | #if !defined(RGB_MATRIX_DEFAULT_HUE) | ||
| 98 | # define RGB_MATRIX_DEFAULT_HUE 0 | ||
| 99 | #endif | ||
| 100 | |||
| 101 | #if !defined(RGB_MATRIX_DEFAULT_SAT) | ||
| 102 | # define RGB_MATRIX_DEFAULT_SAT UINT8_MAX | ||
| 103 | #endif | ||
| 104 | |||
| 105 | #if !defined(RGB_MATRIX_DEFAULT_VAL) | ||
| 106 | # define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS | ||
| 107 | #endif | ||
| 108 | |||
| 109 | #if !defined(RGB_MATRIX_DEFAULT_SPD) | ||
| 110 | # define RGB_MATRIX_DEFAULT_SPD UINT8_MAX / 2 | ||
| 111 | #endif | ||
| 112 | |||
| 113 | // globals | 63 | // globals |
| 114 | rgb_config_t rgb_matrix_config; // TODO: would like to prefix this with g_ for global consistancy, do this in another pr | 64 | rgb_config_t rgb_matrix_config; // TODO: would like to prefix this with g_ for global consistancy, do this in another pr |
| 115 | uint32_t g_rgb_timer; | 65 | uint32_t g_rgb_timer; |
| @@ -736,7 +686,7 @@ void rgb_matrix_decrease_speed(void) { | |||
| 736 | void rgb_matrix_set_flags_eeprom_helper(led_flags_t flags, bool write_to_eeprom) { | 686 | void rgb_matrix_set_flags_eeprom_helper(led_flags_t flags, bool write_to_eeprom) { |
| 737 | rgb_matrix_config.flags = flags; | 687 | rgb_matrix_config.flags = flags; |
| 738 | eeconfig_flag_rgb_matrix(write_to_eeprom); | 688 | eeconfig_flag_rgb_matrix(write_to_eeprom); |
| 739 | dprintf("rgb matrix set speed [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.flags); | 689 | dprintf("rgb matrix set flags [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.flags); |
| 740 | } | 690 | } |
| 741 | 691 | ||
| 742 | led_flags_t rgb_matrix_get_flags(void) { | 692 | led_flags_t rgb_matrix_get_flags(void) { |
diff --git a/quantum/rgb_matrix/rgb_matrix.h b/quantum/rgb_matrix/rgb_matrix.h index e4807ee54a..025a1f4700 100644 --- a/quantum/rgb_matrix/rgb_matrix.h +++ b/quantum/rgb_matrix/rgb_matrix.h | |||
| @@ -46,6 +46,55 @@ | |||
| 46 | # include "ws2812.h" | 46 | # include "ws2812.h" |
| 47 | #endif | 47 | #endif |
| 48 | 48 | ||
| 49 | #ifndef RGB_MATRIX_TIMEOUT | ||
| 50 | # define RGB_MATRIX_TIMEOUT 0 | ||
| 51 | #endif | ||
| 52 | |||
| 53 | #ifndef RGB_MATRIX_MAXIMUM_BRIGHTNESS | ||
| 54 | # define RGB_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX | ||
| 55 | #endif | ||
| 56 | |||
| 57 | #ifndef RGB_MATRIX_HUE_STEP | ||
| 58 | # define RGB_MATRIX_HUE_STEP 8 | ||
| 59 | #endif | ||
| 60 | |||
| 61 | #ifndef RGB_MATRIX_SAT_STEP | ||
| 62 | # define RGB_MATRIX_SAT_STEP 16 | ||
| 63 | #endif | ||
| 64 | |||
| 65 | #ifndef RGB_MATRIX_VAL_STEP | ||
| 66 | # define RGB_MATRIX_VAL_STEP 16 | ||
| 67 | #endif | ||
| 68 | |||
| 69 | #ifndef RGB_MATRIX_SPD_STEP | ||
| 70 | # define RGB_MATRIX_SPD_STEP 16 | ||
| 71 | #endif | ||
| 72 | |||
| 73 | #ifndef RGB_MATRIX_DEFAULT_MODE | ||
| 74 | # ifdef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT | ||
| 75 | # define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT | ||
| 76 | # else | ||
| 77 | // fallback to solid colors if RGB_MATRIX_CYCLE_LEFT_RIGHT is disabled in userspace | ||
| 78 | # define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR | ||
| 79 | # endif | ||
| 80 | #endif | ||
| 81 | |||
| 82 | #ifndef RGB_MATRIX_DEFAULT_HUE | ||
| 83 | # define RGB_MATRIX_DEFAULT_HUE 0 | ||
| 84 | #endif | ||
| 85 | |||
| 86 | #ifndef RGB_MATRIX_DEFAULT_SAT | ||
| 87 | # define RGB_MATRIX_DEFAULT_SAT UINT8_MAX | ||
| 88 | #endif | ||
| 89 | |||
| 90 | #ifndef RGB_MATRIX_DEFAULT_VAL | ||
| 91 | # define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS | ||
| 92 | #endif | ||
| 93 | |||
| 94 | #ifndef RGB_MATRIX_DEFAULT_SPD | ||
| 95 | # define RGB_MATRIX_DEFAULT_SPD UINT8_MAX / 2 | ||
| 96 | #endif | ||
| 97 | |||
| 49 | #ifndef RGB_MATRIX_LED_FLUSH_LIMIT | 98 | #ifndef RGB_MATRIX_LED_FLUSH_LIMIT |
| 50 | # define RGB_MATRIX_LED_FLUSH_LIMIT 16 | 99 | # define RGB_MATRIX_LED_FLUSH_LIMIT 16 |
| 51 | #endif | 100 | #endif |
diff --git a/quantum/via.c b/quantum/via.c index 2acd7aa90c..643d7aa3c3 100644 --- a/quantum/via.c +++ b/quantum/via.c | |||
| @@ -634,11 +634,6 @@ void via_qmk_rgblight_save(void) { | |||
| 634 | 634 | ||
| 635 | #if defined(RGB_MATRIX_ENABLE) | 635 | #if defined(RGB_MATRIX_ENABLE) |
| 636 | 636 | ||
| 637 | # if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX | ||
| 638 | # undef RGB_MATRIX_MAXIMUM_BRIGHTNESS | ||
| 639 | # define RGB_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX | ||
| 640 | # endif | ||
| 641 | |||
| 642 | void via_qmk_rgb_matrix_command(uint8_t *data, uint8_t length) { | 637 | void via_qmk_rgb_matrix_command(uint8_t *data, uint8_t length) { |
| 643 | // data = [ command_id, channel_id, value_id, value_data ] | 638 | // data = [ command_id, channel_id, value_id, value_data ] |
| 644 | uint8_t *command_id = &(data[0]); | 639 | uint8_t *command_id = &(data[0]); |
| @@ -727,11 +722,6 @@ void via_qmk_rgb_matrix_save(void) { | |||
| 727 | 722 | ||
| 728 | #if defined(LED_MATRIX_ENABLE) | 723 | #if defined(LED_MATRIX_ENABLE) |
| 729 | 724 | ||
| 730 | # if !defined(LED_MATRIX_MAXIMUM_BRIGHTNESS) || LED_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX | ||
| 731 | # undef LED_MATRIX_MAXIMUM_BRIGHTNESS | ||
| 732 | # define LED_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX | ||
| 733 | # endif | ||
| 734 | |||
| 735 | void via_qmk_led_matrix_command(uint8_t *data, uint8_t length) { | 725 | void via_qmk_led_matrix_command(uint8_t *data, uint8_t length) { |
| 736 | // data = [ command_id, channel_id, value_id, value_data ] | 726 | // data = [ command_id, channel_id, value_id, value_data ] |
| 737 | uint8_t *command_id = &(data[0]); | 727 | uint8_t *command_id = &(data[0]); |
