From 87b11345a55d076966846d87b60d0f315b8bb984 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 6 Jul 2023 18:48:02 +1000 Subject: Get rid of `USB_LED_CAPS_LOCK` (#21436) --- layouts/community/ortho_4x12/brandonschlack/keymap.c | 5 +++-- layouts/community/ortho_4x12/drashna/keymap.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'layouts/community/ortho_4x12') diff --git a/layouts/community/ortho_4x12/brandonschlack/keymap.c b/layouts/community/ortho_4x12/brandonschlack/keymap.c index 7361de1a03..04c83de9e9 100644 --- a/layouts/community/ortho_4x12/brandonschlack/keymap.c +++ b/layouts/community/ortho_4x12/brandonschlack/keymap.c @@ -100,12 +100,13 @@ void keyboard_post_init_keymap(void) { } // Use Green LED for Caps Lock -void led_set_user(uint8_t usb_led) { - if (IS_LED_OFF(usb_led, USB_LED_CAPS_LOCK)) { +bool led_update_user(led_t led_state) { + if (led_state.caps_lock) { writePinLow(LED_GREEN); } else { writePinHigh(LED_GREEN); } + return false; } #endif diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index 475ccc5c3a..cdf41fc5dc 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c @@ -184,7 +184,7 @@ led_config_t g_led_config = { bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) { uint8_t this_mod = get_mods(); - uint8_t this_led = host_keyboard_leds(); + led_t this_led = host_keyboard_led_state(); uint8_t this_osm = get_oneshot_mods(); # ifdef KEYBOARD_planck_ez # define THUMB_LED 41 @@ -208,7 +208,7 @@ bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) { break; } - if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) { + if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led.caps_lock) { if (!layer_state_cmp(layer_state, _ADJUST)) { RGB_MATRIX_INDICATOR_SET_COLOR(24, 0x00, 0xFF, 0x00); } -- cgit v1.2.3