From 70c390fd3a6017e0bf2bd00cc2f35c95d60d4a2e Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Mon, 1 May 2017 19:33:23 -0700 Subject: [PATCH] actually support switching the left LEDs in my keyboard --- layouts/community/ergodox/don/Makefile | 1 + layouts/community/ergodox/don/keymap.c | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/layouts/community/ergodox/don/Makefile b/layouts/community/ergodox/don/Makefile index 14b5afbde..bb0dd5d8f 100644 --- a/layouts/community/ergodox/don/Makefile +++ b/layouts/community/ergodox/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/layouts/community/ergodox/don/keymap.c b/layouts/community/ergodox/don/keymap.c index 39da4d6c2..cdf09c4b1 100644 --- a/layouts/community/ergodox/don/keymap.c +++ b/layouts/community/ergodox/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. -- 2.39.5