summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorRob Haswell <me@robhaswell.co.uk>2020-01-18 20:11:33 +0000
committerJoel Challis <git@zvecr.com>2020-01-18 20:11:33 +0000
commita1452db98abc2a95bac30a5f36d514748cc9851d (patch)
tree52bed81b055a6f2bba91bcbc34db2af9a619b0dc /quantum
parent9b9a0f0bcb791e3652627a642f19f7cebd30955d (diff)
downloadqmk_firmware-a1452db98abc2a95bac30a5f36d514748cc9851d.tar.gz
qmk_firmware-a1452db98abc2a95bac30a5f36d514748cc9851d.zip
Configuration values for starting HSV and speed (#7740)
* Define default HSV and speed for RGB matrix. * Documentation for configuration values RGB_MATRIX_STARTUP_HUE, RGB_MATRIX_STARTUP_SAT and RGB_MATRIX_STARTUP_VAL. * Document RGB_MATRIX_STARTUP_SPD. * Preserve the ordering.
Diffstat (limited to 'quantum')
-rw-r--r--quantum/rgb_matrix.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c
index 9bbeff8332..25ca44054d 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;
# endif
#endif
+#if !defined(RGB_MATRIX_STARTUP_HUE)
+# define RGB_MATRIX_STARTUP_HUE 0
+#endif
+
+#if !defined(RGB_MATRIX_STARTUP_SAT)
+# define RGB_MATRIX_STARTUP_SAT UINT8_MAX
+#endif
+
+#if !defined(RGB_MATRIX_STARTUP_VAL)
+# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
+#endif
+
+#if !defined(RGB_MATRIX_STARTUP_SPD)
+# define RGB_MATRIX_STARTUP_SPD UINT8_MAX / 2
+#endif
+
+
bool g_suspend_state = false;
rgb_config_t rgb_matrix_config;
@@ -119,8 +136,8 @@ void eeconfig_update_rgb_matrix_default(void) {
dprintf("eeconfig_update_rgb_matrix_default\n");
rgb_matrix_config.enable = 1;
rgb_matrix_config.mode = RGB_MATRIX_STARTUP_MODE;
- rgb_matrix_config.hsv = (HSV){0, UINT8_MAX, RGB_MATRIX_MAXIMUM_BRIGHTNESS};
- rgb_matrix_config.speed = UINT8_MAX / 2;
+ rgb_matrix_config.hsv = (HSV){RGB_MATRIX_STARTUP_HUE, RGB_MATRIX_STARTUP_SAT, RGB_MATRIX_STARTUP_VAL};
+ rgb_matrix_config.speed = RGB_MATRIX_STARTUP_SPD;
eeconfig_update_rgb_matrix();
}