summaryrefslogtreecommitdiffstats
path: root/keyboards/kc60/kc60.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/kc60/kc60.c')
-rw-r--r--keyboards/kc60/kc60.c21
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;
+}