-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrgb_layers.h
More file actions
42 lines (41 loc) · 932 Bytes
/
rgb_layers.h
File metadata and controls
42 lines (41 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
for (uint8_t i = led_min; i < led_max; i++) {
if (g_led_config.flags[i] & LED_FLAG_MODIFIER) {
switch(get_highest_layer(layer_state)) {
case 1:
rgb_matrix_set_color(i, RGB_RED);
break;
case 2:
rgb_matrix_set_color(i, RGB_YELLOW);
break;
case 3:
rgb_matrix_set_color(i, RGB_BLUE);
break;
case 4:
rgb_matrix_set_color(i, RGB_CORAL);
break;
case 5:
rgb_matrix_set_color(i, RGB_TEAL);
break;
case 6:
rgb_matrix_set_color(i, RGB_ORANGE);
break;
case 7:
rgb_matrix_set_color(i, RGB_PURPLE);
break;
default:
break;
}
}
}
return false;
}
layer_state_t layer_state_set_user(layer_state_t state) {
setPinOutput(25);
if (get_highest_layer(state) > 0) {
writePinHigh(25);
} else {
writePinLow(25);
}
return state;
}