summaryrefslogtreecommitdiffstats
path: root/keyboards/40percentclub/ut47/led.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/40percentclub/ut47/led.c')
-rw-r--r--keyboards/40percentclub/ut47/led.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/keyboards/40percentclub/ut47/led.c b/keyboards/40percentclub/ut47/led.c
index f5d8ffc12e..867a6e2e2a 100644
--- a/keyboards/40percentclub/ut47/led.c
+++ b/keyboards/40percentclub/ut47/led.c
@@ -19,20 +19,23 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdint.h>
#include "led.h"
-
-void led_set(uint8_t usb_led)
+bool led_update_kb(led_t led_state)
{
- if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
- // output low
- DDRB |= (1<<0);
- PORTB &= ~(1<<0);
- DDRD |= (1<<5);
- PORTD &= ~(1<<5);
- } else {
- // Hi-Z
- DDRB &= ~(1<<0);
- PORTB &= ~(1<<0);
- DDRD &= ~(1<<5);
- PORTD &= ~(1<<5);
+ bool res = led_update_user(led_state);
+ if (res) {
+ if (led_state.caps_lock) {
+ // output low
+ DDRB |= (1<<0);
+ PORTB &= ~(1<<0);
+ DDRD |= (1<<5);
+ PORTD &= ~(1<<5);
+ } else {
+ // Hi-Z
+ DDRB &= ~(1<<0);
+ PORTB &= ~(1<<0);
+ DDRD &= ~(1<<5);
+ PORTD &= ~(1<<5);
+ }
}
+ return false;
}