summaryrefslogtreecommitdiffstats
path: root/keyboards/dz60/keymaps
diff options
context:
space:
mode:
authornariox <pedro.nariyoshI@gmail.com>2018-04-24 21:43:23 +0200
committerDrashna Jaelre <drashna@live.com>2018-04-24 21:43:23 +0200
commit1feb42a1088e868cb963f35cc72d180733304db4 (patch)
tree30af2302b962d4b5296a6a94ab09b8120e630c11 /keyboards/dz60/keymaps
parent7d08e48c50b286a6a95bb4da4bb17912951894e8 (diff)
downloadqmk_firmware-1feb42a1088e868cb963f35cc72d180733304db4.tar.gz
qmk_firmware-1feb42a1088e868cb963f35cc72d180733304db4.tar.xz
DZ60: Add Caps Lock LED for default keymap (#2800)
Commit b546da0 added better init handling, but removed Caps Lock LED handling. This re-adds it (in the right place).
Diffstat (limited to 'keyboards/dz60/keymaps')
-rw-r--r--keyboards/dz60/keymaps/default/keymap.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/keyboards/dz60/keymaps/default/keymap.c b/keyboards/dz60/keymaps/default/keymap.c
index ed91cc377..8d5d1ecb3 100644
--- a/keyboards/dz60/keymaps/default/keymap.c
+++ b/keyboards/dz60/keymaps/default/keymap.c
@@ -59,3 +59,11 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
break;
}
}
+
+void led_set_user(uint8_t usb_led) {
+ if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
+ DDRB |= (1 << 2); PORTB &= ~(1 << 2);
+ } else {
+ DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
+ }
+}