summaryrefslogtreecommitdiff
path: root/keyboards/helix/rev2/keymaps/edvorakjp
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/helix/rev2/keymaps/edvorakjp')
-rw-r--r--keyboards/helix/rev2/keymaps/edvorakjp/oled.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/oled.c b/keyboards/helix/rev2/keymaps/edvorakjp/oled.c
index 14e3e5533b..38a91c1639 100644
--- a/keyboards/helix/rev2/keymaps/edvorakjp/oled.c
+++ b/keyboards/helix/rev2/keymaps/edvorakjp/oled.c
@@ -5,13 +5,9 @@
#ifdef OLED_ENABLE
void render_host_led_state(void) {
char led_state_str[24];
- uint8_t leds = host_keyboard_leds();
+ led_t led_state = host_keyboard_led_state();
- bool is_num_lock_enabled = leds & (1 << USB_LED_NUM_LOCK);
- bool is_caps_lock_enabled = leds & (1 << USB_LED_CAPS_LOCK);
- bool is_scroll_lock_enabled = leds & (1 << USB_LED_SCROLL_LOCK);
-
- snprintf(led_state_str, sizeof(led_state_str), "NL:%s CL:%s SL:%s", is_num_lock_enabled ? "on" : "- ", is_caps_lock_enabled ? "on" : "- ", is_scroll_lock_enabled ? "on" : "- ");
+ snprintf(led_state_str, sizeof(led_state_str), "NL:%s CL:%s SL:%s", led_state.num_lock ? "on" : "- ", led_state.caps_lock ? "on" : "- ", led_state.scroll_lock ? "on" : "- ");
oled_write(led_state_str, false);
}