summaryrefslogtreecommitdiff
path: root/keyboards/exclusive/e6v2
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2022-12-14 11:14:10 +0000
committerGitHub <noreply@github.com>2022-12-14 11:14:10 +0000
commit1124bbc1db8fb26418bded7016c702de469b162f (patch)
tree6486fdf3ddcd39355af2a94b8998e57dc1d239cc /keyboards/exclusive/e6v2
parent0fcf481cdd2a350b628462201b0a725df6c72b2b (diff)
Remove deprecated led_set_kb (#19273)
* Remove led_set_kb maintaining existing led_set_user behaviour * Also call led_set_user
Diffstat (limited to 'keyboards/exclusive/e6v2')
-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;
}