summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2024-06-22 12:14:07 +0100
committerGitHub <noreply@github.com>2024-06-22 12:14:07 +0100
commit17498fa48a8c5c0ac439e59d0db12a41954d4fb0 (patch)
tree2d557e5d6c251df5b48374e5cab2522d4d51ec80
parentcb39df273de782be1145dc5184bfd47d823531d5 (diff)
Migrate `led_update_kb` implementations to DD (#23981)
-rw-r--r--keyboards/ai03/vega/keyboard.json5
-rw-r--r--keyboards/ai03/vega/vega.c37
-rw-r--r--keyboards/bioi/g60/g60.c28
-rw-r--r--keyboards/bioi/g60/keyboard.json4
-rw-r--r--keyboards/bioi/morgan65/keyboard.json4
-rw-r--r--keyboards/bioi/morgan65/morgan65.c28
-rw-r--r--keyboards/bioi/s65/keyboard.json4
-rw-r--r--keyboards/bioi/s65/s65.c27
-rw-r--r--keyboards/clueboard/2x1800/2019/2019.c14
-rw-r--r--keyboards/clueboard/2x1800/2019/keyboard.json6
-rw-r--r--keyboards/duck/orion/v3/keyboard.json6
-rw-r--r--keyboards/duck/orion/v3/matrix.c13
-rw-r--r--keyboards/duck/orion/v3/v3.c39
-rw-r--r--keyboards/ealdin/quadrant/keyboard.json3
-rw-r--r--keyboards/ealdin/quadrant/quadrant.c13
-rw-r--r--keyboards/handwired/jtallbean/split_65/keyboard.json3
-rw-r--r--keyboards/handwired/jtallbean/split_65/split_65.c43
-rw-r--r--keyboards/handwired/prime_exl_plus/keyboard.json4
-rw-r--r--keyboards/handwired/prime_exl_plus/prime_exl_plus.c19
-rw-r--r--keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c36
-rw-r--r--keyboards/ibm/model_m/ashpil_usbc/keyboard.json6
-rw-r--r--keyboards/ibm/model_m/teensypp/keyboard.json6
-rw-r--r--keyboards/ibm/model_m/teensypp/teensypp.c36
-rw-r--r--keyboards/ibm/model_m/yugo_m/keyboard.json6
-rw-r--r--keyboards/ibm/model_m/yugo_m/yugo_m.c35
-rw-r--r--keyboards/jels/jels88/jels88.c38
-rw-r--r--keyboards/jels/jels88/keyboard.json4
-rw-r--r--keyboards/kbdfans/bella/soldered/keyboard.json4
-rwxr-xr-xkeyboards/kbdfans/bella/soldered/soldered.c28
-rw-r--r--keyboards/kbdfans/maja_soldered/keyboard.json4
-rwxr-xr-xkeyboards/kbdfans/maja_soldered/maja_soldered.c29
-rw-r--r--keyboards/kopibeng/mnk88/mnk88.c36
-rw-r--r--keyboards/kopibeng/xt8x/xt8x.c15
-rw-r--r--keyboards/mc_76k/keyboard.json4
-rw-r--r--keyboards/mc_76k/mc_76k.c34
-rw-r--r--keyboards/viktus/sp111/keyboard.json5
-rw-r--r--keyboards/viktus/sp111/sp111.c18
-rw-r--r--keyboards/wilba_tech/wt69_a/keyboard.json3
-rw-r--r--keyboards/wilba_tech/wt69_a/wt69_a.c30
-rw-r--r--keyboards/wilba_tech/wt70_jb/keyboard.json3
-rw-r--r--keyboards/wilba_tech/wt70_jb/wt70_jb.c13
-rw-r--r--keyboards/wuque/ikki68/ikki68.c30
-rw-r--r--keyboards/wuque/ikki68/keyboard.json4
-rw-r--r--keyboards/ymdk/yd60mq/info.json4
-rw-r--r--keyboards/ymdk/yd60mq/yd60mq.c21
45 files changed, 94 insertions, 658 deletions
diff --git a/keyboards/ai03/vega/keyboard.json b/keyboards/ai03/vega/keyboard.json
index a58fa4fcae..bc220cc7a1 100644
--- a/keyboards/ai03/vega/keyboard.json
+++ b/keyboards/ai03/vega/keyboard.json
@@ -22,6 +22,11 @@
22 "resync": true 22 "resync": true
23 } 23 }
24 }, 24 },
25 "indicators": {
26 "caps_lock": "B7",
27 "scroll_lock": "A5",
28 "on_state": 0
29 },
25 "matrix_pins": { 30 "matrix_pins": {
26 "cols": ["B5", "A3", "A9", "A8", "B15", "B14", "B13", "B12", "B11", "B10", "B2", "B1", "B0", "A7", "A6"], 31 "cols": ["B5", "A3", "A9", "A8", "B15", "B14", "B13", "B12", "B11", "B10", "B2", "B1", "B0", "A7", "A6"],
27 "rows": ["A1", "A2", "B3", "A15", "A10"] 32 "rows": ["A1", "A2", "B3", "A15", "A10"]
diff --git a/keyboards/ai03/vega/vega.c b/keyboards/ai03/vega/vega.c
deleted file mode 100644
index 44ded2c85c..0000000000
--- a/keyboards/ai03/vega/vega.c
+++ /dev/null
@@ -1,37 +0,0 @@
1/* Copyright 2020 ai03
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "quantum.h"
18
19void matrix_init_kb(void) {
20 // Initialize indicator LEDs to output
21
22 gpio_set_pin_output(B7); // Caps
23 gpio_set_pin_output(A5); // Slck
24
25 matrix_init_user();
26}
27
28bool led_update_kb(led_t led_state) {
29
30 bool res = led_update_user(led_state);
31
32 if(res) {
33 gpio_write_pin(B7, !led_state.caps_lock);
34 gpio_write_pin(A5, !led_state.scroll_lock);
35 }
36 return res;
37} \ No newline at end of file
diff --git a/keyboards/bioi/g60/g60.c b/keyboards/bioi/g60/g60.c
deleted file mode 100644
index 3fdfef8897..0000000000
--- a/keyboards/bioi/g60/g60.c
+++ /dev/null
@@ -1,28 +0,0 @@
1/*
2Copyright 2019 Basic I/O Instruments(Scott Wei) <scot.wei@gmail.com>
3This program is free software: you can redistribute it and/or modify
4it under the terms of the GNU General Public License as published by
5the Free Software Foundation, either version 2 of the License, or
6(at your option) any later version.
7This program is distributed in the hope that it will be useful,
8but WITHOUT ANY WARRANTY; without even the implied warranty of
9MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10GNU General Public License for more details.
11You should have received a copy of the GNU General Public License
12along with this program. If not, see <http://www.gnu.org/licenses/>.
13*/
14
15#include "quantum.h"
16
17void keyboard_pre_init_kb(void) {
18 gpio_set_pin_output(F0);
19 gpio_write_pin_high(F0);
20 keyboard_pre_init_user();
21}
22
23bool led_update_kb(led_t led_state) {
24 if (led_update_user(led_state)) {
25 gpio_write_pin(F0, !led_state.caps_lock);
26 }
27 return true;
28}
diff --git a/keyboards/bioi/g60/keyboard.json b/keyboards/bioi/g60/keyboard.json
index 8d3dd58770..b98aee8273 100644
--- a/keyboards/bioi/g60/keyboard.json
+++ b/keyboards/bioi/g60/keyboard.json
@@ -35,6 +35,10 @@
35 "pin": "B7", 35 "pin": "B7",
36 "levels": 12 36 "levels": 12
37 }, 37 },
38 "indicators": {
39 "caps_lock": "F0",
40 "on_state": 0
41 },
38 "rgblight": { 42 "rgblight": {
39 "saturation_steps": 8, 43 "saturation_steps": 8,
40 "brightness_steps": 8, 44 "brightness_steps": 8,
diff --git a/keyboards/bioi/morgan65/keyboard.json b/keyboards/bioi/morgan65/keyboard.json
index 8f83237f82..5606233f2a 100644
--- a/keyboards/bioi/morgan65/keyboard.json
+++ b/keyboards/bioi/morgan65/keyboard.json
@@ -35,6 +35,10 @@
35 "pin": "B6", 35 "pin": "B6",
36 "levels": 12 36 "levels": 12
37 }, 37 },
38 "indicators": {
39 "caps_lock": "F0",
40 "on_state": 0
41 },
38 "rgblight": { 42 "rgblight": {
39 "saturation_steps": 8, 43 "saturation_steps": 8,
40 "brightness_steps": 8, 44 "brightness_steps": 8,
diff --git a/keyboards/bioi/morgan65/morgan65.c b/keyboards/bioi/morgan65/morgan65.c
deleted file mode 100644
index 3fdfef8897..0000000000
--- a/keyboards/bioi/morgan65/morgan65.c
+++ /dev/null
@@ -1,28 +0,0 @@
1/*
2Copyright 2019 Basic I/O Instruments(Scott Wei) <scot.wei@gmail.com>
3This program is free software: you can redistribute it and/or modify
4it under the terms of the GNU General Public License as published by
5the Free Software Foundation, either version 2 of the License, or
6(at your option) any later version.
7This program is distributed in the hope that it will be useful,
8but WITHOUT ANY WARRANTY; without even the implied warranty of
9MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10GNU General Public License for more details.
11You should have received a copy of the GNU General Public License
12along with this program. If not, see <http://www.gnu.org/licenses/>.
13*/
14
15#include "quantum.h"
16
17void keyboard_pre_init_kb(void) {
18 gpio_set_pin_output(F0);
19 gpio_write_pin_high(F0);
20 keyboard_pre_init_user();
21}
22
23bool led_update_kb(led_t led_state) {
24 if (led_update_user(led_state)) {
25 gpio_write_pin(F0, !led_state.caps_lock);
26 }
27 return true;
28}
diff --git a/keyboards/bioi/s65/keyboard.json b/keyboards/bioi/s65/keyboard.json
index c55852f31c..56d53b54cf 100644
--- a/keyboards/bioi/s65/keyboard.json
+++ b/keyboards/bioi/s65/keyboard.json
@@ -35,6 +35,10 @@
35 "pin": "B6", 35 "pin": "B6",
36 "levels": 12 36 "levels": 12
37 }, 37 },
38 "indicators": {
39 "caps_lock": "F0",
40 "on_state": 0
41 },
38 "rgblight": { 42 "rgblight": {
39 "saturation_steps": 8, 43 "saturation_steps": 8,
40 "brightness_steps": 8, 44 "brightness_steps": 8,
diff --git a/keyboards/bioi/s65/s65.c b/keyboards/bioi/s65/s65.c
deleted file mode 100644
index e632f31eeb..0000000000
--- a/keyboards/bioi/s65/s65.c
+++ /dev/null
@@ -1,27 +0,0 @@
1/*
2Copyright 2019 Basic I/O Instruments(Scott Wei) <scot.wei@gmail.com>
3This program is free software: you can redistribute it and/or modify
4it under the terms of the GNU General Public License as published by
5the Free Software Foundation, either version 2 of the License, or
6(at your option) any later version.
7This program is distributed in the hope that it will be useful,
8but WITHOUT ANY WARRANTY; without even the implied warranty of
9MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10GNU General Public License for more details.
11You should have received a copy of the GNU General Public License
12along with this program. If not, see <http://www.gnu.org/licenses/>.
13*/
14
15#include "quantum.h"
16void keyboard_pre_init_kb(void) {
17 gpio_set_pin_output(F0);
18 gpio_write_pin_high(F0);
19 keyboard_pre_init_user();
20}
21
22bool led_update_kb(led_t led_state) {
23 if (led_update_user(led_state)) {
24 gpio_write_pin(F0, !led_state.caps_lock);
25 }
26 return true;
27}
diff --git a/keyboards/clueboard/2x1800/2019/2019.c b/keyboards/clueboard/2x1800/2019/2019.c
index 8b0ba6a71e..3fe170af99 100644
--- a/keyboards/clueboard/2x1800/2019/2019.c
+++ b/keyboards/clueboard/2x1800/2019/2019.c
@@ -18,9 +18,6 @@
18void matrix_init_kb(void) { 18void matrix_init_kb(void) {
19 // Set our LED pins as output 19 // Set our LED pins as output
20 gpio_set_pin_output(D6); 20 gpio_set_pin_output(D6);
21 gpio_set_pin_output(B4);
22 gpio_set_pin_output(B5);
23 gpio_set_pin_output(B6);
24 21
25 // Set our Tilt Sensor pins as input 22 // Set our Tilt Sensor pins as input
26 gpio_set_pin_input_high(SHAKE_PIN_A); 23 gpio_set_pin_input_high(SHAKE_PIN_A);
@@ -133,17 +130,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
133 return process_record_user(keycode, record); 130 return process_record_user(keycode, record);
134} 131}
135 132
136bool led_update_kb(led_t led_state) {
137 bool res = led_update_user(led_state);
138 if(res) {
139 gpio_write_pin(B4, !led_state.num_lock);
140 gpio_write_pin(B5, !led_state.caps_lock);
141 gpio_write_pin(B6, !led_state.scroll_lock);
142 }
143
144 return res;
145}
146
147__attribute__((weak)) bool encoder_update_keymap(uint8_t index, bool clockwise) { return true; } 133__attribute__((weak)) bool encoder_update_keymap(uint8_t index, bool clockwise) { return true; }
148__attribute__((weak)) bool encoder_update_user(uint8_t index, bool clockwise) { return encoder_update_keymap(index, clockwise); } 134__attribute__((weak)) bool encoder_update_user(uint8_t index, bool clockwise) { return encoder_update_keymap(index, clockwise); }
149 135
diff --git a/keyboards/clueboard/2x1800/2019/keyboard.json b/keyboards/clueboard/2x1800/2019/keyboard.json
index 6f33a11ca7..31ff448d17 100644
--- a/keyboards/clueboard/2x1800/2019/keyboard.json
+++ b/keyboards/clueboard/2x1800/2019/keyboard.json
@@ -32,6 +32,12 @@
32 {"pin_a": "A1", "pin_b": "A0"} 32 {"pin_a": "A1", "pin_b": "A0"}
33 ] 33 ]
34 }, 34 },
35 "indicators": {
36 "caps_lock": "B5",
37 "num_lock": "B4",
38 "scroll_lock": "B6",
39 "on_state": 0
40 },
35 "layout_aliases": { 41 "layout_aliases": {
36 "LAYOUT": "LAYOUT_all" 42 "LAYOUT": "LAYOUT_all"
37 }, 43 },
diff --git a/keyboards/duck/orion/v3/keyboard.json b/keyboards/duck/orion/v3/keyboard.json
index 280cd8b07f..ba479aa0a2 100644
--- a/keyboards/duck/orion/v3/keyboard.json
+++ b/keyboards/duck/orion/v3/keyboard.json
@@ -16,6 +16,12 @@
16 "bootmagic": { 16 "bootmagic": {
17 "matrix": [4, 10] 17 "matrix": [4, 10]
18 }, 18 },
19 "indicators": {
20 "caps_lock": "B0",
21 "num_lock": "B4",
22 "scroll_lock": "D7",
23 "on_state": 0
24 },
19 "rgblight": { 25 "rgblight": {
20 "led_count": 18, 26 "led_count": 18,
21 "animations": { 27 "animations": {
diff --git a/keyboards/duck/orion/v3/matrix.c b/keyboards/duck/orion/v3/matrix.c
index 1dd07a6567..acd4fe0349 100644
--- a/keyboards/duck/orion/v3/matrix.c
+++ b/keyboards/duck/orion/v3/matrix.c
@@ -53,20 +53,7 @@ __attribute__ ((weak))
53void matrix_scan_user(void) { 53void matrix_scan_user(void) {
54} 54}
55 55
56void indicator_init_ports(void) {
57
58 // Num LED
59 gpio_set_pin_output(B4);
60
61 // Caps Lock
62 gpio_set_pin_output(B0);
63
64 // Scroll Lock
65 gpio_set_pin_output(D7);
66}
67
68void matrix_init(void) { 56void matrix_init(void) {
69 indicator_init_ports();
70 unselect_cols(); 57 unselect_cols();
71 init_rows(); 58 init_rows();
72 59
diff --git a/keyboards/duck/orion/v3/v3.c b/keyboards/duck/orion/v3/v3.c
deleted file mode 100644
index c0ca9ddd06..0000000000
--- a/keyboards/duck/orion/v3/v3.c
+++ /dev/null
@@ -1,39 +0,0 @@
1/* Copyright 2019 MechMerlin <mechmerlin@gmail.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include "quantum.h"
17#include "indicator_leds.h"
18
19// Alphas PB1
20// Navigation Cluster: PB2
21// Number Row, Mods: PB3
22// Function Row: PE6
23
24// Other than using RGB or LED matrix, QMK cannot turn on specific zones
25// of backlight LEDs. Unfortunately, Duck PCBs do not follow this design
26// and instead use multiple pins connected to each of these zones. QMK is
27// only able to control them ALL with the current default mechanisms.
28
29// Locking indicator LEDs
30// The Duck Orion V3 has 3 locking indicator LEDs and are located to the right
31// of the Escape key.
32bool led_update_kb(led_t led_state) {
33 if(led_update_user(led_state)) {
34 gpio_write_pin(B0, !led_state.caps_lock);
35 gpio_write_pin(B4, !led_state.num_lock);
36 gpio_write_pin(D7, !led_state.scroll_lock);
37 }
38 return true;
39}
diff --git a/keyboards/ealdin/quadrant/keyboard.json b/keyboards/ealdin/quadrant/keyboard.json
index 9f7a6143d2..7a8bcf0db2 100644
--- a/keyboards/ealdin/quadrant/keyboard.json
+++ b/keyboards/ealdin/quadrant/keyboard.json
@@ -34,6 +34,9 @@
34 {"pin_a": "D5", "pin_b": "F1"} 34 {"pin_a": "D5", "pin_b": "F1"}
35 ] 35 ]
36 }, 36 },
37 "indicators": {
38 "caps_lock": "F0"
39 },
37 "rgblight": { 40 "rgblight": {
38 "saturation_steps": 8, 41 "saturation_steps": 8,
39 "brightness_steps": 8, 42 "brightness_steps": 8,
diff --git a/keyboards/ealdin/quadrant/quadrant.c b/keyboards/ealdin/quadrant/quadrant.c
index 23be00b96f..328c92e02e 100644
--- a/keyboards/ealdin/quadrant/quadrant.c
+++ b/keyboards/ealdin/quadrant/quadrant.c
@@ -52,16 +52,3 @@ bool encoder_update_kb(uint8_t index, bool clockwise) {
52 } 52 }
53 return true; 53 return true;
54} 54}
55
56void keyboard_pre_init_kb(void) {
57 gpio_set_pin_output(F0);
58
59 keyboard_pre_init_user();
60}
61
62bool led_update_kb(led_t led_state) {
63 if (led_update_user(led_state)) {
64 gpio_write_pin(F0, led_state.caps_lock);
65 }
66 return true;
67}
diff --git a/keyboards/handwired/jtallbean/split_65/keyboard.json b/keyboards/handwired/jtallbean/split_65/keyboard.json
index c8be82da8d..b6560fb03a 100644
--- a/keyboards/handwired/jtallbean/split_65/keyboard.json
+++ b/keyboards/handwired/jtallbean/split_65/keyboard.json
@@ -27,6 +27,9 @@
27 "rows": ["F4", "F1", "F0", "C7", "B6"] 27 "rows": ["F4", "F1", "F0", "C7", "B6"]
28 }, 28 },
29 "diode_direction": "COL2ROW", 29 "diode_direction": "COL2ROW",
30 "indicators": {
31 "caps_lock": "B0"
32 },
30 "split": { 33 "split": {
31 "enabled": true, 34 "enabled": true,
32 "soft_serial_pin": "D0", 35 "soft_serial_pin": "D0",
diff --git a/keyboards/handwired/jtallbean/split_65/split_65.c b/keyboards/handwired/jtallbean/split_65/split_65.c
deleted file mode 100644
index b75b12137f..0000000000
--- a/keyboards/handwired/jtallbean/split_65/split_65.c
+++ /dev/null
@@ -1,43 +0,0 @@
1/* Copyright 2020 jtallbean
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "quantum.h"
18
19// Optional override functions below.
20// You can leave any or all of these undefined.
21// These are only required if you want to perform custom actions.
22
23void matrix_init_kb(void) {
24 // put your keyboard start-up code here
25 // runs once when the firmware starts up
26
27 // Set our LED pins as output
28 gpio_set_pin_output(B0);
29 gpio_write_pin_low(B0);
30
31 matrix_init_user();
32}
33
34bool led_update_kb(led_t led_state) {
35 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
36
37 bool res = led_update_user(led_state);
38 if(res) {
39 // gpio_write_pin sets the pin high for 1 and low for 0.
40 gpio_write_pin(B0, led_state.caps_lock);
41 }
42 return res;
43}
diff --git a/keyboards/handwired/prime_exl_plus/keyboard.json b/keyboards/handwired/prime_exl_plus/keyboard.json
index 43825a0ad8..a234bceb02 100644
--- a/keyboards/handwired/prime_exl_plus/keyboard.json
+++ b/keyboards/handwired/prime_exl_plus/keyboard.json
@@ -8,6 +8,10 @@
8 "pid": "0x6579", 8 "pid": "0x6579",
9 "device_version": "0.0.1" 9 "device_version": "0.0.1"
10 }, 10 },
11 "indicators": {
12 "caps_lock": "B0",
13 "num_lock": "B1"
14 },
11 "rgblight": { 15 "rgblight": {
12 "led_count": 10, 16 "led_count": 10,
13 "animations": { 17 "animations": {
diff --git a/keyboards/handwired/prime_exl_plus/prime_exl_plus.c b/keyboards/handwired/prime_exl_plus/prime_exl_plus.c
index 1865b6c502..164c954b8b 100644
--- a/keyboards/handwired/prime_exl_plus/prime_exl_plus.c
+++ b/keyboards/handwired/prime_exl_plus/prime_exl_plus.c
@@ -16,32 +16,17 @@
16#include "quantum.h" 16#include "quantum.h"
17 17
18void matrix_init_kb(void) { 18void matrix_init_kb(void) {
19 // set CapsLock LED to output and low
20 gpio_set_pin_output(B0);
21 gpio_write_pin_low(B0);
22 // set NumLock LED to output and low
23 gpio_set_pin_output(B1);
24 gpio_write_pin_low(B1);
25 // set ScrollLock LED to output and low
26 gpio_set_pin_output(B2); 19 gpio_set_pin_output(B2);
27 gpio_write_pin_low(B2); 20 gpio_write_pin_low(B2);
28}
29 21
30bool led_update_kb(led_t led_state) { 22 matrix_init_user();
31 bool res = led_update_user(led_state);
32 if(res) {
33 gpio_write_pin(B1, led_state.num_lock);
34 gpio_write_pin(B0, led_state.caps_lock);
35 //gpio_write_pin(B2, led_state.scroll_lock);
36 }
37 return res;
38} 23}
39 24
40//function for layer indicator LED 25//function for layer indicator LED
41layer_state_t layer_state_set_kb(layer_state_t state) 26layer_state_t layer_state_set_kb(layer_state_t state)
42{ 27{
43 if (get_highest_layer(state) == 1) { 28 if (get_highest_layer(state) == 1) {
44 gpio_write_pin_high(B2); 29 gpio_write_pin_high(B2);
45 } else { 30 } else {
46 gpio_write_pin_low(B2); 31 gpio_write_pin_low(B2);
47 } 32 }
diff --git a/keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c b/keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c
deleted file mode 100644
index 8bdcfe070a..0000000000
--- a/keyboards/ibm/model_m/ashpil_usbc/ashpil_usbc.c
+++ /dev/null
@@ -1,36 +0,0 @@
1/* Copyright 2019 ashpil
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www./gnu.org/licenses/>.
15 */
16
17#include "quantum.h"
18
19void keyboard_pre_init_kb(void) {
20 /* Setting status LEDs pins to output and +5V (off) */
21 gpio_set_pin_output(D5);
22 gpio_set_pin_output(D6);
23 gpio_set_pin_output(D7);
24 gpio_write_pin_high(D5);
25 gpio_write_pin_high(D6);
26 gpio_write_pin_high(D7);
27}
28
29bool led_update_kb(led_t led_state) {
30 if(led_update_user(led_state)) {
31 gpio_write_pin(D5, !led_state.num_lock);
32 gpio_write_pin(D6, !led_state.caps_lock);
33 gpio_write_pin(D7, !led_state.scroll_lock);
34 }
35 return true;
36}
diff --git a/keyboards/ibm/model_m/ashpil_usbc/keyboard.json b/keyboards/ibm/model_m/ashpil_usbc/keyboard.json
index 451589017e..a43e16a04c 100644
--- a/keyboards/ibm/model_m/ashpil_usbc/keyboard.json
+++ b/keyboards/ibm/model_m/ashpil_usbc/keyboard.json
@@ -16,6 +16,12 @@
16 "mousekey": false, 16 "mousekey": false,
17 "nkro": false 17 "nkro": false
18 }, 18 },
19 "indicators": {
20 "caps_lock": "D6",
21 "num_lock": "D5",
22 "scroll_lock": "D7",
23 "on_state": 0
24 },
19 "matrix_pins": { 25 "matrix_pins": {
20 "cols": ["E6", "E7", "F0", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "A0", "A1", "A2", "A3", "A4", "A5"], 26 "cols": ["E6", "E7", "F0", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "A0", "A1", "A2", "A3", "A4", "A5"],
21 "rows": ["C7", "C6", "C5", "C4", "C3", "C2", "C1", "C0"] 27 "rows": ["C7", "C6", "C5", "C4", "C3", "C2", "C1", "C0"]
diff --git a/keyboards/ibm/model_m/teensypp/keyboard.json b/keyboards/ibm/model_m/teensypp/keyboard.json
index 4464a299f6..e77c43483b 100644
--- a/keyboards/ibm/model_m/teensypp/keyboard.json
+++ b/keyboards/ibm/model_m/teensypp/keyboard.json
@@ -8,6 +8,12 @@
8 "pid": "0x0000", 8 "pid": "0x0000",
9 "device_version": "0.0.1" 9 "device_version": "0.0.1"
10 }, 10 },
11 "indicators": {
12 "caps_lock": "B6",
13 "num_lock": "B4",
14 "scroll_lock": "B5",
15 "on_state": 0
16 },
11 "matrix_pins": { 17 "matrix_pins": {
12 "cols": ["C7", "C6", "C5", "C4", "C3", "C2", "C1", "C0", "E1", "E0", "D7", "D6", "D5", "D4", "D3", "D2"], 18 "cols": ["C7", "C6", "C5", "C4", "C3", "C2", "C1", "C0", "E1", "E0", "D7", "D6", "D5", "D4", "D3", "D2"],
13 "rows": ["F7", "F6", "F5", "F4", "F3", "F2", "F1", "F0"] 19 "rows": ["F7", "F6", "F5", "F4", "F3", "F2", "F1", "F0"]
diff --git a/keyboards/ibm/model_m/teensypp/teensypp.c b/keyboards/ibm/model_m/teensypp/teensypp.c
deleted file mode 100644
index aac85424bf..0000000000
--- a/keyboards/ibm/model_m/teensypp/teensypp.c
+++ /dev/null
@@ -1,36 +0,0 @@
1/* Copyright 2019 iw0rm3r
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include "quantum.h"
17
18void led_init_ports(void) {
19 /* Setting status LEDs pins to output and +5V (off) */
20 gpio_set_pin_output(B4);
21 gpio_set_pin_output(B5);
22 gpio_set_pin_output(B6);
23 gpio_write_pin_high(B4);
24 gpio_write_pin_high(B5);
25 gpio_write_pin_high(B6);
26}
27
28bool led_update_kb(led_t led_state) {
29 bool res = led_update_user(led_state);
30 if(res) {
31 gpio_write_pin(B4, !led_state.num_lock);
32 gpio_write_pin(B6, !led_state.caps_lock);
33 gpio_write_pin(B5, !led_state.scroll_lock);
34 }
35 return res;
36}
diff --git a/keyboards/ibm/model_m/yugo_m/keyboard.json b/keyboards/ibm/model_m/yugo_m/keyboard.json
index 968c637b78..10fe637f03 100644
--- a/keyboards/ibm/model_m/yugo_m/keyboard.json
+++ b/keyboards/ibm/model_m/yugo_m/keyboard.json
@@ -16,6 +16,12 @@
16 "mousekey": true, 16 "mousekey": true,
17 "nkro": false 17 "nkro": false
18 }, 18 },
19 "indicators": {
20 "caps_lock": "A1",
21 "num_lock": "A2",
22 "scroll_lock": "A0",
23 "on_state": 0
24 },
19 "matrix_pins": { 25 "matrix_pins": {
20 "cols": ["A9", "A8", "B15", "B14", "B13", "B12", "B11", "B10", "B2", "B1", "B0", "A7", "A6", "A5", "A4", "A3"], 26 "cols": ["A9", "A8", "B15", "B14", "B13", "B12", "B11", "B10", "B2", "B1", "B0", "A7", "A6", "A5", "A4", "A3"],
21 "rows": ["B8", "B7", "B6", "B5", "B4", "B3", "A15", "A14"] 27 "rows": ["B8", "B7", "B6", "B5", "B4", "B3", "A15", "A14"]
diff --git a/keyboards/ibm/model_m/yugo_m/yugo_m.c b/keyboards/ibm/model_m/yugo_m/yugo_m.c
deleted file mode 100644
index a725a3657b..0000000000
--- a/keyboards/ibm/model_m/yugo_m/yugo_m.c
+++ /dev/null
@@ -1,35 +0,0 @@
1/* Copyright 2020 Nidzo Tomic <tomicn8@hotmail.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include "quantum.h"
17
18void keyboard_pre_init_kb(void) {
19 // Set our LED pins as output
20 gpio_set_pin_output(A2);
21 gpio_set_pin_output(A1);
22 gpio_set_pin_output(A0);
23
24 keyboard_pre_init_user();
25}
26
27bool led_update_kb(led_t led_state) {
28 bool res = led_update_user(led_state);
29 if(res) {
30 gpio_write_pin(A2, !led_state.num_lock);
31 gpio_write_pin(A1, !led_state.caps_lock);
32 gpio_write_pin(A0, !led_state.scroll_lock);
33 }
34 return res;
35}
diff --git a/keyboards/jels/jels88/jels88.c b/keyboards/jels/jels88/jels88.c
deleted file mode 100644
index ceb187ab17..0000000000
--- a/keyboards/jels/jels88/jels88.c
+++ /dev/null
@@ -1,38 +0,0 @@
1/* Copyright 2021 Joah Nelson (Jels)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17// not much here ... just indicator LEDs
18
19#include "quantum.h"
20
21// LED indicator pins
22#define CAPS_LED D5
23#define SCROLL_LED D4
24
25void keyboard_pre_init_kb(void) {
26 gpio_set_pin_output(CAPS_LED);
27 gpio_set_pin_output(SCROLL_LED);
28 keyboard_pre_init_user();
29}
30
31bool led_update_kb(led_t led_state) {
32 bool res = led_update_user(led_state);
33 if (res) {
34 gpio_write_pin(CAPS_LED, led_state.caps_lock);
35 gpio_write_pin(SCROLL_LED, led_state.scroll_lock);
36 }
37 return res;
38}
diff --git a/keyboards/jels/jels88/keyboard.json b/keyboards/jels/jels88/keyboard.json
index ee9b64ed6a..e4d2c6e273 100644
--- a/keyboards/jels/jels88/keyboard.json
+++ b/keyboards/jels/jels88/keyboard.json
@@ -23,6 +23,10 @@
23 "resync": true 23 "resync": true
24 } 24 }
25 }, 25 },
26 "indicators": {
27 "caps_lock": "D5",
28 "scroll_lock": "D4"
29 },
26 "matrix_pins": { 30 "matrix_pins": {
27 "cols": ["C7", "C6", "F7", "F6", "F5", "F4", "B1", "D2", "D3"], 31 "cols": ["C7", "C6", "F7", "F6", "F5", "F4", "B1", "D2", "D3"],
28 "rows": ["B3", "B2", "D1", "D0", "E6", "B0", "F0", "F1", "B5", "B4", "D7", "D6"] 32 "rows": ["B3", "B2", "D1", "D0", "E6", "B0", "F0", "F1", "B5", "B4", "D7", "D6"]
diff --git a/keyboards/kbdfans/bella/soldered/keyboard.json b/keyboards/kbdfans/bella/soldered/keyboard.json
index 31d8e9ffb7..aa5d915980 100644
--- a/keyboards/kbdfans/bella/soldered/keyboard.json
+++ b/keyboards/kbdfans/bella/soldered/keyboard.json
@@ -31,6 +31,10 @@
31 "backlight": { 31 "backlight": {
32 "pin": "B7" 32 "pin": "B7"
33 }, 33 },
34 "indicators": {
35 "caps_lock": "E6",
36 "on_state": 0
37 },
34 "processor": "atmega32u4", 38 "processor": "atmega32u4",
35 "bootloader": "atmel-dfu", 39 "bootloader": "atmel-dfu",
36 "layouts": { 40 "layouts": {
diff --git a/keyboards/kbdfans/bella/soldered/soldered.c b/keyboards/kbdfans/bella/soldered/soldered.c
deleted file mode 100755
index bfe9f8f5d4..0000000000
--- a/keyboards/kbdfans/bella/soldered/soldered.c
+++ /dev/null
@@ -1,28 +0,0 @@
1/* Copyright 2020 dztech
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include "quantum.h"
17void matrix_init_kb(void) {
18 gpio_set_pin_output(E6);
19 matrix_init_user();
20}
21
22bool led_update_kb(led_t led_state) {
23 bool res = led_update_user(led_state);
24 if(res) {
25 gpio_write_pin(E6, !led_state.caps_lock);
26 }
27 return res;
28}
diff --git a/keyboards/kbdfans/maja_soldered/keyboard.json b/keyboards/kbdfans/maja_soldered/keyboard.json
index bf73f04d8a..f182ef97d1 100644
--- a/keyboards/kbdfans/maja_soldered/keyboard.json
+++ b/keyboards/kbdfans/maja_soldered/keyboard.json
@@ -31,6 +31,10 @@
31 "backlight": { 31 "backlight": {
32 "pin": "B5" 32 "pin": "B5"
33 }, 33 },
34 "indicators": {
35 "caps_lock": "D4",
36 "on_state": 0
37 },
34 "processor": "atmega32u4", 38 "processor": "atmega32u4",
35 "bootloader": "atmel-dfu", 39 "bootloader": "atmel-dfu",
36 "debounce": 3, 40 "debounce": 3,
diff --git a/keyboards/kbdfans/maja_soldered/maja_soldered.c b/keyboards/kbdfans/maja_soldered/maja_soldered.c
deleted file mode 100755
index 41d80e2cc8..0000000000
--- a/keyboards/kbdfans/maja_soldered/maja_soldered.c
+++ /dev/null
@@ -1,29 +0,0 @@
1/* Copyright 2020 dztech kbdfans
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include "quantum.h"
17
18void matrix_init_kb(void) {
19 gpio_set_pin_output(D4);
20 matrix_init_user();
21}
22
23bool led_update_kb(led_t led_state) {
24 bool res = led_update_user(led_state);
25 if(res) {
26 gpio_write_pin(D4, !led_state.caps_lock);
27 }
28 return res;
29}
diff --git a/keyboards/kopibeng/mnk88/mnk88.c b/keyboards/kopibeng/mnk88/mnk88.c
deleted file mode 100644
index efe32f8bfd..0000000000
--- a/keyboards/kopibeng/mnk88/mnk88.c
+++ /dev/null
@@ -1,36 +0,0 @@
1/* Copyright 2021 Samuel Lu
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "quantum.h"
18
19void matrix_init_kb(void) {
20
21 gpio_set_pin_output(LED_CAPS_LOCK_PIN);
22 gpio_set_pin_output(LED_SCROLL_LOCK_PIN);
23
24 matrix_init_user();
25}
26
27bool led_update_kb(led_t led_state) {
28
29 bool res = led_update_user(led_state);
30
31 if(res) {
32 gpio_write_pin(LED_CAPS_LOCK_PIN, led_state.caps_lock);
33 gpio_write_pin(LED_SCROLL_LOCK_PIN, led_state.scroll_lock);
34 }
35 return res;
36}
diff --git a/keyboards/kopibeng/xt8x/xt8x.c b/keyboards/kopibeng/xt8x/xt8x.c
index 2c4f246b6a..03342c40af 100644
--- a/keyboards/kopibeng/xt8x/xt8x.c
+++ b/keyboards/kopibeng/xt8x/xt8x.c
@@ -17,26 +17,11 @@
17#include "quantum.h" 17#include "quantum.h"
18 18
19void matrix_init_kb(void) { 19void matrix_init_kb(void) {
20 // Initialize indicator LEDs to output
21
22 gpio_set_pin_output(LED_CAPS_LOCK_PIN); // Caps
23 gpio_set_pin_output(LED_SCROLL_LOCK_PIN); // Scroll lock
24 gpio_set_pin_output(INDICATOR_PIN_0); // Layer indicator on F13 20 gpio_set_pin_output(INDICATOR_PIN_0); // Layer indicator on F13
25 21
26 matrix_init_user(); 22 matrix_init_user();
27} 23}
28 24
29bool led_update_kb(led_t led_state) {
30
31 bool res = led_update_user(led_state);
32
33 if(res) {
34 gpio_write_pin(LED_CAPS_LOCK_PIN, led_state.caps_lock);
35 gpio_write_pin(LED_SCROLL_LOCK_PIN, led_state.scroll_lock);
36 }
37 return res;
38}
39
40__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { 25__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) {
41 gpio_write_pin(INDICATOR_PIN_0, layer_state_cmp(state, 1)); 26 gpio_write_pin(INDICATOR_PIN_0, layer_state_cmp(state, 1));
42 return state; 27 return state;
diff --git a/keyboards/mc_76k/keyboard.json b/keyboards/mc_76k/keyboard.json
index 049483bed9..18aef48d01 100644
--- a/keyboards/mc_76k/keyboard.json
+++ b/keyboards/mc_76k/keyboard.json
@@ -22,6 +22,10 @@
22 "resync": true 22 "resync": true
23 } 23 }
24 }, 24 },
25 "indicators": {
26 "caps_lock": "D2",
27 "on_state": 0
28 },
25 "matrix_pins": { 29 "matrix_pins": {
26 "cols": ["D5", "D3", "D4", "B1", "D6", "D7", "B4", "B5", "F7", "F6", "F5", "F4", "F1", "F0"], 30 "cols": ["D5", "D3", "D4", "B1", "D6", "D7", "B4", "B5", "F7", "F6", "F5", "F4", "F1", "F0"],
27 "rows": ["C7", "C6", "B6", "B0", "D1", "D0"] 31 "rows": ["C7", "C6", "B6", "B0", "D1", "D0"]
diff --git a/keyboards/mc_76k/mc_76k.c b/keyboards/mc_76k/mc_76k.c
deleted file mode 100644
index 44d2374b1c..0000000000
--- a/keyboards/mc_76k/mc_76k.c
+++ /dev/null
@@ -1,34 +0,0 @@
1/* Copyright 2020 Yiancar-Designs
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "quantum.h"
18
19void keyboard_pre_init_kb (void) {
20 gpio_set_pin_output(D2);
21}
22
23bool led_update_kb(led_t led_state) {
24 bool res = led_update_user(led_state);
25 if(res) {
26 // gpio_write_pin sets the pin high for 1 and low for 0.
27 // In this example the pins are inverted, setting
28 // it low/0 turns it on, and high/1 turns the LED off.
29 // This behavior depends on whether the LED is between the pin
30 // and VCC or the pin and GND.
31 gpio_write_pin(D2, !led_state.caps_lock);
32 }
33 return res;
34}
diff --git a/keyboards/viktus/sp111/keyboard.json b/keyboards/viktus/sp111/keyboard.json
index 8cf65a5522..91a70c284b 100644
--- a/keyboards/viktus/sp111/keyboard.json
+++ b/keyboards/viktus/sp111/keyboard.json
@@ -17,6 +17,11 @@
17 "mousekey": true, 17 "mousekey": true,
18 "nkro": true 18 "nkro": true
19 }, 19 },
20 "indicators": {
21 "caps_lock": "F1",
22 "num_lock": "F0",
23 "scroll_lock": "F4"
24 },
20 "qmk": { 25 "qmk": {
21 "locking": { 26 "locking": {
22 "enabled": true, 27 "enabled": true,
diff --git a/keyboards/viktus/sp111/sp111.c b/keyboards/viktus/sp111/sp111.c
index 1626683804..c2162429c1 100644
--- a/keyboards/viktus/sp111/sp111.c
+++ b/keyboards/viktus/sp111/sp111.c
@@ -22,21 +22,3 @@ void keyboard_pre_init_kb(void) {
22 22
23 keyboard_pre_init_user(); 23 keyboard_pre_init_user();
24} 24}
25
26void matrix_init_kb(void) {
27 gpio_set_pin_output(F0);
28 gpio_set_pin_output(F1);
29 gpio_set_pin_output(F4);
30
31 matrix_init_user();
32}
33
34bool led_update_kb(led_t led_state) {
35 bool res = led_update_user(led_state);
36 if (res) {
37 gpio_write_pin(F0, led_state.num_lock);
38 gpio_write_pin(F1, led_state.caps_lock);
39 gpio_write_pin(F4, led_state.scroll_lock);
40 }
41 return res;
42}
diff --git a/keyboards/wilba_tech/wt69_a/keyboard.json b/keyboards/wilba_tech/wt69_a/keyboard.json
index bbe6517850..d41f8fc90e 100644
--- a/keyboards/wilba_tech/wt69_a/keyboard.json
+++ b/keyboards/wilba_tech/wt69_a/keyboard.json
@@ -20,6 +20,9 @@
20 "resync": true 20 "resync": true
21 } 21 }
22 }, 22 },
23 "indicators": {
24 "caps_lock": "F1"
25 },
23 "matrix_pins": { 26 "matrix_pins": {
24 "cols": ["B7", "B0", "F5", "D5", "B1", "B2", "B3", "D3", "D2", "C7", "C6", "B6", "B5", "B4", "D7", "D6", "D4"], 27 "cols": ["B7", "B0", "F5", "D5", "B1", "B2", "B3", "D3", "D2", "C7", "C6", "B6", "B5", "B4", "D7", "D6", "D4"],
25 "rows": ["F0", "E6", "F4", "F6", "F7"] 28 "rows": ["F0", "E6", "F4", "F6", "F7"]
diff --git a/keyboards/wilba_tech/wt69_a/wt69_a.c b/keyboards/wilba_tech/wt69_a/wt69_a.c
deleted file mode 100644
index 842b62a4d1..0000000000
--- a/keyboards/wilba_tech/wt69_a/wt69_a.c
+++ /dev/null
@@ -1,30 +0,0 @@
1/* Copyright 2018 Jason Williams (Wilba)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "quantum.h"
18
19void keyboard_pre_init_kb(void) {
20 gpio_set_pin_output(F1);
21
22 keyboard_pre_init_user();
23}
24
25bool led_update_kb(led_t led_state) {
26 if (led_update_user(led_state)) {
27 gpio_write_pin(F1, led_state.caps_lock);
28 }
29 return true;
30}
diff --git a/keyboards/wilba_tech/wt70_jb/keyboard.json b/keyboards/wilba_tech/wt70_jb/keyboard.json
index bfa27f225b..f922810600 100644
--- a/keyboards/wilba_tech/wt70_jb/keyboard.json
+++ b/keyboards/wilba_tech/wt70_jb/keyboard.json
@@ -8,6 +8,9 @@
8 "pid": "0x001F", 8 "pid": "0x001F",
9 "device_version": "0.0.1" 9 "device_version": "0.0.1"
10 }, 10 },
11 "indicators": {
12 "caps_lock": "F1"
13 },
11 "rgblight": { 14 "rgblight": {
12 "saturation_steps": 8, 15 "saturation_steps": 8,
13 "brightness_steps": 8, 16 "brightness_steps": 8,
diff --git a/keyboards/wilba_tech/wt70_jb/wt70_jb.c b/keyboards/wilba_tech/wt70_jb/wt70_jb.c
index ae9b5dcbec..ad480ece22 100644
--- a/keyboards/wilba_tech/wt70_jb/wt70_jb.c
+++ b/keyboards/wilba_tech/wt70_jb/wt70_jb.c
@@ -17,19 +17,6 @@
17 17
18bool g_first_execution = false; 18bool g_first_execution = false;
19 19
20void keyboard_pre_init_kb(void) {
21 gpio_set_pin_output(F1);
22
23 keyboard_pre_init_user();
24}
25
26bool led_update_kb(led_t led_state) {
27 if (led_update_user(led_state)) {
28 gpio_write_pin(F1, led_state.caps_lock);
29 }
30 return true;
31}
32
33// This is some magic so that PCBs flashed with VIA firmware at the factory 20// This is some magic so that PCBs flashed with VIA firmware at the factory
34// will start with an RGB test pattern. Not relevant for non-VIA firmware. 21// will start with an RGB test pattern. Not relevant for non-VIA firmware.
35#ifdef VIA_ENABLE 22#ifdef VIA_ENABLE
diff --git a/keyboards/wuque/ikki68/ikki68.c b/keyboards/wuque/ikki68/ikki68.c
deleted file mode 100644
index 382ec00251..0000000000
--- a/keyboards/wuque/ikki68/ikki68.c
+++ /dev/null
@@ -1,30 +0,0 @@
1/* Copyright 2020 wuquestudio
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "quantum.h"
18
19void matrix_init_kb(void) {
20 gpio_set_pin_output(C6);
21
22 matrix_init_user();
23}
24bool led_update_kb(led_t led_state) {
25 bool res = led_update_user(led_state);
26 if(res) {
27 gpio_write_pin(C6, !led_state.caps_lock);
28 }
29 return res;
30}
diff --git a/keyboards/wuque/ikki68/keyboard.json b/keyboards/wuque/ikki68/keyboard.json
index c6070e74fa..d666b0b5de 100644
--- a/keyboards/wuque/ikki68/keyboard.json
+++ b/keyboards/wuque/ikki68/keyboard.json
@@ -8,6 +8,10 @@
8 "pid": "0x0003", 8 "pid": "0x0003",
9 "device_version": "0.0.1" 9 "device_version": "0.0.1"
10 }, 10 },
11 "indicators": {
12 "caps_lock": "C6",
13 "on_state": 0
14 },
11 "ws2812": { 15 "ws2812": {
12 "pin": "E2" 16 "pin": "E2"
13 }, 17 },
diff --git a/keyboards/ymdk/yd60mq/info.json b/keyboards/ymdk/yd60mq/info.json
index 4152ed6e07..1af04be687 100644
--- a/keyboards/ymdk/yd60mq/info.json
+++ b/keyboards/ymdk/yd60mq/info.json
@@ -32,6 +32,10 @@
32 "pin": "B7", 32 "pin": "B7",
33 "levels": 5 33 "levels": 5
34 }, 34 },
35 "indicators": {
36 "caps_lock": "F4",
37 "on_state": 0
38 },
35 "ws2812": { 39 "ws2812": {
36 "pin": "E2" 40 "pin": "E2"
37 }, 41 },
diff --git a/keyboards/ymdk/yd60mq/yd60mq.c b/keyboards/ymdk/yd60mq/yd60mq.c
deleted file mode 100644
index 40c899c46f..0000000000
--- a/keyboards/ymdk/yd60mq/yd60mq.c
+++ /dev/null
@@ -1,21 +0,0 @@
1#include "quantum.h"
2
3__attribute__((weak))
4void matrix_init_kb(void){
5 gpio_set_pin_output(F4);
6 gpio_write_pin_high(F4);
7}
8
9__attribute__((weak))
10bool led_update_kb(led_t led_state) {
11 bool res = led_update_user(led_state);
12 if (res) {
13 // gpio_write_pin sets the pin high for 1 and low for 0.
14 // In this example the pins are inverted, setting
15 // it low/0 turns it on, and high/1 turns the LED off.
16 // This behavior depends on whether the LED is between the pin
17 // and VCC or the pin and GND.
18 gpio_write_pin(F4, !led_state.caps_lock);
19 }
20 return res;
21}