Trying to fix the config, just an update

This commit is contained in:
toril940 2023-11-16 21:07:53 +00:00
parent f7d03e73aa
commit 956b40a2c8
3 changed files with 150 additions and 149 deletions

View File

@ -15,5 +15,3 @@
#define LED_MATRIX_LED_COUNT 8 #define LED_MATRIX_LED_COUNT 8
#define LED_DRIVER_1_LED_TOTAL 8 #define LED_DRIVER_1_LED_TOTAL 8
#define LED_DRIVER_ADDR_1 0b1110100 #define LED_DRIVER_ADDR_1 0b1110100
#define LED_CAPS_LOCK_PIN B11

View File

@ -42,14 +42,14 @@
}, },
"driver": "is31fl3731", "driver": "is31fl3731",
"layout": [ "layout": [
{"x": 0, "y": -1, "flags": "0x08"}, {"x": 0, "y": -1, "flags": 8},
{"x": 1, "y": -1, "flags": "0x08"}, {"x": 1, "y": -1, "flags": 8},
{"x": 2, "y": -1, "flags": "0x08"}, {"x": 2, "y": -1, "flags": 8},
{"x": 3, "y": -1, "flags": "0x08"}, {"x": 3, "y": -1, "flags": 8},
{"x": 4, "y": -1, "flags": "0x08"}, {"x": 4, "y": -1, "flags": 8},
{"x": 5, "y": -1, "flags": "0x08"}, {"x": 5, "y": -1, "flags": 8},
{"x": 6, "y": -1, "flags": "0x08"}, {"x": 6, "y": -1, "flags": 8},
{"x": 7, "y": -1, "flags": "0x08"} {"x": 7, "y": -1, "flags": 8}
] ]
}, },
"matrix_pins": { "matrix_pins": {
@ -68,21 +68,21 @@
"layouts": { "layouts": {
"LAYOUT_all": { "LAYOUT_all": {
"layout": [ "layout": [
{"matrix": [0, 0], "x": 0}, {"matrix": [0, 0], "x": 0, "y":0},
{"matrix": [0, 1], "x": 1}, {"matrix": [0, 1], "x": 1, "y":0},
{"matrix": [0, 2], "x": 2}, {"matrix": [0, 2], "x": 2, "y":0},
{"matrix": [0, 3], "x": 3}, {"matrix": [0, 3], "x": 3, "y":0},
{"matrix": [0, 4], "x": 4}, {"matrix": [0, 4], "x": 4, "y":0},
{"matrix": [0, 5], "x": 5}, {"matrix": [0, 5], "x": 5, "y":0},
{"matrix": [0, 6], "x": 6}, {"matrix": [0, 6], "x": 6, "y":0},
{"matrix": [0, 7], "x": 7}, {"matrix": [0, 7], "x": 7, "y":0},
{"matrix": [0, 8], "x": 8}, {"matrix": [0, 8], "x": 8, "y":0},
{"matrix": [0, 9], "x": 9}, {"matrix": [0, 9], "x": 9, "y":0},
{"matrix": [0, 10], "x": 10}, {"matrix": [0, 10], "x": 10, "y":0},
{"matrix": [0, 11], "x": 11}, {"matrix": [0, 11], "x": 11, "y":0},
{"matrix": [0, 12], "x": 12}, {"matrix": [0, 12], "x": 12, "y":0},
{"matrix": [0, 13], "x": 13}, {"matrix": [0, 13], "x": 13, "y":0},
{"matrix": [0, 14], "x": 14}, {"matrix": [0, 14], "x": 14, "y":0},
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
{"matrix": [1, 1], "x": 1.5, "y": 1}, {"matrix": [1, 1], "x": 1.5, "y": 1},
{"matrix": [1, 2], "x": 2.5, "y": 1}, {"matrix": [1, 2], "x": 2.5, "y": 1},
@ -138,20 +138,20 @@
}, },
"LAYOUT_tkl_ansi": { "LAYOUT_tkl_ansi": {
"layout": [ "layout": [
{"matrix": [0, 0], "x": 0}, {"matrix": [0, 0], "x": 0, "y":0},
{"matrix": [0, 1], "x": 1}, {"matrix": [0, 1], "x": 1, "y":0},
{"matrix": [0, 2], "x": 2}, {"matrix": [0, 2], "x": 2, "y":0},
{"matrix": [0, 3], "x": 3}, {"matrix": [0, 3], "x": 3, "y":0},
{"matrix": [0, 4], "x": 4}, {"matrix": [0, 4], "x": 4, "y":0},
{"matrix": [0, 5], "x": 5}, {"matrix": [0, 5], "x": 5, "y":0},
{"matrix": [0, 6], "x": 6}, {"matrix": [0, 6], "x": 6, "y":0},
{"matrix": [0, 7], "x": 7}, {"matrix": [0, 7], "x": 7, "y":0},
{"matrix": [0, 8], "x": 8}, {"matrix": [0, 8], "x": 8, "y":0},
{"matrix": [0, 9], "x": 9}, {"matrix": [0, 9], "x": 9, "y":0},
{"matrix": [0, 10], "x": 10}, {"matrix": [0, 10], "x": 10, "y":0},
{"matrix": [0, 11], "x": 11}, {"matrix": [0, 11], "x": 11, "y":0},
{"matrix": [0, 12], "x": 12}, {"matrix": [0, 12], "x": 12, "y":0},
{"matrix": [0, 13], "x": 13, "w": 2}, {"matrix": [0, 13], "x": 13, "y":0},
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
{"matrix": [1, 1], "x": 1.5, "y": 1}, {"matrix": [1, 1], "x": 1.5, "y": 1},
{"matrix": [1, 2], "x": 2.5, "y": 1}, {"matrix": [1, 2], "x": 2.5, "y": 1},
@ -203,21 +203,21 @@
}, },
"LAYOUT_tkl_ansi_split_bs_rshift": { "LAYOUT_tkl_ansi_split_bs_rshift": {
"layout": [ "layout": [
{"matrix": [0, 0], "x": 0}, {"matrix": [0, 0], "x": 0, "y":0},
{"matrix": [0, 1], "x": 1}, {"matrix": [0, 1], "x": 1, "y":0},
{"matrix": [0, 2], "x": 2}, {"matrix": [0, 2], "x": 2, "y":0},
{"matrix": [0, 3], "x": 3}, {"matrix": [0, 3], "x": 3, "y":0},
{"matrix": [0, 4], "x": 4}, {"matrix": [0, 4], "x": 4, "y":0},
{"matrix": [0, 5], "x": 5}, {"matrix": [0, 5], "x": 5, "y":0},
{"matrix": [0, 6], "x": 6}, {"matrix": [0, 6], "x": 6, "y":0},
{"matrix": [0, 7], "x": 7}, {"matrix": [0, 7], "x": 7, "y":0},
{"matrix": [0, 8], "x": 8}, {"matrix": [0, 8], "x": 8, "y":0},
{"matrix": [0, 9], "x": 9}, {"matrix": [0, 9], "x": 9, "y":0},
{"matrix": [0, 10], "x": 10}, {"matrix": [0, 10], "x": 10, "y":0},
{"matrix": [0, 11], "x": 11}, {"matrix": [0, 11], "x": 11, "y":0},
{"matrix": [0, 12], "x": 12}, {"matrix": [0, 12], "x": 12, "y":0},
{"matrix": [0, 13], "x": 13}, {"matrix": [0, 13], "x": 13, "y":0},
{"matrix": [0, 14], "x": 14}, {"matrix": [0, 14], "x": 14, "y":0},
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
{"matrix": [1, 1], "x": 1.5, "y": 1}, {"matrix": [1, 1], "x": 1.5, "y": 1},
{"matrix": [1, 2], "x": 2.5, "y": 1}, {"matrix": [1, 2], "x": 2.5, "y": 1},
@ -270,20 +270,20 @@
}, },
"LAYOUT_tkl_ansi_tsangan": { "LAYOUT_tkl_ansi_tsangan": {
"layout": [ "layout": [
{"matrix": [0, 0], "x": 0}, {"matrix": [0, 0], "x": 0, "y":0},
{"matrix": [0, 1], "x": 1}, {"matrix": [0, 1], "x": 1, "y":0},
{"matrix": [0, 2], "x": 2}, {"matrix": [0, 2], "x": 2, "y":0},
{"matrix": [0, 3], "x": 3}, {"matrix": [0, 3], "x": 3, "y":0},
{"matrix": [0, 4], "x": 4}, {"matrix": [0, 4], "x": 4, "y":0},
{"matrix": [0, 5], "x": 5}, {"matrix": [0, 5], "x": 5, "y":0},
{"matrix": [0, 6], "x": 6}, {"matrix": [0, 6], "x": 6, "y":0},
{"matrix": [0, 7], "x": 7}, {"matrix": [0, 7], "x": 7, "y":0},
{"matrix": [0, 8], "x": 8}, {"matrix": [0, 8], "x": 8, "y":0},
{"matrix": [0, 9], "x": 9}, {"matrix": [0, 9], "x": 9, "y":0},
{"matrix": [0, 10], "x": 10}, {"matrix": [0, 10], "x": 10, "y":0},
{"matrix": [0, 11], "x": 11}, {"matrix": [0, 11], "x": 11, "y":0},
{"matrix": [0, 12], "x": 12}, {"matrix": [0, 12], "x": 12, "y":0},
{"matrix": [0, 13], "x": 13, "w": 2}, {"matrix": [0, 13], "x": 13, "y":0},
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
{"matrix": [1, 1], "x": 1.5, "y": 1}, {"matrix": [1, 1], "x": 1.5, "y": 1},
{"matrix": [1, 2], "x": 2.5, "y": 1}, {"matrix": [1, 2], "x": 2.5, "y": 1},
@ -334,21 +334,21 @@
}, },
"LAYOUT_tkl_ansi_tsangan_split_bs_rshift": { "LAYOUT_tkl_ansi_tsangan_split_bs_rshift": {
"layout": [ "layout": [
{"matrix": [0, 0], "x": 0}, {"matrix": [0, 0], "x": 0, "y":0},
{"matrix": [0, 1], "x": 1}, {"matrix": [0, 1], "x": 1, "y":0},
{"matrix": [0, 2], "x": 2}, {"matrix": [0, 2], "x": 2, "y":0},
{"matrix": [0, 3], "x": 3}, {"matrix": [0, 3], "x": 3, "y":0},
{"matrix": [0, 4], "x": 4}, {"matrix": [0, 4], "x": 4, "y":0},
{"matrix": [0, 5], "x": 5}, {"matrix": [0, 5], "x": 5, "y":0},
{"matrix": [0, 6], "x": 6}, {"matrix": [0, 6], "x": 6, "y":0},
{"matrix": [0, 7], "x": 7}, {"matrix": [0, 7], "x": 7, "y":0},
{"matrix": [0, 8], "x": 8}, {"matrix": [0, 8], "x": 8, "y":0},
{"matrix": [0, 9], "x": 9}, {"matrix": [0, 9], "x": 9, "y":0},
{"matrix": [0, 10], "x": 10}, {"matrix": [0, 10], "x": 10, "y":0},
{"matrix": [0, 11], "x": 11}, {"matrix": [0, 11], "x": 11, "y":0},
{"matrix": [0, 12], "x": 12}, {"matrix": [0, 12], "x": 12, "y":0},
{"matrix": [0, 13], "x": 13}, {"matrix": [0, 13], "x": 13, "y":0},
{"matrix": [0, 14], "x": 14}, {"matrix": [0, 14], "x": 14, "y":0},
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
{"matrix": [1, 1], "x": 1.5, "y": 1}, {"matrix": [1, 1], "x": 1.5, "y": 1},
{"matrix": [1, 2], "x": 2.5, "y": 1}, {"matrix": [1, 2], "x": 2.5, "y": 1},
@ -400,20 +400,20 @@
}, },
"LAYOUT_tkl_iso": { "LAYOUT_tkl_iso": {
"layout": [ "layout": [
{"matrix": [0, 0], "x": 0}, {"matrix": [0, 0], "x": 0, "y":0},
{"matrix": [0, 1], "x": 1}, {"matrix": [0, 1], "x": 1, "y":0},
{"matrix": [0, 2], "x": 2}, {"matrix": [0, 2], "x": 2, "y":0},
{"matrix": [0, 3], "x": 3}, {"matrix": [0, 3], "x": 3, "y":0},
{"matrix": [0, 4], "x": 4}, {"matrix": [0, 4], "x": 4, "y":0},
{"matrix": [0, 5], "x": 5}, {"matrix": [0, 5], "x": 5, "y":0},
{"matrix": [0, 6], "x": 6}, {"matrix": [0, 6], "x": 6, "y":0},
{"matrix": [0, 7], "x": 7}, {"matrix": [0, 7], "x": 7, "y":0},
{"matrix": [0, 8], "x": 8}, {"matrix": [0, 8], "x": 8, "y":0},
{"matrix": [0, 9], "x": 9}, {"matrix": [0, 9], "x": 9, "y":0},
{"matrix": [0, 10], "x": 10}, {"matrix": [0, 10], "x": 10, "y":0},
{"matrix": [0, 11], "x": 11}, {"matrix": [0, 11], "x": 11, "y":0},
{"matrix": [0, 12], "x": 12}, {"matrix": [0, 12], "x": 12, "y":0},
{"matrix": [0, 13], "x": 13, "w": 2}, {"matrix": [0, 13], "x": 13, "y":0},
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
{"matrix": [1, 1], "x": 1.5, "y": 1}, {"matrix": [1, 1], "x": 1.5, "y": 1},
{"matrix": [1, 2], "x": 2.5, "y": 1}, {"matrix": [1, 2], "x": 2.5, "y": 1},
@ -466,21 +466,21 @@
}, },
"LAYOUT_tkl_iso_split_bs_rshift": { "LAYOUT_tkl_iso_split_bs_rshift": {
"layout": [ "layout": [
{"matrix": [0, 0], "x": 0}, {"matrix": [0, 0], "x": 0, "y":0},
{"matrix": [0, 1], "x": 1}, {"matrix": [0, 1], "x": 1, "y":0},
{"matrix": [0, 2], "x": 2}, {"matrix": [0, 2], "x": 2, "y":0},
{"matrix": [0, 3], "x": 3}, {"matrix": [0, 3], "x": 3, "y":0},
{"matrix": [0, 4], "x": 4}, {"matrix": [0, 4], "x": 4, "y":0},
{"matrix": [0, 5], "x": 5}, {"matrix": [0, 5], "x": 5, "y":0},
{"matrix": [0, 6], "x": 6}, {"matrix": [0, 6], "x": 6, "y":0},
{"matrix": [0, 7], "x": 7}, {"matrix": [0, 7], "x": 7, "y":0},
{"matrix": [0, 8], "x": 8}, {"matrix": [0, 8], "x": 8, "y":0},
{"matrix": [0, 9], "x": 9}, {"matrix": [0, 9], "x": 9, "y":0},
{"matrix": [0, 10], "x": 10}, {"matrix": [0, 10], "x": 10, "y":0},
{"matrix": [0, 11], "x": 11}, {"matrix": [0, 11], "x": 11, "y":0},
{"matrix": [0, 12], "x": 12}, {"matrix": [0, 12], "x": 12, "y":0},
{"matrix": [0, 13], "x": 13}, {"matrix": [0, 13], "x": 13, "y":0},
{"matrix": [0, 14], "x": 14}, {"matrix": [0, 14], "x": 14, "y":0},
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
{"matrix": [1, 1], "x": 1.5, "y": 1}, {"matrix": [1, 1], "x": 1.5, "y": 1},
{"matrix": [1, 2], "x": 2.5, "y": 1}, {"matrix": [1, 2], "x": 2.5, "y": 1},
@ -534,20 +534,20 @@
}, },
"LAYOUT_tkl_iso_tsangan": { "LAYOUT_tkl_iso_tsangan": {
"layout": [ "layout": [
{"matrix": [0, 0], "x": 0}, {"matrix": [0, 0], "x": 0, "y":0},
{"matrix": [0, 1], "x": 1}, {"matrix": [0, 1], "x": 1, "y":0},
{"matrix": [0, 2], "x": 2}, {"matrix": [0, 2], "x": 2, "y":0},
{"matrix": [0, 3], "x": 3}, {"matrix": [0, 3], "x": 3, "y":0},
{"matrix": [0, 4], "x": 4}, {"matrix": [0, 4], "x": 4, "y":0},
{"matrix": [0, 5], "x": 5}, {"matrix": [0, 5], "x": 5, "y":0},
{"matrix": [0, 6], "x": 6}, {"matrix": [0, 6], "x": 6, "y":0},
{"matrix": [0, 7], "x": 7}, {"matrix": [0, 7], "x": 7, "y":0},
{"matrix": [0, 8], "x": 8}, {"matrix": [0, 8], "x": 8, "y":0},
{"matrix": [0, 9], "x": 9}, {"matrix": [0, 9], "x": 9, "y":0},
{"matrix": [0, 10], "x": 10}, {"matrix": [0, 10], "x": 10, "y":0},
{"matrix": [0, 11], "x": 11}, {"matrix": [0, 11], "x": 11, "y":0},
{"matrix": [0, 12], "x": 12}, {"matrix": [0, 12], "x": 12, "y":0},
{"matrix": [0, 13], "x": 13, "w": 2}, {"matrix": [0, 13], "x": 13, "y":0},
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
{"matrix": [1, 1], "x": 1.5, "y": 1}, {"matrix": [1, 1], "x": 1.5, "y": 1},
{"matrix": [1, 2], "x": 2.5, "y": 1}, {"matrix": [1, 2], "x": 2.5, "y": 1},
@ -599,21 +599,21 @@
}, },
"LAYOUT_tkl_iso_tsangan_split_bs_rshift": { "LAYOUT_tkl_iso_tsangan_split_bs_rshift": {
"layout": [ "layout": [
{"matrix": [0, 0], "x": 0}, {"matrix": [0, 0], "x": 0, "y":0},
{"matrix": [0, 1], "x": 1}, {"matrix": [0, 1], "x": 1, "y":0},
{"matrix": [0, 2], "x": 2}, {"matrix": [0, 2], "x": 2, "y":0},
{"matrix": [0, 3], "x": 3}, {"matrix": [0, 3], "x": 3, "y":0},
{"matrix": [0, 4], "x": 4}, {"matrix": [0, 4], "x": 4, "y":0},
{"matrix": [0, 5], "x": 5}, {"matrix": [0, 5], "x": 5, "y":0},
{"matrix": [0, 6], "x": 6}, {"matrix": [0, 6], "x": 6, "y":0},
{"matrix": [0, 7], "x": 7}, {"matrix": [0, 7], "x": 7, "y":0},
{"matrix": [0, 8], "x": 8}, {"matrix": [0, 8], "x": 8, "y":0},
{"matrix": [0, 9], "x": 9}, {"matrix": [0, 9], "x": 9, "y":0},
{"matrix": [0, 10], "x": 10}, {"matrix": [0, 10], "x": 10, "y":0},
{"matrix": [0, 11], "x": 11}, {"matrix": [0, 11], "x": 11, "y":0},
{"matrix": [0, 12], "x": 12}, {"matrix": [0, 12], "x": 12, "y":0},
{"matrix": [0, 13], "x": 13}, {"matrix": [0, 13], "x": 13, "y":0},
{"matrix": [0, 14], "x": 14}, {"matrix": [0, 14], "x": 14, "y":0},
{"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
{"matrix": [1, 1], "x": 1.5, "y": 1}, {"matrix": [1, 1], "x": 1.5, "y": 1},
{"matrix": [1, 2], "x": 2.5, "y": 1}, {"matrix": [1, 2], "x": 2.5, "y": 1},

View File

@ -38,6 +38,9 @@ void matrix_init_kb(void) {
// put your keyboard start-up code here // put your keyboard start-up code here
// runs once when the firmware starts up // runs once when the firmware starts up
led_matrix_set_value(0, 0);
led_matrix_set_value(1, 0);
led_matrix_set_value(2, 0);
led_matrix_set_value(3, 255); led_matrix_set_value(3, 255);
led_matrix_set_value(4, 255); led_matrix_set_value(4, 255);
led_matrix_set_value(5, 255); led_matrix_set_value(5, 255);
@ -46,12 +49,12 @@ void matrix_init_kb(void) {
matrix_init_user(); matrix_init_user();
} }
bool led_update_kb(led_t led_state) { bool led_matrix_indicators_kb(void) {
bool res = led_update_user(led_state); bool res = led_update_user(host_keyboard_led_state());
if (res) { if (res) {
led_matrix_set_value(0, led_state.caps_lock * 255); led_matrix_set_value(0, host_keyboard_led_state().caps_lock * 255);
led_matrix_set_value(1, led_state.num_lock * 255); led_matrix_set_value(1, host_keyboard_led_state().num_lock * 255);
led_matrix_set_value(2, led_state.scroll_lock * 255); led_matrix_set_value(2, host_keyboard_led_state().scroll_lock * 255);
} }
return res; return res;
} }
@ -67,8 +70,8 @@ layer_state_t layer_state_set_kb(layer_state_t state) {
break; break;
case 2: case 2:
led_matrix_set_value(3, 0); led_matrix_set_value(3, 0);
led_matrix_set_value(4, 255; led_matrix_set_value(4, 255);
led_matrix_set_value(5, 0; led_matrix_set_value(5, 0);
led_matrix_set_value(6, 0); led_matrix_set_value(6, 0);
led_matrix_set_value(7, 0); led_matrix_set_value(7, 0);
break; break;