summaryrefslogtreecommitdiff
path: root/keyboards/tkc
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/tkc')
-rw-r--r--keyboards/tkc/portico/config.h5
-rw-r--r--keyboards/tkc/portico/portico.c23
-rw-r--r--keyboards/tkc/portico68v2/config.h2
-rw-r--r--keyboards/tkc/portico68v2/portico68v2.c8
-rw-r--r--keyboards/tkc/portico75/config.h5
-rw-r--r--keyboards/tkc/portico75/portico75.c13
6 files changed, 27 insertions, 29 deletions
diff --git a/keyboards/tkc/portico/config.h b/keyboards/tkc/portico/config.h
index 0a52f2e3af..a0ad0c1652 100644
--- a/keyboards/tkc/portico/config.h
+++ b/keyboards/tkc/portico/config.h
@@ -33,7 +33,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define RGB_MATRIX_LED_PROCESS_LIMIT 4
# define RGB_MATRIX_LED_FLUSH_LIMIT 26
# define DEBOUNCE 3
-# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
@@ -58,12 +57,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define DRIVER_COUNT 2
# define DRIVER_1_LED_TOTAL 36
# define DRIVER_2_LED_TOTAL 31
-# 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)
#else
// IS31FL3731 driver
#define DRIVER_COUNT 2
-#define DRIVER_LED_TOTAL 67
+#define RGB_MATRIX_LED_COUNT 67
#define RGB_BACKLIGHT_ENABLED 1
diff --git a/keyboards/tkc/portico/portico.c b/keyboards/tkc/portico/portico.c
index 0e2b4b2499..e41de1c232 100644
--- a/keyboards/tkc/portico/portico.c
+++ b/keyboards/tkc/portico/portico.c
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
{ 0, C2_1, C3_1, C4_1 },
{ 0, C1_1, C3_2, C4_2 },
{ 0, C1_2, C2_2, C4_3 },
@@ -115,25 +115,20 @@ led_config_t g_led_config = {
}
};
-void suspend_power_down_kb(void) {
- rgb_matrix_set_suspend_state(true);
- suspend_power_down_user();
-}
-
-void suspend_wakeup_init_kb(void) {
- rgb_matrix_set_suspend_state(false);
- suspend_wakeup_init_user();
-}
-
-void rgb_matrix_indicators_kb(void) {
+bool rgb_matrix_indicators_kb(void) {
+ if (!rgb_matrix_indicators_user()) {
+ return false;
+ }
if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF);
}
- else {
+ else {
rgb_matrix_set_color(30, 0x00, 0x00, 0x00);
}
if (!rgb_matrix_is_enabled()) {
rgb_matrix_driver.flush();
}
+ return true;
}
-#endif \ No newline at end of file
+#endif
+
diff --git a/keyboards/tkc/portico68v2/config.h b/keyboards/tkc/portico68v2/config.h
index 5cfdf43c3d..4b6d5a2ef6 100644
--- a/keyboards/tkc/portico68v2/config.h
+++ b/keyboards/tkc/portico68v2/config.h
@@ -35,7 +35,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DRIVER_ADDR_1 0b0110000
#define DRIVER_COUNT 1
#define DRIVER_1_LED_TOTAL 82
-#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
#define DRIVER_INDICATOR_LED_TOTAL 0
#define RGB_MATRIX_CENTER { 116, 32 }
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 175
diff --git a/keyboards/tkc/portico68v2/portico68v2.c b/keyboards/tkc/portico68v2/portico68v2.c
index 8e98034ca5..32c8f50894 100644
--- a/keyboards/tkc/portico68v2/portico68v2.c
+++ b/keyboards/tkc/portico68v2/portico68v2.c
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "portico68v2.h"
#ifdef RGB_MATRIX_ENABLE
-const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led g_is31_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS18_SW1, CS17_SW1, CS16_SW1}, /* RGB1 */
{0, CS18_SW2, CS17_SW2, CS16_SW2}, /* RGB2 */
{0, CS18_SW3, CS17_SW3, CS16_SW3}, /* RGB3 */
@@ -128,7 +128,10 @@ led_config_t g_led_config = {
}
};
-void rgb_matrix_indicators_kb(void) {
+bool rgb_matrix_indicators_kb(void) {
+ if (!rgb_matrix_indicators_user()) {
+ return false;
+ }
if (host_keyboard_led_state().caps_lock) {
for (uint8_t i = 0; i < DRIVER_1_LED_TOTAL; i++) {
rgb_matrix_set_color(i, 0xFF, 0xFF, 0xFF);
@@ -141,5 +144,6 @@ void rgb_matrix_indicators_kb(void) {
}
}
}
+ return true;
}
#endif
diff --git a/keyboards/tkc/portico75/config.h b/keyboards/tkc/portico75/config.h
index 63a9ee4958..36bd7b3ed5 100644
--- a/keyboards/tkc/portico75/config.h
+++ b/keyboards/tkc/portico75/config.h
@@ -44,7 +44,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define RGB_MATRIX_LED_PROCESS_LIMIT 4
# define RGB_MATRIX_LED_FLUSH_LIMIT 26
# define DEBOUNCE 3
-# define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
# define RGB_MATRIX_KEYPRESSES
@@ -100,12 +99,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define DRIVER_ADDR_1 0b0110000
# define DRIVER_COUNT 1
# define DRIVER_1_LED_TOTAL 98
-# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+# define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
# define DRIVER_INDICATOR_LED_TOTAL 0
#else
// WT_RGB IS31FL3741 driver code
# define DRIVER_COUNT 1
-# define DRIVER_LED_TOTAL 98
+# define RGB_MATRIX_LED_COUNT 98
# define RGB_BACKLIGHT_ENABLED 1
diff --git a/keyboards/tkc/portico75/portico75.c b/keyboards/tkc/portico75/portico75.c
index 812345b384..299af2f305 100644
--- a/keyboards/tkc/portico75/portico75.c
+++ b/keyboards/tkc/portico75/portico75.c
@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef RGB_MATRIX_ENABLE
-const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = {
+const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = {
{0, CS18_SW1, CS17_SW1, CS16_SW1},
{0, CS18_SW2, CS17_SW2, CS16_SW2},
{0, CS18_SW3, CS17_SW3, CS16_SW3},
@@ -161,13 +161,14 @@ led_config_t g_led_config = { {
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
} };
-__attribute__ ((weak))
-void rgb_matrix_indicators_user(void)
-{
- if (host_keyboard_led_state().caps_lock)
- {
+bool rgb_matrix_indicators_kb(void) {
+ if (!rgb_matrix_indicators_user()) {
+ return false;
+ }
+ if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color(45, 0xFF, 0xFF, 0xFF);
}
+ return true;
}
#endif