diff options
author | Damien Broqua <dbroqua@mousur.org> | 2017-05-30 22:13:34 +0200 |
---|---|---|
committer | Damien Broqua <dbroqua@mousur.org> | 2017-05-30 22:13:34 +0200 |
commit | e280f7aad7cb0abeaae2cfeb47bba02d4b83875e (patch) | |
tree | 07fb36303ccb0bfa01ca55ef30be37c2569befd9 /keyboards/dk60/dk60.c | |
parent | f06f883589eaf0fbc9e15a28c09abc22d747d7a5 (diff) | |
download | qmk_firmware-e280f7aad7cb0abeaae2cfeb47bba02d4b83875e.tar.gz qmk_firmware-e280f7aad7cb0abeaae2cfeb47bba02d4b83875e.zip |
- Added Capslock/Esc led
Diffstat (limited to 'keyboards/dk60/dk60.c')
-rw-r--r-- | keyboards/dk60/dk60.c | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/keyboards/dk60/dk60.c b/keyboards/dk60/dk60.c index 40f24c2877..93aeb33b4a 100644 --- a/keyboards/dk60/dk60.c +++ b/keyboards/dk60/dk60.c @@ -1,13 +1,34 @@ #include "dk60.h" -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here +void dk60_blink_all_leds(void) +{ + dk60_led_all_off(); + dk60_led_all_on(); + _delay_ms(500); + dk60_led_all_off(); +} + +void matrix_init_kb(void) { + led_init_ports(); + dk60_blink_all_leds(); + + matrix_init_user(); +} + +void led_init_ports(void) { + // * Set our LED pins as output + DDRE |= (1<<6); + DDRF |= (1<<0); +} - if (usb_led & (1<<USB_LED_CAPS_LOCK)) { +void led_set_kb(uint8_t usb_led) { + if (usb_led & (1<<USB_LED_CAPS_LOCK)) { + // Turn capslock on dk60_caps_led_on(); - } else { + } else { + // Turn capslock off dk60_caps_led_off(); - } + } led_set_user(usb_led); } |