Update keyboards/skyloong/gk75/q2/q2.c

OK. Thank you.

Co-authored-by: Drashna Jaelre <drashna@live.com>
This commit is contained in:
JIKEDINGZHI 2024-10-07 11:07:01 +08:00 committed by GitHub
parent dc0e71ca99
commit 004c5583bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -116,3 +116,18 @@ void board_init(void) {
AFIO->MAPR = (AFIO->MAPR & ~AFIO_MAPR_SWJ_CFG_Msk) | AFIO_MAPR_SWJ_CFG_DISABLE;
}
#if defined(RGB_MATRIX_ENABLE) /*&& defined(CAPS_LOCK_INDEX)*/
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;
}
if (host_keyboard_led_state().caps_lock) {
RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_INDEX, 255, 255, 255);
} else {
if (!rgb_matrix_get_flags()) {
RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_INDEX, 0, 0, 0);
}
}
return true;
};
#endif