summaryrefslogtreecommitdiffstats
path: root/keyboards/ergodox_ez
diff options
context:
space:
mode:
authorErez Zukerman <ezukerman@godaddy.com>2017-11-06 15:00:05 +0100
committerJack Humbert <jack.humb@gmail.com>2017-11-06 15:19:51 +0100
commite45290a62e117c970155b992b34b2bb3cc8412f2 (patch)
tree5613501a9e173198727c39110a3e30a6027c8449 /keyboards/ergodox_ez
parent1d3a19757c7b91230e4e7c54f7e41755fc4767a5 (diff)
downloadqmk_firmware-e45290a62e117c970155b992b34b2bb3cc8412f2.tar.gz
qmk_firmware-e45290a62e117c970155b992b34b2bb3cc8412f2.tar.xz
adds indication up to layer 7
Diffstat (limited to 'keyboards/ergodox_ez')
-rw-r--r--keyboards/ergodox_ez/config.h9
-rw-r--r--keyboards/ergodox_ez/keymaps/default/config.h30
-rw-r--r--keyboards/ergodox_ez/keymaps/default/keymap.c94
3 files changed, 67 insertions, 66 deletions
diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h
index b258a5b2e..4ffc1b434 100644
--- a/keyboards/ergodox_ez/config.h
+++ b/keyboards/ergodox_ez/config.h
@@ -87,6 +87,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define USB_MAX_POWER_CONSUMPTION 500
+// #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF
+#define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF
+#define RGBLIGHT_COLOR_LAYER_2 0xFF, 0x00, 0x00
+#define RGBLIGHT_COLOR_LAYER_3 0x00, 0xFF, 0x00
+#define RGBLIGHT_COLOR_LAYER_4 0xFF, 0xFF, 0x00
+#define RGBLIGHT_COLOR_LAYER_5 0x00, 0xFF, 0xFF
+#define RGBLIGHT_COLOR_LAYER_6 0xFF, 0x00, 0xFF
+#define RGBLIGHT_COLOR_LAYER_7 0xFF, 0xFF, 0xFF
+
/*
* Feature disable options
* These options are also useful to firmware size reduction.
diff --git a/keyboards/ergodox_ez/keymaps/default/config.h b/keyboards/ergodox_ez/keymaps/default/config.h
deleted file mode 100644
index e2e2c6bdc..000000000
--- a/keyboards/ergodox_ez/keymaps/default/config.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-Copyright 2017 Jack Humbert <jack.humbgmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef ERGODOX_EZ_USER_CONFIG_H
-#define ERGODOX_EZ_USRE_CONFIG_H
-
-#include "config_common.h"
-
-// #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF
-#define RGBLIGHT_COLOR_LAYER_1 0xFF, 0x00, 0x00
-#define RGBLIGHT_COLOR_LAYER_2 0x00, 0xFF, 0x00
-#define RGBLIGHT_COLOR_LAYER_3 0xFF, 0xFF, 0x00
-#define RGBLIGHT_COLOR_LAYER_4 0x00, 0xFF, 0xFF
-#define RGBLIGHT_COLOR_LAYER_5 0xFF, 0x00, 0xFF
-
-#endif \ No newline at end of file
diff --git a/keyboards/ergodox_ez/keymaps/default/keymap.c b/keyboards/ergodox_ez/keymaps/default/keymap.c
index e0f6e21b2..d2976812f 100644
--- a/keyboards/ergodox_ez/keymaps/default/keymap.c
+++ b/keyboards/ergodox_ez/keymaps/default/keymap.c
@@ -211,41 +211,63 @@ uint32_t layer_state_set_user(uint32_t state) {
uint8_t layer = biton32(state);
switch (layer) {
- case 0:
- #ifdef RGBLIGHT_COLOR_LAYER_0
- rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
- #else
- rgblight_init();
- #endif
- break;
- case 1:
- ergodox_right_led_1_on();
- #ifdef RGBLIGHT_COLOR_LAYER_1
- rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1);
- #endif
- break;
- case 2:
- ergodox_right_led_2_on();
- #ifdef RGBLIGHT_COLOR_LAYER_2
- rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2);
- #endif
- break;
- case 3:
- #ifdef RGBLIGHT_COLOR_LAYER_3
- rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3);
- #endif
- break;
- case 4:
- #ifdef RGBLIGHT_COLOR_LAYER_4
- rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4);
- #endif
- break;
- case 5:
- #ifdef RGBLIGHT_COLOR_LAYER_5
- rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5);
- #endif
- break;
- }
+ case 0:
+ #ifdef RGBLIGHT_COLOR_LAYER_0
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
+ #else
+ rgblight_init();
+ #endif
+ break;
+ case 1:
+ ergodox_right_led_1_on();
+ #ifdef RGBLIGHT_COLOR_LAYER_1
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1);
+ #endif
+ break;
+ case 2:
+ ergodox_right_led_2_on();
+ #ifdef RGBLIGHT_COLOR_LAYER_2
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2);
+ #endif
+ break;
+ case 3:
+ ergodox_right_led_3_on();
+ #ifdef RGBLIGHT_COLOR_LAYER_3
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3);
+ #endif
+ break;
+ case 4:
+ ergodox_right_led_1_on();
+ ergodox_right_led_2_on();
+ #ifdef RGBLIGHT_COLOR_LAYER_4
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4);
+ #endif
+ break;
+ case 5:
+ ergodox_right_led_1_on();
+ ergodox_right_led_3_on();
+ #ifdef RGBLIGHT_COLOR_LAYER_5
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5);
+ #endif
+ break;
+ case 6:
+ ergodox_right_led_2_on();
+ ergodox_right_led_3_on();
+ #ifdef RGBLIGHT_COLOR_LAYER_6
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6);
+ #endif
+ break;
+ case 7:
+ ergodox_right_led_1_on();
+ ergodox_right_led_2_on();
+ ergodox_right_led_3_on();
+ #ifdef RGBLIGHT_COLOR_LAYER_7
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6);
+ #endif
+ break;
+ default:
+ break;
+ }
return state;
-}; \ No newline at end of file
+};