summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-07-06 18:48:02 +1000
committerGitHub <noreply@github.com>2023-07-06 09:48:02 +0100
commit87b11345a55d076966846d87b60d0f315b8bb984 (patch)
treea64503358d5f30b55a722b882eebaf1b60b03e1f /users
parent928e03e8d669cb35a96c2aa4a09012c527b27892 (diff)
Get rid of `USB_LED_CAPS_LOCK` (#21436)
Diffstat (limited to 'users')
-rw-r--r--users/curry/rgb_lighting_user.c6
-rw-r--r--users/turbomech/backupturbomech.c5
2 files changed, 6 insertions, 5 deletions
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<<USB_LED_CAPS_LOCK)) {
+bool led_update_user(led_t led_state) {
+ if (led_state.caps_lock) {
is_capslocked = true;
// DDRB |= (1 << 2); PORTB &= ~(1 << 2);
} else {
is_capslocked = false;
// DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
}
+ return false;
}
//rgblight_set();