diff options
Diffstat (limited to 'keyboards/maartenwut/wasdat/wasdat.c')
-rw-r--r-- | keyboards/maartenwut/wasdat/wasdat.c | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/keyboards/maartenwut/wasdat/wasdat.c b/keyboards/maartenwut/wasdat/wasdat.c index 11338634d..99dd97dcf 100644 --- a/keyboards/maartenwut/wasdat/wasdat.c +++ b/keyboards/maartenwut/wasdat/wasdat.c | |||
@@ -33,26 +33,12 @@ void led_init_ports(void) { | |||
33 | setPinOutput(B2); | 33 | setPinOutput(B2); |
34 | } | 34 | } |
35 | 35 | ||
36 | void led_set_kb(uint8_t usb_led) { | 36 | bool led_update_kb(led_t led_state) { |
37 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | 37 | if(led_update_user(led_state)) { |
38 | 38 | writePin(B0, !led_state.caps_lock); | |
39 | if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { | 39 | writePin(B1, !led_state.scroll_lock); |
40 | writePinLow(B0); | 40 | writePin(B2, !led_state.num_lock); |
41 | } else { | ||
42 | writePinHigh(B0); | ||
43 | } | ||
44 | |||
45 | if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { | ||
46 | writePinLow(B1); | ||
47 | } else { | ||
48 | writePinHigh(B1); | ||
49 | } | ||
50 | |||
51 | if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { | ||
52 | writePinLow(B2); | ||
53 | } else { | ||
54 | writePinHigh(B2); | ||
55 | } | 41 | } |
56 | 42 | ||
57 | led_set_user(usb_led); | 43 | return true; |
58 | } | 44 | } |