aboutsummaryrefslogtreecommitdiff
path: root/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c')
-rw-r--r--keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c b/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c
index 3dfa78374..a6d1e226b 100644
--- a/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c
+++ b/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c
@@ -50,40 +50,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
50 50
51 51
52 52
53void rgb_matrix_layer_helper(uint8_t red, uint8_t green, uint8_t blue, bool default_layer) 53extern led_config_t g_led_config;
54{ 54void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
55 rgb_led led; 55 for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
56 56 if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
57 for (int i = 0; i < DRIVER_LED_TOTAL; i++) { 57 rgb_matrix_set_color( i, red, green, blue );
58 led = g_rgb_leds[i]; 58 }
59 59 }
60 if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
61 rgb_matrix_set_color( i, red, green, blue );
62 }
63 }
64} 60}
65 61
66void rgb_matrix_indicators_user(void) 62void rgb_matrix_indicators_user(void)
67{ 63{
68 uint8_t this_led = host_keyboard_leds(); 64 uint8_t this_led = host_keyboard_leds();
69 65
70 if (!g_suspend_state) { 66 if (!g_suspend_state) {
71 switch (biton32(layer_state)) { 67 switch (biton32(layer_state)) {
72 case _LAYER1: 68 case _LAYER1:
73 rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break; 69 rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break;
74 70
75 case _LAYER2: 71 case _LAYER2:
76 rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break; 72 rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break;
77 73
78 case _LAYER4: 74 case _LAYER4:
79 rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break; 75 rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break;
80 } 76 }
81 } 77 }
82 78
83 if (this_led & (1 << USB_LED_CAPS_LOCK)) { 79 if (this_led & (1 << USB_LED_CAPS_LOCK)) {
84 rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF); 80 rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF);
85 } 81 }
86 82
87 switch (biton32(layer_state)) { 83 switch (biton32(layer_state)) {
88 case _LAYER3: 84 case _LAYER3:
89 if (this_led & (1 << USB_LED_NUM_LOCK)) { 85 if (this_led & (1 << USB_LED_NUM_LOCK)) {
@@ -91,7 +87,7 @@ void rgb_matrix_indicators_user(void)
91 } else { 87 } else {
92 rgb_matrix_set_color(13, 0x00, 0x00, 0x00); 88 rgb_matrix_set_color(13, 0x00, 0x00, 0x00);
93 } 89 }
94 90
95 rgb_matrix_set_color(0, 0x00, 0xFF, 0x00); 91 rgb_matrix_set_color(0, 0x00, 0xFF, 0x00);
96 rgb_matrix_set_color(1, 0x00, 0x00, 0x00); 92 rgb_matrix_set_color(1, 0x00, 0x00, 0x00);
97 rgb_matrix_set_color(1, 0x00, 0xFF, 0x00); 93 rgb_matrix_set_color(1, 0x00, 0xFF, 0x00);