aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author50an6xy06r6n <garethenator@gmail.com>2021-08-17 11:44:19 -0700
committerGitHub <noreply@github.com>2021-08-18 04:44:19 +1000
commit4b96d5876eb01dfd8063949a2e5cb4b70e01786d (patch)
tree5aa9e013acb1b0b4ef58528de3388eb5b7a5f28c
parent37496f4b6047248c25195e13e0f90593dc492fff (diff)
downloadqmk_firmware-4b96d5876eb01dfd8063949a2e5cb4b70e01786d.tar.gz
qmk_firmware-4b96d5876eb01dfd8063949a2e5cb4b70e01786d.zip
Fix Indicator LED issues (#12097)
-rw-r--r--keyboards/massdrop/ctrl/config_led.c5
-rw-r--r--tmk_core/protocol/arm_atsam/md_rgb_matrix.c4
-rw-r--r--tmk_core/protocol/arm_atsam/md_rgb_matrix.h2
3 files changed, 5 insertions, 6 deletions
diff --git a/keyboards/massdrop/ctrl/config_led.c b/keyboards/massdrop/ctrl/config_led.c
index 27ddb5c38..bd708c2cb 100644
--- a/keyboards/massdrop/ctrl/config_led.c
+++ b/keyboards/massdrop/ctrl/config_led.c
@@ -73,9 +73,8 @@ led_config_t g_led_config = { {
73 73
74 74
75#ifdef USB_LED_INDICATOR_ENABLE 75#ifdef USB_LED_INDICATOR_ENABLE
76void rgb_matrix_indicators_kb(void) 76void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {
77{ 77 md_rgb_matrix_indicators_advanced(led_min, led_max);
78 md_rgb_matrix_indicators();
79} 78}
80#endif // USB_LED_INDICATOR_ENABLE 79#endif // USB_LED_INDICATOR_ENABLE
81 80
diff --git a/tmk_core/protocol/arm_atsam/md_rgb_matrix.c b/tmk_core/protocol/arm_atsam/md_rgb_matrix.c
index 609ae047e..98967aac8 100644
--- a/tmk_core/protocol/arm_atsam/md_rgb_matrix.c
+++ b/tmk_core/protocol/arm_atsam/md_rgb_matrix.c
@@ -291,10 +291,10 @@ static void flush(void) {
291 i2c_led_q_run(); 291 i2c_led_q_run();
292} 292}
293 293
294void md_rgb_matrix_indicators(void) { 294void md_rgb_matrix_indicators_advanced(uint8_t led_min, uint8_t led_max) {
295 uint8_t kbled = keyboard_leds(); 295 uint8_t kbled = keyboard_leds();
296 if (kbled && rgb_matrix_config.enable) { 296 if (kbled && rgb_matrix_config.enable) {
297 for (uint8_t i = 0; i < ISSI3733_LED_COUNT; i++) { 297 for (uint8_t i = led_min; i < led_max; i++) {
298 if ( 298 if (
299# if USB_LED_NUM_LOCK_SCANCODE != 255 299# if USB_LED_NUM_LOCK_SCANCODE != 255
300 (led_map[i].scan == USB_LED_NUM_LOCK_SCANCODE && (kbled & (1 << USB_LED_NUM_LOCK))) || 300 (led_map[i].scan == USB_LED_NUM_LOCK_SCANCODE && (kbled & (1 << USB_LED_NUM_LOCK))) ||
diff --git a/tmk_core/protocol/arm_atsam/md_rgb_matrix.h b/tmk_core/protocol/arm_atsam/md_rgb_matrix.h
index 322b0f99d..76ccaa678 100644
--- a/tmk_core/protocol/arm_atsam/md_rgb_matrix.h
+++ b/tmk_core/protocol/arm_atsam/md_rgb_matrix.h
@@ -86,7 +86,7 @@ extern uint8_t gcr_actual_last;
86 86
87void gcr_compute(void); 87void gcr_compute(void);
88 88
89void md_rgb_matrix_indicators(void); 89void md_rgb_matrix_indicators_advanced(uint8_t led_min, uint8_t led_max);
90 90
91/*------------------------- Legacy Lighting Support ------------------------*/ 91/*------------------------- Legacy Lighting Support ------------------------*/
92 92