diff options
Diffstat (limited to 'quantum')
-rw-r--r-- | quantum/backlight/backlight.c | 21 | ||||
-rw-r--r-- | quantum/led_matrix/led_matrix.c | 2 | ||||
-rw-r--r-- | quantum/led_matrix/led_matrix.h | 4 | ||||
-rw-r--r-- | quantum/rgb_matrix/rgb_matrix.c | 2 | ||||
-rw-r--r-- | quantum/rgb_matrix/rgb_matrix.h | 4 |
5 files changed, 24 insertions, 9 deletions
diff --git a/quantum/backlight/backlight.c b/quantum/backlight/backlight.c index 9d9f944f5d..e89b34696c 100644 --- a/quantum/backlight/backlight.c +++ b/quantum/backlight/backlight.c @@ -22,10 +22,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. backlight_config_t backlight_config; +#ifndef BACKLIGHT_DEFAULT_ON +# define BACKLIGHT_DEFAULT_ON true +#endif + #ifndef BACKLIGHT_DEFAULT_LEVEL # define BACKLIGHT_DEFAULT_LEVEL BACKLIGHT_LEVELS #endif +#ifndef BACKLIGHT_DEFAULT_BREATHING +# define BACKLIGHT_DEFAULT_BREATHING false +#else +# undef BACKLIGHT_DEFAULT_BREATHING +# define BACKLIGHT_DEFAULT_BREATHING true +#endif + #ifdef BACKLIGHT_BREATHING // TODO: migrate to backlight_config_t static uint8_t breathing_period = BREATHING_PERIOD; @@ -172,13 +183,9 @@ void eeconfig_update_backlight_current(void) { } void eeconfig_update_backlight_default(void) { - backlight_config.enable = 1; -#ifdef BACKLIGHT_DEFAULT_BREATHING - backlight_config.breathing = 1; -#else - backlight_config.breathing = 0; -#endif - backlight_config.level = BACKLIGHT_DEFAULT_LEVEL; + backlight_config.enable = BACKLIGHT_DEFAULT_ON; + backlight_config.breathing = BACKLIGHT_DEFAULT_BREATHING; + backlight_config.level = BACKLIGHT_DEFAULT_LEVEL; eeconfig_update_backlight(backlight_config.raw); } diff --git a/quantum/led_matrix/led_matrix.c b/quantum/led_matrix/led_matrix.c index a59d475521..c13ca94077 100644 --- a/quantum/led_matrix/led_matrix.c +++ b/quantum/led_matrix/led_matrix.c @@ -97,7 +97,7 @@ void eeconfig_update_led_matrix(void) { void eeconfig_update_led_matrix_default(void) { dprintf("eeconfig_update_led_matrix_default\n"); - led_matrix_eeconfig.enable = 1; + led_matrix_eeconfig.enable = LED_MATRIX_DEFAULT_ON; led_matrix_eeconfig.mode = LED_MATRIX_DEFAULT_MODE; led_matrix_eeconfig.val = LED_MATRIX_DEFAULT_VAL; led_matrix_eeconfig.speed = LED_MATRIX_DEFAULT_SPD; diff --git a/quantum/led_matrix/led_matrix.h b/quantum/led_matrix/led_matrix.h index 771afc47ec..316585b1fe 100644 --- a/quantum/led_matrix/led_matrix.h +++ b/quantum/led_matrix/led_matrix.h @@ -59,6 +59,10 @@ # define LED_MATRIX_SPD_STEP 16 #endif +#ifndef LED_MATRIX_DEFAULT_ON +# define LED_MATRIX_DEFAULT_ON true +#endif + #ifndef LED_MATRIX_DEFAULT_MODE # define LED_MATRIX_DEFAULT_MODE LED_MATRIX_SOLID #endif diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c index ff3e5b2b35..8e69616a0e 100644 --- a/quantum/rgb_matrix/rgb_matrix.c +++ b/quantum/rgb_matrix/rgb_matrix.c @@ -99,7 +99,7 @@ void eeconfig_update_rgb_matrix(void) { void eeconfig_update_rgb_matrix_default(void) { dprintf("eeconfig_update_rgb_matrix_default\n"); - rgb_matrix_config.enable = 1; + rgb_matrix_config.enable = RGB_MATRIX_DEFAULT_ON; rgb_matrix_config.mode = RGB_MATRIX_DEFAULT_MODE; rgb_matrix_config.hsv = (HSV){RGB_MATRIX_DEFAULT_HUE, RGB_MATRIX_DEFAULT_SAT, RGB_MATRIX_DEFAULT_VAL}; rgb_matrix_config.speed = RGB_MATRIX_DEFAULT_SPD; diff --git a/quantum/rgb_matrix/rgb_matrix.h b/quantum/rgb_matrix/rgb_matrix.h index 025a1f4700..3e1db3cdce 100644 --- a/quantum/rgb_matrix/rgb_matrix.h +++ b/quantum/rgb_matrix/rgb_matrix.h @@ -70,6 +70,10 @@ # define RGB_MATRIX_SPD_STEP 16 #endif +#ifndef RGB_MATRIX_DEFAULT_ON +# define RGB_MATRIX_DEFAULT_ON true +#endif + #ifndef RGB_MATRIX_DEFAULT_MODE # ifdef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT # define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT |