aboutsummaryrefslogtreecommitdiff
path: root/keyboards/e6v2/le/le.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/e6v2/le/le.c')
-rw-r--r--keyboards/e6v2/le/le.c27
1 files changed, 8 insertions, 19 deletions
diff --git a/keyboards/e6v2/le/le.c b/keyboards/e6v2/le/le.c
index b99a57bca..f27bdc113 100644
--- a/keyboards/e6v2/le/le.c
+++ b/keyboards/e6v2/le/le.c
@@ -21,24 +21,13 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
21 return process_record_user(keycode, record); 21 return process_record_user(keycode, record);
22} 22}
23 23
24void led_set_kb(uint8_t usb_led) { 24void led_set_user(uint8_t usb_led) {
25 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here 25 if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
26 DDRB |= (1<<7); 26 DDRB |= (1 << 7);
27 if (usb_led & (1<<USB_LED_CAPS_LOCK)) { 27 PORTB &= ~(1 << 7);
28 // output low 28 } else {
29 DDRB |= (1<<2); 29 DDRB &= ~(1 << 7);
30 PORTB &= ~(1<<2); 30 PORTB &= ~(1 << 7);
31 } else {
32 // Hi-Z
33 DDRB &= ~(1<<2);
34 PORTB &= ~(1<<2);
35 }
36 if (usb_led == 0){
37 PORTB |= (1<<7);
38 } 31 }
39 else{
40 PORTB &= ~(1<<7);
41 }
42
43 led_set_user(usb_led);
44} 32}
33