From: Don Armstrong Date: Tue, 2 May 2017 02:33:23 +0000 (-0700) Subject: actually support switching the left LEDs in my keyboard X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6dbcedeaac58884fdfcb8bd06f366c14765a064d;p=qmk_firmware.git actually support switching the left LEDs in my keyboard --- diff --git a/keyboards/ergodox/keymaps/don/Makefile b/keyboards/ergodox/keymaps/don/Makefile index 14b5afbde..bb0dd5d8f 100644 --- a/keyboards/ergodox/keymaps/don/Makefile +++ b/keyboards/ergodox/keymaps/don/Makefile @@ -21,6 +21,7 @@ LCD_BACKLIGHT_ENABLE = yes LCD_ENABLE = yes else OPT_DEFS+= -DLEFT_LEDS +RGBLIGHT_ENABLE = no endif dfu-util: $(BUILD_DIR)/$(TARGET).bin sizeafter diff --git a/keyboards/ergodox/keymaps/don/keymap.c b/keyboards/ergodox/keymaps/don/keymap.c index 39da4d6c2..cdf09c4b1 100644 --- a/keyboards/ergodox/keymaps/don/keymap.c +++ b/keyboards/ergodox/keymaps/don/keymap.c @@ -204,7 +204,25 @@ void matrix_init_user(void) { // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - +#ifdef LEFT_LEDS + uint8_t layer = biton32(layer_state); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case SYMB: + ergodox_left_led_1_on(); + break; + case MOUS: + ergodox_left_led_2_on(); + break; + default: + ergodox_left_led_1_off(); + ergodox_left_led_2_off(); + ergodox_left_led_3_off(); + // none + break; + } +#endif + }; // if this is my ergodox ez, I have left LEDs.