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