summaryrefslogtreecommitdiff
path: root/keyboards/dk60/dk60.c
diff options
context:
space:
mode:
authorStick <nstickney@gmail.com>2017-06-02 19:50:54 -0500
committerStick <nstickney@gmail.com>2017-06-02 19:50:54 -0500
commit4ba9917f829885b13ea1b3610a2f988e539c9e01 (patch)
tree612da1c6de929e6e0a5b0847d7b594cb3becdf27 /keyboards/dk60/dk60.c
parent8665ed3efc62e649d0eac5b88761d7b3f8f30cd7 (diff)
parentaaa67f69305c5c78e15a1090ba7058adea59ff36 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'keyboards/dk60/dk60.c')
-rw-r--r--keyboards/dk60/dk60.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/keyboards/dk60/dk60.c b/keyboards/dk60/dk60.c
new file mode 100644
index 0000000000..93aeb33b4a
--- /dev/null
+++ b/keyboards/dk60/dk60.c
@@ -0,0 +1,34 @@
+#include "dk60.h"
+
+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);
+}
+
+void led_set_kb(uint8_t usb_led) {
+ if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
+ // Turn capslock on
+ dk60_caps_led_on();
+ } else {
+ // Turn capslock off
+ dk60_caps_led_off();
+ }
+
+ led_set_user(usb_led);
+}