Skip to content

Commit

Permalink
[Keyboard] Dimple: fix unintended LED behaviour (qmk#6046)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Erovia authored and drashna committed Jun 3, 2019
1 parent 32952d8 commit a678f4a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions keyboards/lazydesigners/dimple/dimple.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@
#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();
}

0 comments on commit a678f4a

Please sign in to comment.