~sungo/qmk_userspace

qmk_userspace/boards/reviung41.c -rw-r--r-- 966 bytes
dbde0bc9 — sungo fix arrow keybindings on the breeze 3 months ago
                                                                                
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
#include QMK_KEYBOARD_H

#ifdef KEYBOARD_reviung41

const rgblight_segment_t PROGMEM my_layer0_lights[] =
	RGBLIGHT_LAYER_SEGMENTS(HSV_LAYER0);

const rgblight_segment_t PROGMEM my_layer1_lights[] =
	RGBLIGHT_LAYER_SEGMENTS(HSV_LAYER1);

const rgblight_segment_t PROGMEM my_layer2_lights[] =
	RGBLIGHT_LAYER_SEGMENTS(HSV_LAYER2);

const rgblight_segment_t *const PROGMEM my_rgb_layers[] =
	RGBLIGHT_LAYERS_LIST(my_layer0_lights, my_layer1_lights, my_layer2_lights);

void keyboard_post_init_user(void) {
	rgblight_enable_noeeprom();
	rgblight_layers = my_rgb_layers;
}

layer_state_t default_layer_state_set_user(layer_state_t state) {
	rgblight_set_layer_state(0, layer_state_cmp(state, 0));
	return state;
}

layer_state_t layer_state_set_user(layer_state_t state) {
	rgblight_set_layer_state(1, layer_state_cmp(state, 1));
	rgblight_set_layer_state(2, layer_state_cmp(state, 2));
	rgblight_set_layer_state(3, layer_state_cmp(state, 3));
	return state;
}

#endif