]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
[Keyboard] Dimple: fix unintended LED behaviour (#6046)
authorErovia <Erovia@users.noreply.github.com>
Mon, 3 Jun 2019 19:09:46 +0000 (21:09 +0200)
committerDrashna Jaelre <drashna@live.com>
Mon, 3 Jun 2019 19:09:46 +0000 (12:09 -0700)
* Dimple: fix unintended LED behaviour

The LED was always-on if the custom keymap did not call dimple_led_off()
at least once.

* Dimple: LED code fixup

keyboards/lazydesigners/dimple/dimple.c

index 5f9571651682161f300d0f2072e28c149c360dc1..69fb2253fc00e7cd6de4cc17f6ef333a2c80e99d 100644 (file)
 #include "dimple.h"
 
 void dimple_led_on() {
-  DDRE |= (1 << 6); PORTE &= ~(1 << 6);
+  writePinHigh(E6);
 }
 
 void dimple_led_off() {
-  DDRE &= ~(1 << 6); PORTE &= ~(1 << 6);
+  writePinLow(E6);
+}
+
+void keyboard_pre_init_kb(void) {
+  // Initialize Caps Lock LED
+  setPinOutput(E6);
+  keyboard_pre_init_user();
 }