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) --- users/curry/rgb_lighting_user.c | 6 +++--- users/turbomech/backupturbomech.c | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'users') diff --git a/users/curry/rgb_lighting_user.c b/users/curry/rgb_lighting_user.c index b8d519feca..34156744fe 100644 --- a/users/curry/rgb_lighting_user.c +++ b/users/curry/rgb_lighting_user.c @@ -11,9 +11,9 @@ void rgblight_sethsv_default_helper(uint8_t index) { rgblight_sethsv_at(rgblight * This is especially useful for One Shot Mods, since it's not always obvious if they're still lit up. */ #if defined(INDICATOR_LIGHTS) -void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) { +void set_rgb_indicators(uint8_t this_mod, led_t this_led, uint8_t this_osm) { if (userspace_config.rgb_layer_change && get_highest_layer(layer_state) == 0) { - 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) { # ifdef SHFT_LED1 rgblight_sethsv_at(120, 255, 255, SHFT_LED1); # endif // SHFT_LED1 @@ -79,7 +79,7 @@ void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) { /* Function for the indicators */ void matrix_scan_indicator(void) { if (has_initialized) { - set_rgb_indicators(get_mods(), host_keyboard_leds(), get_oneshot_mods()); + set_rgb_indicators(get_mods(), host_keyboard_led_state(), get_oneshot_mods()); } } #endif // INDICATOR_LIGHTS diff --git a/users/turbomech/backupturbomech.c b/users/turbomech/backupturbomech.c index 3671d27ab4..70d3d065c4 100644 --- a/users/turbomech/backupturbomech.c +++ b/users/turbomech/backupturbomech.c @@ -135,14 +135,15 @@ void matrix_init_user(void) { } static bool is_capslocked = false; -void led_set_user(uint8_t usb_led) { - if (usb_led & (1<