summaryrefslogtreecommitdiff
path: root/quantum/rgb_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/rgb_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/rgb_matrix')
-rw-r--r--quantum/rgb_matrix/rgb_matrix.c18
-rw-r--r--quantum/rgb_matrix/rgb_matrix.h8
2 files changed, 16 insertions, 10 deletions
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);