diff options
author | Drashna Jaelre <drashna@live.com> | 2022-10-04 15:24:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-04 15:24:22 -0700 |
commit | 64b1ed45507a15d5594b1f90b936c2096918f5a4 (patch) | |
tree | 8824b1d4f55797d7608d3111a2755e919040e834 /keyboards/tkc | |
parent | 09d3e2771099ff1ca7e7bd8882644eb2b2807763 (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 'keyboards/tkc')
-rw-r--r-- | keyboards/tkc/portico/portico.c | 21 | ||||
-rw-r--r-- | keyboards/tkc/portico68v2/portico68v2.c | 6 | ||||
-rw-r--r-- | keyboards/tkc/portico75/portico75.c | 11 |
3 files changed, 19 insertions, 19 deletions
diff --git a/keyboards/tkc/portico/portico.c b/keyboards/tkc/portico/portico.c index 47dfe88231..e41de1c232 100644 --- a/keyboards/tkc/portico/portico.c +++ b/keyboards/tkc/portico/portico.c @@ -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/portico68v2.c b/keyboards/tkc/portico68v2/portico68v2.c index 6022d5674f..32c8f50894 100644 --- a/keyboards/tkc/portico68v2/portico68v2.c +++ b/keyboards/tkc/portico68v2/portico68v2.c @@ -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/portico75.c b/keyboards/tkc/portico75/portico75.c index 30fafa2dfc..299af2f305 100644 --- a/keyboards/tkc/portico75/portico75.c +++ b/keyboards/tkc/portico75/portico75.c @@ -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 |