qmk

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.z3bra.org/qmk.git
Log | Files | Refs | Submodules | LICENSE

commit a678f4a206f88cb2dc99be260da4d5030b1adeaa
parent 32952d8624f1228a865b9636ad546ea32822abda
Author: Erovia <Erovia@users.noreply.github.com>
Date:   Mon,  3 Jun 2019 21:09:46 +0200

[Keyboard] Dimple: fix unintended LED behaviour (#6046)

* 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

Diffstat:
keyboards/lazydesigners/dimple/dimple.c | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/keyboards/lazydesigners/dimple/dimple.c b/keyboards/lazydesigners/dimple/dimple.c @@ -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(); }