2019-03-04 07:31:12 +08:00
|
|
|
#include "stanrc85.h"
|
|
|
|
|
|
|
|
void matrix_init_user(void) {
|
2019-05-22 01:59:08 +08:00
|
|
|
rgblight_setrgb(0xFF, 0x00, 0x00);
|
2019-03-04 07:31:12 +08:00
|
|
|
};
|
|
|
|
|
2021-07-20 00:50:55 +08:00
|
|
|
layer_state_t layer_state_set_user(layer_state_t state) {
|
2019-05-12 08:51:37 +08:00
|
|
|
switch (biton32(state)) {
|
2019-03-04 07:31:12 +08:00
|
|
|
case 0:
|
2019-05-22 01:59:08 +08:00
|
|
|
rgblight_setrgb (0xFF, 0x00, 0x00);
|
|
|
|
break;
|
2019-03-04 07:31:12 +08:00
|
|
|
case 1:
|
2019-05-22 01:59:08 +08:00
|
|
|
rgblight_setrgb (0x00, 0xFF, 0x00);
|
|
|
|
break;
|
2019-03-04 07:31:12 +08:00
|
|
|
case 2:
|
2019-05-22 01:59:08 +08:00
|
|
|
rgblight_setrgb (0x00, 0x00, 0xFF);
|
|
|
|
break;
|
2019-03-04 07:31:12 +08:00
|
|
|
case 3:
|
2019-05-22 01:59:08 +08:00
|
|
|
rgblight_setrgb (0xFF, 0xFF, 0xFF);
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
rgblight_setrgb (0xFF, 0x00, 0xFF);
|
|
|
|
break;
|
2019-03-04 07:31:12 +08:00
|
|
|
default: // for any other layers, or the default layer
|
2019-05-22 01:59:08 +08:00
|
|
|
rgblight_setrgb (0xFF, 0x00, 0x00);
|
|
|
|
break;
|
2019-03-04 07:31:12 +08:00
|
|
|
}
|
|
|
|
return state;
|
|
|
|
}
|