]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
actually support switching the left LEDs in my keyboard
authorDon Armstrong <don@donarmstrong.com>
Tue, 2 May 2017 02:33:23 +0000 (19:33 -0700)
committerDon Armstrong <don@donarmstrong.com>
Tue, 24 Dec 2019 16:53:57 +0000 (08:53 -0800)
layouts/community/ergodox/don/Makefile
layouts/community/ergodox/don/keymap.c

index 14b5afbde92c8961a137948e51f6577a121fa23f..bb0dd5d8f01cb89a7e3e8dc3adf773c5e096566b 100644 (file)
@@ -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
index 39da4d6c2de5644440f97f77b793f58ad93fb845..cdf09c4b14cf1aa920c84aa7d1cec4d8627bc6f6 100644 (file)
@@ -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.