summaryrefslogtreecommitdiff
path: root/layouts/community
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/community')
-rw-r--r--layouts/community/ergodox/drashna/keymap.c37
-rw-r--r--layouts/community/ortho_4x12/drashna/keymap.c30
2 files changed, 25 insertions, 42 deletions
diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c
index fd867ede54..71ac549aeb 100644
--- a/layouts/community/ergodox/drashna/keymap.c
+++ b/layouts/community/ergodox/drashna/keymap.c
@@ -399,15 +399,6 @@ void suspend_wakeup_init_keymap(void) {
rgb_matrix_set_suspend_state(false);
}
-extern led_config_t g_led_config;
-void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) {
- for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
- if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
- rgb_matrix_set_color( i, red, green, blue );
- }
- }
-}
-
void rgb_matrix_indicators_user(void) {
if ( userspace_config.rgb_layer_change &&
#ifdef RGB_DISABLE_WHEN_USB_SUSPENDED
@@ -421,9 +412,9 @@ void rgb_matrix_indicators_user(void) {
) {
switch (biton32(layer_state)) {
case _MODS:
- rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break;
+ rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_MODIFIER); break;
case _GAMEPAD:
- rgb_matrix_layer_helper(0xFF, 0x80, 0x00);
+ rgb_matrix_layer_helper(0xFF, 0x80, 0x00, LED_FLAG_MODIFIER);
rgb_matrix_set_color(32, 0x00, 0xFF, 0x00); // Q
rgb_matrix_set_color(31, 0x00, 0xFF, 0xFF); // W
rgb_matrix_set_color(30, 0xFF, 0x00, 0x00); // E
@@ -439,31 +430,31 @@ void rgb_matrix_indicators_user(void) {
break;
case _DIABLO:
- rgb_matrix_layer_helper(0xFF, 0x00, 0x00); break;
+ rgb_matrix_layer_helper(0xFF, 0x00, 0x00, LED_FLAG_MODIFIER); break;
case _RAISE:
- rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break;
+ rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_MODIFIER); break;
case _LOWER:
- rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break;
+ rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_MODIFIER); break;
case _ADJUST:
- rgb_matrix_layer_helper(0xFF, 0x00, 0x00); break;
+ rgb_matrix_layer_helper(0xFF, 0x00, 0x00, LED_FLAG_MODIFIER); break;
default:
switch (biton32(default_layer_state)) {
case _QWERTY:
- rgb_matrix_layer_helper(0x00, 0xFF, 0xFF); break;
+ rgb_matrix_layer_helper(0x00, 0xFF, 0xFF, LED_FLAG_MODIFIER); break;
case _COLEMAK:
- rgb_matrix_layer_helper(0xFF, 0x00, 0xFF); break;
+ rgb_matrix_layer_helper(0xFF, 0x00, 0xFF, LED_FLAG_MODIFIER); break;
case _DVORAK:
- rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break;
+ rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_MODIFIER); break;
case _WORKMAN:
- rgb_matrix_layer_helper(0xD9, 0xA5, 0x21); break;
+ rgb_matrix_layer_helper(0xD9, 0xA5, 0x21, LED_FLAG_MODIFIER); break;
case _NORMAN:
- rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D); break;
+ rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D, LED_FLAG_MODIFIER); break;
case _MALTRON:
- rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break;
+ rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_MODIFIER); break;
case _EUCALYN:
- rgb_matrix_layer_helper(0xFF, 0x80, 0xBF); break;
+ rgb_matrix_layer_helper(0xFF, 0x80, 0xBF, LED_FLAG_MODIFIER); break;
case _CARPLAX:
- rgb_matrix_layer_helper(0x00, 0x00, 0xFF); break;
+ rgb_matrix_layer_helper(0x00, 0x00, 0xFF, LED_FLAG_MODIFIER); break;
}
}
}
diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c
index 9b0c2d7949..3ebcd84a69 100644
--- a/layouts/community/ortho_4x12/drashna/keymap.c
+++ b/layouts/community/ortho_4x12/drashna/keymap.c
@@ -180,14 +180,6 @@ void suspend_wakeup_init_keymap(void) {
rgb_matrix_set_suspend_state(false);
}
-void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) {
- for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
- if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
- rgb_matrix_set_color( i, red, green, blue );
- }
- }
-}
-
void rgb_matrix_indicators_user(void) {
uint8_t this_mod = get_mods();
uint8_t this_led = host_keyboard_leds();
@@ -209,29 +201,29 @@ void rgb_matrix_indicators_user(void) {
) {
switch (biton32(layer_state)) {
case _RAISE:
- rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break;
+ rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_MODIFIER); break;
case _LOWER:
- rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break;
+ rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_MODIFIER); break;
case _ADJUST:
- rgb_matrix_layer_helper(0xFF, 0x00, 0x00); break;
+ rgb_matrix_layer_helper(0xFF, 0x00, 0x00, LED_FLAG_MODIFIER); break;
default:
switch (biton32(default_layer_state)) {
case _QWERTY:
- rgb_matrix_layer_helper(0x00, 0xFF, 0xFF); break;
+ rgb_matrix_layer_helper(0x00, 0xFF, 0xFF, LED_FLAG_MODIFIER); break;
case _COLEMAK:
- rgb_matrix_layer_helper(0xFF, 0x00, 0xFF); break;
+ rgb_matrix_layer_helper(0xFF, 0x00, 0xFF, LED_FLAG_MODIFIER); break;
case _DVORAK:
- rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break;
+ rgb_matrix_layer_helper(0x00, 0xFF, 0x00, LED_FLAG_MODIFIER); break;
case _WORKMAN:
- rgb_matrix_layer_helper(0xD9, 0xA5, 0x21); break;
+ rgb_matrix_layer_helper(0xD9, 0xA5, 0x21, LED_FLAG_MODIFIER); break;
case _NORMAN:
- rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D); break;
+ rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D, LED_FLAG_MODIFIER); break;
case _MALTRON:
- rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break;
+ rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, LED_FLAG_MODIFIER); break;
case _EUCALYN:
- rgb_matrix_layer_helper(0xFF, 0x80, 0xBF); break;
+ rgb_matrix_layer_helper(0xFF, 0x80, 0xBF, LED_FLAG_MODIFIER); break;
case _CARPLAX:
- rgb_matrix_layer_helper(0x00, 0x00, 0xFF); break;
+ rgb_matrix_layer_helper(0x00, 0x00, 0xFF, LED_FLAG_MODIFIER); break;
}
}
}