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