summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2024-06-25 03:25:05 +0100
committerGitHub <noreply@github.com>2024-06-25 03:25:05 +0100
commita2176f6a039b5f92ba4cb473f7a2de560b57dd86 (patch)
treed463c13b44a4139b619c2b3e4a9abab929bd1465
parent751482580ed992acdbafc262c281e5d179cebe69 (diff)
Migrate `led_update_kb` implementations to DD (#23985)
-rw-r--r--keyboards/bear_face/info.json3
-rw-r--r--keyboards/bear_face/v1/v1.c34
-rw-r--r--keyboards/bear_face/v2/v2.c34
-rw-r--r--keyboards/dztech/bocc/bocc.c29
-rw-r--r--keyboards/dztech/bocc/keyboard.json4
-rw-r--r--keyboards/evyd13/gh80_3700/gh80_3700.c14
-rw-r--r--keyboards/evyd13/gh80_3700/keyboard.json4
-rw-r--r--keyboards/exclusive/e85/hotswap/hotswap.c32
-rw-r--r--keyboards/exclusive/e85/hotswap/keyboard.json4
-rw-r--r--keyboards/fjlabs/bolsa65/bolsa65.c28
-rw-r--r--keyboards/fjlabs/bolsa65/keyboard.json3
-rw-r--r--keyboards/flx/virgo/keyboard.json5
-rw-r--r--keyboards/flx/virgo/virgo.c34
-rw-r--r--keyboards/handwired/colorlice/colorlice.c15
-rw-r--r--keyboards/handwired/colorlice/keyboard.json6
-rw-r--r--keyboards/handwired/evk/v1_3/v1_3.c9
-rw-r--r--keyboards/handwired/retro_refit/keyboard.json6
-rw-r--r--keyboards/handwired/retro_refit/retro_refit.c12
-rw-r--r--keyboards/handwired/selene/keyboard.json5
-rw-r--r--keyboards/handwired/selene/selene.c18
-rw-r--r--keyboards/handwired/selene/selene.h23
-rw-r--r--keyboards/handwired/z150/config.h38
-rw-r--r--keyboards/handwired/z150/keyboard.json6
-rw-r--r--keyboards/handwired/z150/z150.c39
-rw-r--r--keyboards/kabedon/kabedon980/kabedon980.c8
-rw-r--r--keyboards/kabedon/kabedon980/keyboard.json4
-rw-r--r--keyboards/noxary/x268/keyboard.json3
-rw-r--r--keyboards/noxary/x268/x268.c34
-rw-r--r--keyboards/punk75/config.h20
-rw-r--r--keyboards/punk75/keyboard.json4
-rw-r--r--keyboards/punk75/keymaps/default/keymap.c2
-rw-r--r--keyboards/punk75/keymaps/via/keymap.c2
-rw-r--r--keyboards/punk75/punk75.c32
-rw-r--r--keyboards/redscarf_i/keyboard.json4
-rw-r--r--keyboards/redscarf_i/redscarf_i.c10
-rw-r--r--keyboards/sneakbox/aliceclone/aliceclone.c36
-rw-r--r--keyboards/sneakbox/aliceclone/keyboard.json5
-rw-r--r--keyboards/yiancardesigns/barleycorn/barleycorn.c37
-rw-r--r--keyboards/yiancardesigns/barleycorn/keyboard.json4
39 files changed, 77 insertions, 533 deletions
diff --git a/keyboards/bear_face/info.json b/keyboards/bear_face/info.json
index ad12468d56..ad5b1dd7d9 100644
--- a/keyboards/bear_face/info.json
+++ b/keyboards/bear_face/info.json
@@ -24,6 +24,9 @@
24 "resync": true 24 "resync": true
25 } 25 }
26 }, 26 },
27 "indicators": {
28 "caps_lock": "F7"
29 },
27 "matrix_pins": { 30 "matrix_pins": {
28 "cols": ["B5", "C7", "C6", "F0", "E6", "B7", "D0", "D1", "D2", "D3", "D5", "D4", "D6", "D7", "B4"], 31 "cols": ["B5", "C7", "C6", "F0", "E6", "B7", "D0", "D1", "D2", "D3", "D5", "D4", "D6", "D7", "B4"],
29 "rows": ["F5", "F6", "F4", "F1", "B0", "B6"] 32 "rows": ["F5", "F6", "F4", "F1", "B0", "B6"]
diff --git a/keyboards/bear_face/v1/v1.c b/keyboards/bear_face/v1/v1.c
deleted file mode 100644
index b64a63f0b4..0000000000
--- a/keyboards/bear_face/v1/v1.c
+++ /dev/null
@@ -1,34 +0,0 @@
1/*
2Copyright 2020 chemicalwill <https://github.com/chemicalwill>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#include "quantum.h"
19
20void keyboard_pre_init_kb(void) {
21 //Sets LED pin as output
22 gpio_set_pin_output(F7);
23
24 keyboard_pre_init_user();
25}
26
27bool led_update_kb(led_t led_state) {
28 // Caps Lock LED indicator toggling code here
29 bool res = led_update_user(led_state);
30 if(res) {
31 gpio_write_pin(F7, led_state.caps_lock);
32 }
33 return res;
34}
diff --git a/keyboards/bear_face/v2/v2.c b/keyboards/bear_face/v2/v2.c
deleted file mode 100644
index b64a63f0b4..0000000000
--- a/keyboards/bear_face/v2/v2.c
+++ /dev/null
@@ -1,34 +0,0 @@
1/*
2Copyright 2020 chemicalwill <https://github.com/chemicalwill>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#include "quantum.h"
19
20void keyboard_pre_init_kb(void) {
21 //Sets LED pin as output
22 gpio_set_pin_output(F7);
23
24 keyboard_pre_init_user();
25}
26
27bool led_update_kb(led_t led_state) {
28 // Caps Lock LED indicator toggling code here
29 bool res = led_update_user(led_state);
30 if(res) {
31 gpio_write_pin(F7, led_state.caps_lock);
32 }
33 return res;
34}
diff --git a/keyboards/dztech/bocc/bocc.c b/keyboards/dztech/bocc/bocc.c
deleted file mode 100644
index 646a7861f8..0000000000
--- a/keyboards/dztech/bocc/bocc.c
+++ /dev/null
@@ -1,29 +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"
17
18void matrix_init_kb(void) {
19 gpio_set_pin_output(E6);
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(E6, !led_state.caps_lock);
27 }
28 return res;
29}
diff --git a/keyboards/dztech/bocc/keyboard.json b/keyboards/dztech/bocc/keyboard.json
index 7e40fde49c..a6208b2bf7 100644
--- a/keyboards/dztech/bocc/keyboard.json
+++ b/keyboards/dztech/bocc/keyboard.json
@@ -33,6 +33,10 @@
33 "pin": "B7", 33 "pin": "B7",
34 "levels": 5 34 "levels": 5
35 }, 35 },
36 "indicators": {
37 "caps_lock": "E6",
38 "on_state": 0
39 },
36 "rgblight": { 40 "rgblight": {
37 "saturation_steps": 8, 41 "saturation_steps": 8,
38 "brightness_steps": 8, 42 "brightness_steps": 8,
diff --git a/keyboards/evyd13/gh80_3700/gh80_3700.c b/keyboards/evyd13/gh80_3700/gh80_3700.c
index 6d903e48e1..8c4c81fe64 100644
--- a/keyboards/evyd13/gh80_3700/gh80_3700.c
+++ b/keyboards/evyd13/gh80_3700/gh80_3700.c
@@ -15,24 +15,16 @@
15 */ 15 */
16#include "quantum.h" 16#include "quantum.h"
17 17
18void led_init_ports(void) { 18void keyboard_pre_init_kb(void) {
19 gpio_set_pin_output(E6);
20 gpio_set_pin_output(B1); 19 gpio_set_pin_output(B1);
21 gpio_set_pin_output(D0); 20 gpio_set_pin_output(D0);
22 gpio_set_pin_output(D1); 21 gpio_set_pin_output(D1);
23 gpio_set_pin_output(F0); 22 gpio_set_pin_output(F0);
24 23
25 gpio_write_pin_high(E6);
26 gpio_write_pin_high(B1); 24 gpio_write_pin_high(B1);
27 gpio_write_pin_high(D0); 25 gpio_write_pin_high(D0);
28 gpio_write_pin_high(D1); 26 gpio_write_pin_high(D1);
29 gpio_write_pin_high(F0); 27 gpio_write_pin_high(F0);
30}
31
32bool led_update_kb(led_t led_state) {
33 if(led_update_user(led_state)) {
34 gpio_write_pin(E6, !led_state.num_lock);
35 }
36 28
37 return true; 29 keyboard_pre_init_user();
38} \ No newline at end of file 30}
diff --git a/keyboards/evyd13/gh80_3700/keyboard.json b/keyboards/evyd13/gh80_3700/keyboard.json
index fa11a482df..a647f46118 100644
--- a/keyboards/evyd13/gh80_3700/keyboard.json
+++ b/keyboards/evyd13/gh80_3700/keyboard.json
@@ -23,6 +23,10 @@
23 "resync": true 23 "resync": true
24 } 24 }
25 }, 25 },
26 "indicators": {
27 "num_lock": "E6",
28 "on_state": 0
29 },
26 "matrix_pins": { 30 "matrix_pins": {
27 "cols": ["B0", "D7", "D6", "D4"], 31 "cols": ["B0", "D7", "D6", "D4"],
28 "rows": ["B3", "C7", "C6", "B6", "B5", "B4"] 32 "rows": ["B3", "C7", "C6", "B6", "B5", "B4"]
diff --git a/keyboards/exclusive/e85/hotswap/hotswap.c b/keyboards/exclusive/e85/hotswap/hotswap.c
deleted file mode 100644
index 18ca30b44c..0000000000
--- a/keyboards/exclusive/e85/hotswap/hotswap.c
+++ /dev/null
@@ -1,32 +0,0 @@
1/* Copyright 2020 MechMerlin
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(C7);
21 gpio_set_pin_output(B5);
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(C7, led_state.caps_lock);
29 gpio_write_pin(B5, led_state.scroll_lock);
30 }
31 return true;
32}
diff --git a/keyboards/exclusive/e85/hotswap/keyboard.json b/keyboards/exclusive/e85/hotswap/keyboard.json
index 4bd8e73882..7fcd61c843 100644
--- a/keyboards/exclusive/e85/hotswap/keyboard.json
+++ b/keyboards/exclusive/e85/hotswap/keyboard.json
@@ -18,6 +18,10 @@
18 "levels": 6, 18 "levels": 6,
19 "breathing": true 19 "breathing": true
20 }, 20 },
21 "indicators": {
22 "caps_lock": "C7",
23 "scroll_lock": "B5"
24 },
21 "rgblight": { 25 "rgblight": {
22 "saturation_steps": 8, 26 "saturation_steps": 8,
23 "brightness_steps": 8, 27 "brightness_steps": 8,
diff --git a/keyboards/fjlabs/bolsa65/bolsa65.c b/keyboards/fjlabs/bolsa65/bolsa65.c
deleted file mode 100644
index 669404192c..0000000000
--- a/keyboards/fjlabs/bolsa65/bolsa65.c
+++ /dev/null
@@ -1,28 +0,0 @@
1/*
2Copyright 2020 <me@homedrop.org>
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#include "quantum.h"
15
16void matrix_init_kb(void) {
17 // Initialize indicator LEDs to output
18 gpio_set_pin_output(F7); // Caps
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(F7, led_state.caps_lock);
26 }
27 return res;
28}
diff --git a/keyboards/fjlabs/bolsa65/keyboard.json b/keyboards/fjlabs/bolsa65/keyboard.json
index dfa47e90bb..63281ae9f6 100644
--- a/keyboards/fjlabs/bolsa65/keyboard.json
+++ b/keyboards/fjlabs/bolsa65/keyboard.json
@@ -8,6 +8,9 @@
8 "pid": "0x0001", 8 "pid": "0x0001",
9 "device_version": "0.0.1" 9 "device_version": "0.0.1"
10 }, 10 },
11 "indicators": {
12 "caps_lock": "F7"
13 },
11 "matrix_pins": { 14 "matrix_pins": {
12 "cols": ["C7", "B1", "B2", "B3", "B7", "D0", "D1", "D2", "D3", "D5", "D4", "D6", "D7", "B4", "B5"], 15 "cols": ["C7", "B1", "B2", "B3", "B7", "D0", "D1", "D2", "D3", "D5", "D4", "D6", "D7", "B4", "B5"],
13 "rows": ["F1", "F0", "F6", "F5", "F4"] 16 "rows": ["F1", "F0", "F6", "F5", "F4"]
diff --git a/keyboards/flx/virgo/keyboard.json b/keyboards/flx/virgo/keyboard.json
index 8396ce51da..996425282d 100644
--- a/keyboards/flx/virgo/keyboard.json
+++ b/keyboards/flx/virgo/keyboard.json
@@ -30,6 +30,11 @@
30 "pin": "B7", 30 "pin": "B7",
31 "levels": 5 31 "levels": 5
32 }, 32 },
33 "indicators": {
34 "caps_lock": "E6",
35 "scroll_lock": "B2",
36 "on_state": 0
37 },
33 "rgblight": { 38 "rgblight": {
34 "saturation_steps": 8, 39 "saturation_steps": 8,
35 "brightness_steps": 8, 40 "brightness_steps": 8,
diff --git a/keyboards/flx/virgo/virgo.c b/keyboards/flx/virgo/virgo.c
deleted file mode 100644
index 2f875531d0..0000000000
--- a/keyboards/flx/virgo/virgo.c
+++ /dev/null
@@ -1,34 +0,0 @@
1/* Copyright 2019 MechMerlin
2 * Edits etc 2020 Flexerm
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17#include "quantum.h"
18
19void matrix_init_kb(void) {
20 // put your keyboard start-up code here
21 // runs once when the firmware starts up
22
23 gpio_set_pin_output(E6);
24 gpio_set_pin_output(B2);
25 matrix_init_user();
26}
27
28bool led_update_kb(led_t led_state) {
29 if(led_update_user(led_state)) {
30 gpio_write_pin(E6, !led_state.caps_lock);
31 gpio_write_pin(B2, !led_state.scroll_lock);
32 }
33 return true;
34}
diff --git a/keyboards/handwired/colorlice/colorlice.c b/keyboards/handwired/colorlice/colorlice.c
index ede3fba82f..92914b79bc 100644
--- a/keyboards/handwired/colorlice/colorlice.c
+++ b/keyboards/handwired/colorlice/colorlice.c
@@ -51,18 +51,3 @@ void suspend_wakeup_init_kb(void)
51 suspend_wakeup_init_user(); 51 suspend_wakeup_init_user();
52} 52}
53#endif 53#endif
54
55bool led_update_kb(led_t led_state) {
56 bool res = led_update_user(led_state);
57 if(res) {
58 // gpio_write_pin sets the pin high for 1 and low for 0.
59 // In this example the pins are inverted, setting
60 // it low/0 turns it on, and high/1 turns the LED off.
61 // This behavior depends on whether the LED is between the pin
62 // and VCC or the pin and GND.
63 gpio_write_pin(B2, !led_state.num_lock);
64 gpio_write_pin(C6, !led_state.caps_lock);
65 gpio_write_pin(B7, !led_state.scroll_lock);
66 }
67 return res;
68}
diff --git a/keyboards/handwired/colorlice/keyboard.json b/keyboards/handwired/colorlice/keyboard.json
index 77f5ded097..4ccc10527c 100644
--- a/keyboards/handwired/colorlice/keyboard.json
+++ b/keyboards/handwired/colorlice/keyboard.json
@@ -65,6 +65,12 @@
65 "build": { 65 "build": {
66 "lto": true 66 "lto": true
67 }, 67 },
68 "indicators": {
69 "caps_lock": "C6",
70 "num_lock": "B2",
71 "scroll_lock": "B7",
72 "on_state": 0
73 },
68 "features": { 74 "features": {
69 "bootmagic": true, 75 "bootmagic": true,
70 "command": false, 76 "command": false,
diff --git a/keyboards/handwired/evk/v1_3/v1_3.c b/keyboards/handwired/evk/v1_3/v1_3.c
index a568ba3f86..575bf33759 100644
--- a/keyboards/handwired/evk/v1_3/v1_3.c
+++ b/keyboards/handwired/evk/v1_3/v1_3.c
@@ -33,12 +33,3 @@ __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) {
33 gpio_write_pin(D5, layer_state_cmp(state, 1)); 33 gpio_write_pin(D5, layer_state_cmp(state, 1));
34 return state; 34 return state;
35} 35}
36
37bool led_update_kb(led_t led_state) {
38 bool res = led_update_user(led_state);
39 if (res) {
40 // gpio_write_pin sets the pin high for 1 and low for 0.
41 gpio_write_pin(D4, led_state.caps_lock);
42 }
43 return res;
44}
diff --git a/keyboards/handwired/retro_refit/keyboard.json b/keyboards/handwired/retro_refit/keyboard.json
index 1e7812d578..7acdb48b44 100644
--- a/keyboards/handwired/retro_refit/keyboard.json
+++ b/keyboards/handwired/retro_refit/keyboard.json
@@ -23,6 +23,12 @@
23 "resync": true 23 "resync": true
24 } 24 }
25 }, 25 },
26 "indicators": {
27 "caps_lock": "D0",
28 "num_lock": "D1",
29 "scroll_lock": "C6",
30 "on_state": 0
31 },
26 "matrix_pins": { 32 "matrix_pins": {
27 "cols": ["B0", "B1", "B2", "B3", "D2", "D3", "C7", "D5"], 33 "cols": ["B0", "B1", "B2", "B3", "D2", "D3", "C7", "D5"],
28 "rows": ["D4", "D7", "B4", "B5", "B6", "F7", "F6", "F5", "F4", "F1", "F0"] 34 "rows": ["D4", "D7", "B4", "B5", "B6", "F7", "F6", "F5", "F4", "F1", "F0"]
diff --git a/keyboards/handwired/retro_refit/retro_refit.c b/keyboards/handwired/retro_refit/retro_refit.c
index b62d94d741..08e8e1d528 100644
--- a/keyboards/handwired/retro_refit/retro_refit.c
+++ b/keyboards/handwired/retro_refit/retro_refit.c
@@ -1,5 +1,4 @@
1#include "quantum.h" 1#include "quantum.h"
2#include "led.h"
3 2
4void matrix_init_kb(void) { 3void matrix_init_kb(void) {
5 // put your keyboard start-up code here 4 // put your keyboard start-up code here
@@ -11,14 +10,3 @@ void matrix_init_kb(void) {
11 10
12 matrix_init_user(); 11 matrix_init_user();
13}; 12};
14
15bool led_update_kb(led_t led_state) {
16 bool res = led_update_user(led_state);
17 if(res) {
18 gpio_write_pin(D0, !led_state.caps_lock);
19 gpio_write_pin(D1, !led_state.num_lock);
20 gpio_write_pin(C6, !led_state.scroll_lock);
21
22 }
23 return res;
24} \ No newline at end of file
diff --git a/keyboards/handwired/selene/keyboard.json b/keyboards/handwired/selene/keyboard.json
index 592b51aaf4..34eec11664 100644
--- a/keyboards/handwired/selene/keyboard.json
+++ b/keyboards/handwired/selene/keyboard.json
@@ -8,6 +8,11 @@
8 "pid": "0x0001", 8 "pid": "0x0001",
9 "device_version": "0.0.1" 9 "device_version": "0.0.1"
10 }, 10 },
11 "indicators": {
12 "caps_lock": "A2",
13 "num_lock": "A0",
14 "scroll_lock": "A1"
15 },
11 "rgblight": { 16 "rgblight": {
12 "led_count": 50 17 "led_count": 50
13 }, 18 },
diff --git a/keyboards/handwired/selene/selene.c b/keyboards/handwired/selene/selene.c
index b0924c06f4..3d0ef667cf 100644
--- a/keyboards/handwired/selene/selene.c
+++ b/keyboards/handwired/selene/selene.c
@@ -15,24 +15,8 @@
15 */ 15 */
16 16
17 17
18#include "selene.h" 18#include "quantum.h"
19
20void matrix_init_kb(void){
21 gpio_set_pin_output(NUM_LOCK_PIN);
22 gpio_set_pin_output(CAPS_LOCK_PIN);
23 gpio_set_pin_output(SCROLL_LOCK_PIN);
24}
25 19
26void keyboard_post_init_user(void) { 20void keyboard_post_init_user(void) {
27 rgblight_setrgb(0xff, 0xff, 0xff); 21 rgblight_setrgb(0xff, 0xff, 0xff);
28} 22}
29
30bool led_update_kb(led_t led_state) {
31 bool res = led_update_user(led_state);
32 if(res) {
33 gpio_write_pin(NUM_LOCK_PIN, led_state.num_lock);
34 gpio_write_pin(CAPS_LOCK_PIN, led_state.caps_lock);
35 gpio_write_pin(SCROLL_LOCK_PIN, led_state.scroll_lock);
36 }
37 return res;
38}
diff --git a/keyboards/handwired/selene/selene.h b/keyboards/handwired/selene/selene.h
deleted file mode 100644
index bcd4215e36..0000000000
--- a/keyboards/handwired/selene/selene.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/* Copyright 2020 Bpendragon
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#pragma once
18
19#include "quantum.h"
20
21#define NUM_LOCK_PIN A0
22#define CAPS_LOCK_PIN A2
23#define SCROLL_LOCK_PIN A1
diff --git a/keyboards/handwired/z150/config.h b/keyboards/handwired/z150/config.h
deleted file mode 100644
index 7a054266ea..0000000000
--- a/keyboards/handwired/z150/config.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2Copyright 2020 DmNosachev
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#pragma once
19
20#define NUM_LOCK_LED_PIN B5
21#define SCROLL_LOCK_LED_PIN B4
22#define CAPS_LOCK_LED_PIN B3
23
24/*
25 * Feature disable options
26 * These options are also useful to firmware size reduction.
27 */
28
29/* disable debug print */
30//#define NO_DEBUG
31
32/* disable print */
33//#define NO_PRINT
34
35/* disable action features */
36//#define NO_ACTION_LAYER
37//#define NO_ACTION_TAPPING
38//#define NO_ACTION_ONESHOT
diff --git a/keyboards/handwired/z150/keyboard.json b/keyboards/handwired/z150/keyboard.json
index 0658bb5233..38c92a6537 100644
--- a/keyboards/handwired/z150/keyboard.json
+++ b/keyboards/handwired/z150/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": "B3",
21 "num_lock": "B5",
22 "scroll_lock": "B4",
23 "on_state": 0
24 },
19 "matrix_pins": { 25 "matrix_pins": {
20 "cols": ["B11", "B10", "B1", "B0", "A7", "A6", "A5", "A4"], 26 "cols": ["B11", "B10", "B1", "B0", "A7", "A6", "A5", "A4"],
21 "rows": ["B13", "B14", "B15", "A8", "A9", "A3", "A10", "A1", "A2", "A15", "A0"] 27 "rows": ["B13", "B14", "B15", "A8", "A9", "A3", "A10", "A1", "A2", "A15", "A0"]
diff --git a/keyboards/handwired/z150/z150.c b/keyboards/handwired/z150/z150.c
deleted file mode 100644
index ab6709eed7..0000000000
--- a/keyboards/handwired/z150/z150.c
+++ /dev/null
@@ -1,39 +0,0 @@
1/* Copyright 2020 DmNosachev
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(NUM_LOCK_LED_PIN);
21 gpio_set_pin_output(CAPS_LOCK_LED_PIN);
22 gpio_set_pin_output(SCROLL_LOCK_LED_PIN);
23
24 gpio_write_pin_low(NUM_LOCK_LED_PIN);
25 gpio_write_pin_low(CAPS_LOCK_LED_PIN);
26 gpio_write_pin_low(SCROLL_LOCK_LED_PIN);
27
28 matrix_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(NUM_LOCK_LED_PIN, !led_state.num_lock);
35 gpio_write_pin(CAPS_LOCK_LED_PIN, !led_state.caps_lock);
36 gpio_write_pin(SCROLL_LOCK_LED_PIN, !led_state.scroll_lock);
37 }
38 return res;
39}
diff --git a/keyboards/kabedon/kabedon980/kabedon980.c b/keyboards/kabedon/kabedon980/kabedon980.c
deleted file mode 100644
index 7024a2eaa9..0000000000
--- a/keyboards/kabedon/kabedon980/kabedon980.c
+++ /dev/null
@@ -1,8 +0,0 @@
1#include "quantum.h"
2
3 bool led_update_kb(led_t led_state) {
4 if (led_update_user(led_state)) {
5 gpio_write_pin(E6, !led_state.caps_lock);
6 }
7 return true;
8}
diff --git a/keyboards/kabedon/kabedon980/keyboard.json b/keyboards/kabedon/kabedon980/keyboard.json
index cf9def2b8f..b8e100ceac 100644
--- a/keyboards/kabedon/kabedon980/keyboard.json
+++ b/keyboards/kabedon/kabedon980/keyboard.json
@@ -8,6 +8,10 @@
8 "pid": "0x3938", 8 "pid": "0x3938",
9 "device_version": "0.0.1" 9 "device_version": "0.0.1"
10 }, 10 },
11 "indicators": {
12 "caps_lock": "E6",
13 "on_state": 0
14 },
11 "rgblight": { 15 "rgblight": {
12 "saturation_steps": 8, 16 "saturation_steps": 8,
13 "brightness_steps": 8, 17 "brightness_steps": 8,
diff --git a/keyboards/noxary/x268/keyboard.json b/keyboards/noxary/x268/keyboard.json
index f5a991deff..7ca5799de2 100644
--- a/keyboards/noxary/x268/keyboard.json
+++ b/keyboards/noxary/x268/keyboard.json
@@ -32,6 +32,9 @@
32 "backlight": { 32 "backlight": {
33 "pin": "B7" 33 "pin": "B7"
34 }, 34 },
35 "indicators": {
36 "caps_lock": "B0"
37 },
35 "rgblight": { 38 "rgblight": {
36 "hue_steps": 16, 39 "hue_steps": 16,
37 "saturation_steps": 16, 40 "saturation_steps": 16,
diff --git a/keyboards/noxary/x268/x268.c b/keyboards/noxary/x268/x268.c
deleted file mode 100644
index 67d6dff89d..0000000000
--- a/keyboards/noxary/x268/x268.c
+++ /dev/null
@@ -1,34 +0,0 @@
1/* Copyright 2020 Rozakiin
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
18// Optional override functions below.
19// You can leave any or all of these undefined.
20// These are only required if you want to perform custom actions.
21
22void matrix_init_kb(void) {
23 // put your keyboard start-up code here
24 // runs once when the firmware starts up
25 gpio_set_pin_output(B0);
26 matrix_init_user();
27}
28
29bool led_update_kb(led_t led_state) {
30 if(led_update_user(led_state)) {
31 gpio_write_pin(B0, led_state.caps_lock);
32 }
33 return true;
34}
diff --git a/keyboards/punk75/config.h b/keyboards/punk75/config.h
deleted file mode 100644
index 321865330c..0000000000
--- a/keyboards/punk75/config.h
+++ /dev/null
@@ -1,20 +0,0 @@
1/*
2Copyright 2020 dsanchezseco
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#pragma once
19
20#define LED A0
diff --git a/keyboards/punk75/keyboard.json b/keyboards/punk75/keyboard.json
index dd084a147c..c7082e564f 100644
--- a/keyboards/punk75/keyboard.json
+++ b/keyboards/punk75/keyboard.json
@@ -32,6 +32,10 @@
32 {"pin_a": "B1", "pin_b": "B0"} 32 {"pin_a": "B1", "pin_b": "B0"}
33 ] 33 ]
34 }, 34 },
35 "indicators": {
36 "caps_lock": "A0",
37 "on_state": 0
38 },
35 "processor": "atmega32a", 39 "processor": "atmega32a",
36 "bootloader": "usbasploader", 40 "bootloader": "usbasploader",
37 "community_layouts": ["ortho_5x15"], 41 "community_layouts": ["ortho_5x15"],
diff --git a/keyboards/punk75/keymaps/default/keymap.c b/keyboards/punk75/keymaps/default/keymap.c
index 9a6ef29307..57f00e1e61 100644
--- a/keyboards/punk75/keymaps/default/keymap.c
+++ b/keyboards/punk75/keymaps/default/keymap.c
@@ -74,7 +74,7 @@ void led_keypress_update(pin_t led_pin, uint16_t keycode, keyrecord_t *record) {
74 74
75bool process_record_user(uint16_t keycode, keyrecord_t *record) { 75bool process_record_user(uint16_t keycode, keyrecord_t *record) {
76 // Update LED state 76 // Update LED state
77 led_keypress_update(LED, keycode, record); 77 led_keypress_update(LED_CAPS_LOCK_PIN, keycode, record);
78 return true; 78 return true;
79} 79}
80 80
diff --git a/keyboards/punk75/keymaps/via/keymap.c b/keyboards/punk75/keymaps/via/keymap.c
index 72ef91fd37..214135b55d 100644
--- a/keyboards/punk75/keymaps/via/keymap.c
+++ b/keyboards/punk75/keymaps/via/keymap.c
@@ -69,7 +69,7 @@ void led_keypress_update(pin_t led_pin, uint16_t keycode, keyrecord_t *record) {
69 69
70bool process_record_user(uint16_t keycode, keyrecord_t *record) { 70bool process_record_user(uint16_t keycode, keyrecord_t *record) {
71 // Update LED state 71 // Update LED state
72 led_keypress_update(LED, keycode, record); 72 led_keypress_update(LED_CAPS_LOCK_PIN, keycode, record);
73 return true; 73 return true;
74} 74}
75 75
diff --git a/keyboards/punk75/punk75.c b/keyboards/punk75/punk75.c
deleted file mode 100644
index 8d9d09d43c..0000000000
--- a/keyboards/punk75/punk75.c
+++ /dev/null
@@ -1,32 +0,0 @@
1/* Copyright 2020 dsanchezseco
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 // Set our LED pin as output
21 gpio_set_pin_output(LED);
22
23 matrix_init_user();
24}
25
26bool led_update_kb(led_t led_state) {
27 bool res = led_update_user(led_state);
28 if(res) {
29 gpio_write_pin(LED, !led_state.caps_lock);
30 }
31 return res;
32}
diff --git a/keyboards/redscarf_i/keyboard.json b/keyboards/redscarf_i/keyboard.json
index 0a268169ef..6a186dff0b 100644
--- a/keyboards/redscarf_i/keyboard.json
+++ b/keyboards/redscarf_i/keyboard.json
@@ -25,6 +25,10 @@
25 "backlight": { 25 "backlight": {
26 "pin": "B5" 26 "pin": "B5"
27 }, 27 },
28 "indicators": {
29 "num_lock": "F7",
30 "on_state": 0
31 },
28 "processor": "atmega32u4", 32 "processor": "atmega32u4",
29 "bootloader": "atmel-dfu", 33 "bootloader": "atmel-dfu",
30 "community_layouts": ["ortho_5x4", "ortho_6x4", "numpad_5x4", "numpad_6x4"], 34 "community_layouts": ["ortho_5x4", "ortho_6x4", "numpad_5x4", "numpad_6x4"],
diff --git a/keyboards/redscarf_i/redscarf_i.c b/keyboards/redscarf_i/redscarf_i.c
index 949bc362ad..7544b89d17 100644
--- a/keyboards/redscarf_i/redscarf_i.c
+++ b/keyboards/redscarf_i/redscarf_i.c
@@ -18,21 +18,13 @@
18 18
19void keyboard_pre_init_kb(void) { 19void keyboard_pre_init_kb(void) {
20 // initialize top row leds 20 // initialize top row leds
21 gpio_set_pin_output(F7);
22 gpio_set_pin_output(F6); 21 gpio_set_pin_output(F6);
23 gpio_set_pin_output(F5); 22 gpio_set_pin_output(F5);
24 // and then turn them off 23 // and then turn them off
25 gpio_write_pin_high(F7);
26 gpio_write_pin_high(F6); 24 gpio_write_pin_high(F6);
27 gpio_write_pin_high(F5); 25 gpio_write_pin_high(F5);
28}
29 26
30bool led_update_kb(led_t led_state) { 27 keyboard_pre_init_user();
31 bool res = led_update_user(led_state);
32 if(res) {
33 gpio_write_pin(F7, !led_state.num_lock);
34 }
35 return res;
36} 28}
37 29
38layer_state_t layer_state_set_kb(layer_state_t state) { 30layer_state_t layer_state_set_kb(layer_state_t state) {
diff --git a/keyboards/sneakbox/aliceclone/aliceclone.c b/keyboards/sneakbox/aliceclone/aliceclone.c
deleted file mode 100644
index 74d19e515c..0000000000
--- a/keyboards/sneakbox/aliceclone/aliceclone.c
+++ /dev/null
@@ -1,36 +0,0 @@
1/*
2Copyright 2020 Bryan Ong
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#include "quantum.h"
19
20void keyboard_pre_init_kb(void) {
21 gpio_set_pin_output(D7);
22 gpio_set_pin_output(D6);
23 gpio_set_pin_output(D4);
24
25 keyboard_pre_init_user();
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(D7, led_state.num_lock);
32 gpio_write_pin(D6, led_state.caps_lock);
33 gpio_write_pin(D4, led_state.scroll_lock);
34 }
35 return res;
36}
diff --git a/keyboards/sneakbox/aliceclone/keyboard.json b/keyboards/sneakbox/aliceclone/keyboard.json
index 869b8bd20b..bb0cd8e4b8 100644
--- a/keyboards/sneakbox/aliceclone/keyboard.json
+++ b/keyboards/sneakbox/aliceclone/keyboard.json
@@ -36,6 +36,11 @@
36 "bootmagic": { 36 "bootmagic": {
37 "matrix": [2, 0] 37 "matrix": [2, 0]
38 }, 38 },
39 "indicators": {
40 "caps_lock": "D6",
41 "num_lock": "D7",
42 "scroll_lock": "D4"
43 },
39 "processor": "atmega32u4", 44 "processor": "atmega32u4",
40 "bootloader": "atmel-dfu", 45 "bootloader": "atmel-dfu",
41 "community_layouts": ["alice", "alice_split_bs"], 46 "community_layouts": ["alice", "alice_split_bs"],
diff --git a/keyboards/yiancardesigns/barleycorn/barleycorn.c b/keyboards/yiancardesigns/barleycorn/barleycorn.c
deleted file mode 100644
index c73c1559c2..0000000000
--- a/keyboards/yiancardesigns/barleycorn/barleycorn.c
+++ /dev/null
@@ -1,37 +0,0 @@
1/* Copyright 2020 Yiancar
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(B5);
21 gpio_set_pin_output(C0);
22 keyboard_pre_init_user();
23}
24
25bool led_update_kb(led_t led_state) {
26 bool res = led_update_user(led_state);
27 if(res) {
28 // gpio_write_pin sets the pin high for 1 and low for 0.
29 // In this example the pins are inverted, setting
30 // it low/0 turns it on, and high/1 turns the LED off.
31 // This behavior depends on whether the LED is between the pin
32 // and VCC or the pin and GND.
33 gpio_write_pin(B5, led_state.caps_lock);
34 gpio_write_pin(C0, led_state.num_lock);
35 }
36 return res;
37}
diff --git a/keyboards/yiancardesigns/barleycorn/keyboard.json b/keyboards/yiancardesigns/barleycorn/keyboard.json
index a1676840a5..cf041b96c5 100644
--- a/keyboards/yiancardesigns/barleycorn/keyboard.json
+++ b/keyboards/yiancardesigns/barleycorn/keyboard.json
@@ -19,6 +19,10 @@
19 "resync": true 19 "resync": true
20 } 20 }
21 }, 21 },
22 "indicators": {
23 "caps_lock": "B5",
24 "num_lock": "C0"
25 },
22 "processor": "atmega328p", 26 "processor": "atmega328p",
23 "bootloader": "usbasploader", 27 "bootloader": "usbasploader",
24 "layouts": { 28 "layouts": {