aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/feature_rgb_matrix.md4
-rw-r--r--quantum/rgb_matrix.c21
2 files changed, 23 insertions, 2 deletions
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md
index 92fd62b32..23082ef2a 100644
--- a/docs/feature_rgb_matrix.md
+++ b/docs/feature_rgb_matrix.md
@@ -380,6 +380,10 @@ These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blo
380#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) 380#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
381#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 381#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
382#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set 382#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set
383#define RGB_MATRIX_STARTUP_HUE 0 // Sets the default hue value, if none has been set
384#define RGB_MATRIX_STARTUP_SAT 255 // Sets the default saturation value, if none has been set
385#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
386#define RGB_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set
383``` 387```
384 388
385## EEPROM storage 389## EEPROM storage
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c
index 9bbeff833..25ca44054 100644
--- a/quantum/rgb_matrix.c
+++ b/quantum/rgb_matrix.c
@@ -95,6 +95,23 @@ const point_t k_rgb_matrix_center = RGB_MATRIX_CENTER;
95# endif 95# endif
96#endif 96#endif
97 97
98#if !defined(RGB_MATRIX_STARTUP_HUE)
99# define RGB_MATRIX_STARTUP_HUE 0
100#endif
101
102#if !defined(RGB_MATRIX_STARTUP_SAT)
103# define RGB_MATRIX_STARTUP_SAT UINT8_MAX
104#endif
105
106#if !defined(RGB_MATRIX_STARTUP_VAL)
107# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
108#endif
109
110#if !defined(RGB_MATRIX_STARTUP_SPD)
111# define RGB_MATRIX_STARTUP_SPD UINT8_MAX / 2
112#endif
113
114
98bool g_suspend_state = false; 115bool g_suspend_state = false;
99 116
100rgb_config_t rgb_matrix_config; 117rgb_config_t rgb_matrix_config;
@@ -119,8 +136,8 @@ void eeconfig_update_rgb_matrix_default(void) {
119 dprintf("eeconfig_update_rgb_matrix_default\n"); 136 dprintf("eeconfig_update_rgb_matrix_default\n");
120 rgb_matrix_config.enable = 1; 137 rgb_matrix_config.enable = 1;
121 rgb_matrix_config.mode = RGB_MATRIX_STARTUP_MODE; 138 rgb_matrix_config.mode = RGB_MATRIX_STARTUP_MODE;
122 rgb_matrix_config.hsv = (HSV){0, UINT8_MAX, RGB_MATRIX_MAXIMUM_BRIGHTNESS}; 139 rgb_matrix_config.hsv = (HSV){RGB_MATRIX_STARTUP_HUE, RGB_MATRIX_STARTUP_SAT, RGB_MATRIX_STARTUP_VAL};
123 rgb_matrix_config.speed = UINT8_MAX / 2; 140 rgb_matrix_config.speed = RGB_MATRIX_STARTUP_SPD;
124 eeconfig_update_rgb_matrix(); 141 eeconfig_update_rgb_matrix();
125} 142}
126 143