aboutsummaryrefslogtreecommitdiff
path: root/users/stanrc85/layer_rgb.c
diff options
context:
space:
mode:
Diffstat (limited to 'users/stanrc85/layer_rgb.c')
-rw-r--r--users/stanrc85/layer_rgb.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/users/stanrc85/layer_rgb.c b/users/stanrc85/layer_rgb.c
new file mode 100644
index 000000000..ac5d18122
--- /dev/null
+++ b/users/stanrc85/layer_rgb.c
@@ -0,0 +1,26 @@
1#include "stanrc85.h"
2
3void matrix_init_user(void) {
4 rgblight_setrgb(0xFF, 0x00, 0x00);
5};
6
7uint32_t layer_state_set_user(uint32_t state) {
8 switch (biton32(state)) {
9 case 0:
10 rgblight_setrgb (0xFF, 0x00, 0x00);
11 break;
12 case 1:
13 rgblight_setrgb (0x00, 0xFF, 0x00);
14 break;
15 case 2:
16 rgblight_setrgb (0x00, 0x00, 0xFF);
17 break;
18 case 3:
19 rgblight_setrgb (0xFF, 0xFF, 0xFF);
20 break;
21 default: // for any other layers, or the default layer
22 rgblight_setrgb (0xFF, 0x00, 0x00);
23 break;
24 }
25 return state;
26}