diff options
Diffstat (limited to 'quantum')
-rw-r--r-- | quantum/led_matrix/led_matrix.c | 16 | ||||
-rw-r--r-- | quantum/led_matrix/led_matrix.h | 8 | ||||
-rw-r--r-- | quantum/rgb_matrix/rgb_matrix.c | 18 | ||||
-rw-r--r-- | quantum/rgb_matrix/rgb_matrix.h | 8 |
4 files changed, 32 insertions, 18 deletions
diff --git a/quantum/led_matrix/led_matrix.c b/quantum/led_matrix/led_matrix.c index c26b1ad19b..e215c2c2c3 100644 --- a/quantum/led_matrix/led_matrix.c +++ b/quantum/led_matrix/led_matrix.c @@ -385,9 +385,13 @@ void led_matrix_indicators(void) { led_matrix_indicators_user(); } -__attribute__((weak)) void led_matrix_indicators_kb(void) {} +__attribute__((weak)) bool led_matrix_indicators_kb(void) { + return led_matrix_indicators_user(); +} -__attribute__((weak)) void led_matrix_indicators_user(void) {} +__attribute__((weak)) bool led_matrix_indicators_user(void) { + return true; +} void led_matrix_indicators_advanced(effect_params_t *params) { /* special handling is needed for "params->iter", since it's already been incremented. @@ -407,9 +411,13 @@ void led_matrix_indicators_advanced(effect_params_t *params) { led_matrix_indicators_advanced_user(min, max); } -__attribute__((weak)) void led_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {} +__attribute__((weak)) bool led_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + return led_matrix_indicators_advanced_user(led_min, led_max); +} -__attribute__((weak)) void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {} +__attribute__((weak)) bool led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + return true; +} void led_matrix_init(void) { led_matrix_driver.init(); diff --git a/quantum/led_matrix/led_matrix.h b/quantum/led_matrix/led_matrix.h index db4f223d5b..c7d360f366 100644 --- a/quantum/led_matrix/led_matrix.h +++ b/quantum/led_matrix/led_matrix.h @@ -120,12 +120,12 @@ void led_matrix_task(void); // This runs after another backlight effect and replaces // values already set void led_matrix_indicators(void); -void led_matrix_indicators_kb(void); -void led_matrix_indicators_user(void); +bool led_matrix_indicators_kb(void); +bool led_matrix_indicators_user(void); void led_matrix_indicators_advanced(effect_params_t *params); -void led_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max); -void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max); +bool led_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max); +bool led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max); void led_matrix_init(void); diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c index 8b335c017d..539ca0e100 100644 --- a/quantum/rgb_matrix/rgb_matrix.c +++ b/quantum/rgb_matrix/rgb_matrix.c @@ -444,12 +444,15 @@ void rgb_matrix_task(void) { void rgb_matrix_indicators(void) { rgb_matrix_indicators_kb(); - rgb_matrix_indicators_user(); } -__attribute__((weak)) void rgb_matrix_indicators_kb(void) {} +__attribute__((weak)) bool rgb_matrix_indicators_kb(void) { + return rgb_matrix_indicators_user(); +} -__attribute__((weak)) void rgb_matrix_indicators_user(void) {} +__attribute__((weak)) bool rgb_matrix_indicators_user(void) { + return true; +} void rgb_matrix_indicators_advanced(effect_params_t *params) { /* special handling is needed for "params->iter", since it's already been incremented. @@ -466,12 +469,15 @@ void rgb_matrix_indicators_advanced(effect_params_t *params) { uint8_t max = RGB_MATRIX_LED_COUNT; #endif rgb_matrix_indicators_advanced_kb(min, max); - rgb_matrix_indicators_advanced_user(min, max); } -__attribute__((weak)) void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {} +__attribute__((weak)) bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + return rgb_matrix_indicators_advanced_user(led_min, led_max); +} -__attribute__((weak)) void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {} +__attribute__((weak)) bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + return true; +} void rgb_matrix_init(void) { rgb_matrix_driver.init(); diff --git a/quantum/rgb_matrix/rgb_matrix.h b/quantum/rgb_matrix/rgb_matrix.h index 0b35e98f45..1cd054abc4 100644 --- a/quantum/rgb_matrix/rgb_matrix.h +++ b/quantum/rgb_matrix/rgb_matrix.h @@ -129,12 +129,12 @@ void rgb_matrix_task(void); // This runs after another backlight effect and replaces // colors already set void rgb_matrix_indicators(void); -void rgb_matrix_indicators_kb(void); -void rgb_matrix_indicators_user(void); +bool rgb_matrix_indicators_kb(void); +bool rgb_matrix_indicators_user(void); void rgb_matrix_indicators_advanced(effect_params_t *params); -void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max); -void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max); +bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max); +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max); void rgb_matrix_init(void); |