diff options
author | Ryan <fauxpark@gmail.com> | 2020-11-03 11:55:22 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-02 16:55:22 -0800 |
commit | c60cafae419f8fe409f9cdb3274bbf6d02973f7c (patch) | |
tree | 4836ddffa2ab16a14784bce601c5bf2a23f60df3 /keyboards/kc60/kc60.c | |
parent | 38162af5a70ced55f74019b75ed1e2f1e03ff62e (diff) |
KC60 refactor (#10834)
Diffstat (limited to 'keyboards/kc60/kc60.c')
-rw-r--r-- | keyboards/kc60/kc60.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/keyboards/kc60/kc60.c b/keyboards/kc60/kc60.c index 09b924b286..52059a8c40 100644 --- a/keyboards/kc60/kc60.c +++ b/keyboards/kc60/kc60.c @@ -1,16 +1,13 @@ #include "kc60.h" -void led_set_kb(uint8_t usb_led) -{ - if (usb_led & (1<<USB_LED_CAPS_LOCK)) { - // output low - DDRB |= (1<<2); - PORTB &= ~(1<<2); - } else { - // Hi-Z - DDRB &= ~(1<<2); - PORTB &= ~(1<<2); +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + if (led_state.caps_lock) { + setPinOutput(B2); + } else { + setPinInput(B2); + } } - led_set_user(usb_led); -}
\ No newline at end of file + return true; +} |