summaryrefslogtreecommitdiffstats
path: root/keyboards/keychron
diff options
context:
space:
mode:
authorjack <0x6A73@pm.me>2022-11-13 15:49:06 -0700
committerGitHub <noreply@github.com>2022-11-14 09:49:06 +1100
commit7901ba431a4a6248aeb4b16c570e96ce44e56a42 (patch)
treef6889f070e70d60b43fdda6eb4a9a8abf2f8cbcf /keyboards/keychron
parenta30964b3c5680a92154a9fe682a1d85e3ccd700e (diff)
Fixup keychron/q6 (#19066)
Diffstat (limited to 'keyboards/keychron')
-rw-r--r--keyboards/keychron/q6/ansi/ansi.c2
-rw-r--r--keyboards/keychron/q6/ansi/config.h2
-rw-r--r--keyboards/keychron/q6/ansi_encoder/ansi_encoder.c2
-rw-r--r--keyboards/keychron/q6/ansi_encoder/config.h2
-rw-r--r--keyboards/keychron/q6/iso/config.h2
-rw-r--r--keyboards/keychron/q6/iso/iso.c2
-rw-r--r--keyboards/keychron/q6/iso_encoder/config.h2
-rw-r--r--keyboards/keychron/q6/iso_encoder/iso_encoder.c2
-rw-r--r--keyboards/keychron/q6/q6.c6
9 files changed, 13 insertions, 9 deletions
diff --git a/keyboards/keychron/q6/ansi/ansi.c b/keyboards/keychron/q6/ansi/ansi.c
index dc27c9a82d..982996d347 100644
--- a/keyboards/keychron/q6/ansi/ansi.c
+++ b/keyboards/keychron/q6/ansi/ansi.c
@@ -20,7 +20,7 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = {
+const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/keychron/q6/ansi/config.h b/keyboards/keychron/q6/ansi/config.h
index 148f8d4c45..703da35636 100644
--- a/keyboards/keychron/q6/ansi/config.h
+++ b/keyboards/keychron/q6/ansi/config.h
@@ -27,7 +27,7 @@
/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 60
#define DRIVER_2_LED_TOTAL 48
-#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
/* Enable caps-lock LED*/
#define CAPS_LOCK_LED_INDEX 61
diff --git a/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c
index bb1044bd09..6cf593dd25 100644
--- a/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c
+++ b/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c
@@ -20,7 +20,7 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = {
+const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/keychron/q6/ansi_encoder/config.h b/keyboards/keychron/q6/ansi_encoder/config.h
index 31d801430f..1949be399b 100644
--- a/keyboards/keychron/q6/ansi_encoder/config.h
+++ b/keyboards/keychron/q6/ansi_encoder/config.h
@@ -28,7 +28,7 @@
/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 60
#define DRIVER_2_LED_TOTAL 48
-#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
/* Encoder Configuration */
#define ENCODERS_PAD_A { C14 }
diff --git a/keyboards/keychron/q6/iso/config.h b/keyboards/keychron/q6/iso/config.h
index 3c1164be6d..46c9e1c33a 100644
--- a/keyboards/keychron/q6/iso/config.h
+++ b/keyboards/keychron/q6/iso/config.h
@@ -27,7 +27,7 @@
/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 60
#define DRIVER_2_LED_TOTAL 49
-#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
/* Enable caps-lock LED*/
#define CAPS_LOCK_LED_INDEX 60
diff --git a/keyboards/keychron/q6/iso/iso.c b/keyboards/keychron/q6/iso/iso.c
index 497efc2d11..d8c4add867 100644
--- a/keyboards/keychron/q6/iso/iso.c
+++ b/keyboards/keychron/q6/iso/iso.c
@@ -20,7 +20,7 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = {
+const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/keychron/q6/iso_encoder/config.h b/keyboards/keychron/q6/iso_encoder/config.h
index 442fd35efd..63fe3a83c1 100644
--- a/keyboards/keychron/q6/iso_encoder/config.h
+++ b/keyboards/keychron/q6/iso_encoder/config.h
@@ -28,7 +28,7 @@
/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 60
#define DRIVER_2_LED_TOTAL 49
-#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
+#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
/* Encoder Configuration */
#define ENCODERS_PAD_A { C14 }
diff --git a/keyboards/keychron/q6/iso_encoder/iso_encoder.c b/keyboards/keychron/q6/iso_encoder/iso_encoder.c
index 3ad47b7b0f..c6a21a6223 100644
--- a/keyboards/keychron/q6/iso_encoder/iso_encoder.c
+++ b/keyboards/keychron/q6/iso_encoder/iso_encoder.c
@@ -20,7 +20,7 @@
// clang-format off
-const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = {
+const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
diff --git a/keyboards/keychron/q6/q6.c b/keyboards/keychron/q6/q6.c
index 85018004e0..d2f9d2aa4e 100644
--- a/keyboards/keychron/q6/q6.c
+++ b/keyboards/keychron/q6/q6.c
@@ -67,7 +67,10 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return true;
}
-__attribute__((weak)) 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) {
+ if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) {
+ return false;
+ }
// RGB_MATRIX_INDICATOR_SET_COLOR(index, red, green, blue);
# if defined(CAPS_LOCK_LED_INDEX)
if (host_keyboard_led_state().caps_lock) {
@@ -87,6 +90,7 @@ __attribute__((weak)) void rgb_matrix_indicators_advanced_user(uint8_t led_min,
}
}
# endif // NUM_LOCK_LED_INDEX
+ return true;
}
#endif // RGB_MATRIX_ENABLE...