summaryrefslogtreecommitdiff
path: root/quantum/led_matrix
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2022-10-04 15:24:22 -0700
committerGitHub <noreply@github.com>2022-10-04 15:24:22 -0700
commit64b1ed45507a15d5594b1f90b936c2096918f5a4 (patch)
tree8824b1d4f55797d7608d3111a2755e919040e834 /quantum/led_matrix
parent09d3e2771099ff1ca7e7bd8882644eb2b2807763 (diff)
Fix Per Key LED Indicator Callbacks (#18450)
Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com> Co-authored-by: Nick Brassel <nick@tzarc.org>
Diffstat (limited to 'quantum/led_matrix')
-rw-r--r--quantum/led_matrix/led_matrix.c16
-rw-r--r--quantum/led_matrix/led_matrix.h8
2 files changed, 16 insertions, 8 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);