Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions keyboards/tutte_coxeter_36k/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#define RGBLIGHT_LAYERS
7 changes: 7 additions & 0 deletions keyboards/tutte_coxeter_36k/keyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
"mousekey": true,
"nkro": false
},
"ws2812": {
"pin": "GP23",
"driver": "vendor"
},
"rgblight": {
"led_count": 1
},
"matrix_pins": {
"cols": ["GP11", "GP10", "GP3", "GP4", "GP7", "GP26", "GP27", "GP28", "GP15", "GP21", "GP19", "GP20", "GP16"],
"rows": ["GP12", "GP8", "GP9", "GP1", "GP6", "GP2", "GP22", "GP0", "GP13", "GP14", "GP18", "GP17", "GP5"]
Expand Down
41 changes: 41 additions & 0 deletions keyboards/tutte_coxeter_36k/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,44 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_DEL, KC_TAB, KC_SPC, KC_ENT, KC_ESC, KC_BSPC
)
};

// Only have one LED at index zero:
const rgblight_segment_t PROGMEM my_num_lock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 1, HSV_CYAN}
);
const rgblight_segment_t PROGMEM my_caps_lock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 1, HSV_BLUE}
);
const rgblight_segment_t PROGMEM my_scroll_lock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 1, HSV_PURPLE}
);
const rgblight_segment_t PROGMEM my_compose_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 1, HSV_ORANGE}
);
const rgblight_segment_t PROGMEM my_kana_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{0, 1, HSV_GREEN}
);
// etc...

// Now define the array of layers. Later layers take precedence
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
my_num_lock_layer,
my_caps_lock_layer,
my_scroll_lock_layer,
my_compose_layer,
my_kana_layer
);

void keyboard_post_init_user(void) {
// Enable the LED layers
rgblight_layers = my_rgb_layers;
}

bool led_update_user(led_t led_state) {
rgblight_set_layer_state(0, led_state.num_lock);
rgblight_set_layer_state(1, led_state.caps_lock);
rgblight_set_layer_state(2, led_state.scroll_lock);
rgblight_set_layer_state(3, led_state.compose);
rgblight_set_layer_state(4, led_state.kana);
return true;
}
1 change: 1 addition & 0 deletions keyboards/tutte_coxeter_36k/keymaps/default/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RGBLIGHT_ENABLE = yes
2 changes: 2 additions & 0 deletions keyboards/tutte_coxeter_36k/keymaps/vial/rules.mk
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
VIA_ENABLE = yes
VIAL_ENABLE = yes

RGBLIGHT_ENABLE = yes