summaryrefslogtreecommitdiff
path: root/keyboards/exclusive
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/exclusive')
-rw-r--r--keyboards/exclusive/e6v2/oe/oe.c41
1 files changed, 12 insertions, 29 deletions
diff --git a/keyboards/exclusive/e6v2/oe/oe.c b/keyboards/exclusive/e6v2/oe/oe.c
index 3c6627894f..2570bc101a 100644
--- a/keyboards/exclusive/e6v2/oe/oe.c
+++ b/keyboards/exclusive/e6v2/oe/oe.c
@@ -1,32 +1,15 @@
#include "oe.h"
-void led_set_kb(uint8_t usb_led) {
- // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
- DDRB |= (1<<6);
- 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);
- }
- // DDRB |= (1<<7);
- // DDRB |= (1<<1);
- // DDRB |= (1<<3);
- // DDRE |= (1<<6);
- if (usb_led == 0){
- PORTB |= (1<<6);
- // PORTB |= (1<<7);
- // PORTB |= (1<<1);
- // PORTB |= (1<<3);
- // PORTE |= (1<<6);
- }
- else{
- PORTB &= ~(1<<6);
- // PORTB &= ~(1<<7);
- }
-
- led_set_user(usb_led);
+void led_init_ports(void) {
+ setPinOutput(B2);
+ setPinOutput(B6);
+}
+
+bool led_update_kb(led_t led_state) {
+ bool res = led_update_user(led_state);
+ if(res) {
+ writePin(B2, !led_state.caps_lock);
+ writePin(B6, led_state == 0);
+ }
+ return res;
}