diff options
author | fauxpark <fauxpark@gmail.com> | 2020-02-08 13:50:42 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-07 18:50:42 -0800 |
commit | 3b1f29a5d6d171c7c659eb0d76fff806a52ac1cf (patch) | |
tree | be578e91697a3b0962cd35e58ee95afcec0ebd73 /keyboards/chidori/keymaps | |
parent | 707c04b4ab588967c803114d7d88ef3fdd934967 (diff) | |
download | qmk_firmware-3b1f29a5d6d171c7c659eb0d76fff806a52ac1cf.tar.gz |
[Keyboard] Misc tidyups for Chidori (#8091)
Diffstat (limited to 'keyboards/chidori/keymaps')
-rw-r--r-- | keyboards/chidori/keymaps/default/keymap.c | 16 | ||||
-rw-r--r-- | keyboards/chidori/keymaps/extended/keymap.c | 22 |
2 files changed, 11 insertions, 27 deletions
diff --git a/keyboards/chidori/keymaps/default/keymap.c b/keyboards/chidori/keymaps/default/keymap.c index 4aacdfb74..373b5ec83 100644 --- a/keyboards/chidori/keymaps/default/keymap.c +++ b/keyboards/chidori/keymaps/default/keymap.c @@ -162,15 +162,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void led_set_user(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - board_set_led_by_index(0, LED_YELLOW, true); - } else { - board_set_led_by_index(0, LED_YELLOW, false); - } - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - board_set_led_by_index(1, LED_YELLOW, true); - } else { - board_set_led_by_index(1, LED_YELLOW, false); - } +bool led_update_user(led_t led_state) { + board_set_led_by_index(0, LED_YELLOW, led_state.caps_lock); + board_set_led_by_index(1, LED_YELLOW, led_state.scroll_lock); + + return false; } diff --git a/keyboards/chidori/keymaps/extended/keymap.c b/keyboards/chidori/keymaps/extended/keymap.c index a5c9769f0..174e9ff2e 100644 --- a/keyboards/chidori/keymaps/extended/keymap.c +++ b/keyboards/chidori/keymaps/extended/keymap.c @@ -162,20 +162,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void led_set_user(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - board_set_led_by_index(0, LED_YELLOW, true); - } else { - board_set_led_by_index(0, LED_YELLOW, false); - } - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - board_set_led_by_index(1, LED_YELLOW, true); - } else { - board_set_led_by_index(1, LED_YELLOW, false); - } - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - board_set_led_by_index(2, LED_YELLOW, true); - } else { - board_set_led_by_index(2, LED_YELLOW, false); - } +bool led_update_user(led_t led_state) { + board_set_led_by_index(0, LED_YELLOW, led_state.caps_lock); + board_set_led_by_index(1, LED_YELLOW, led_state.scroll_lock); + board_set_led_by_index(2, LED_YELLOW, led_state.num_lock); + + return false; } |