a2176f6a039b5f92ba4cb473f7a2de560b57dd86

Author
Joel Challis <git@zvecr.com>
Committer
GitHub <noreply@github.com>
Date

Message

Migrate `led_update_kb` implementations to DD (#23985)

Diff

  1diff --git a/keyboards/bear_face/info.json b/keyboards/bear_face/info.json
  2index ad12468d56f77c1a47bc69b56534b211c748977f..ad5b1dd7d9d34f73922047e9b35accadb267edf0 100644
  3--- a/keyboards/bear_face/info.json
  4+++ b/keyboards/bear_face/info.json
  5@@ -24,6 +24,9 @@
  6             "resync": true
  7         }
  8     },
  9+    "indicators": {
 10+        "caps_lock": "F7"
 11+    },
 12     "matrix_pins": {
 13         "cols": ["B5", "C7", "C6", "F0", "E6", "B7", "D0", "D1", "D2", "D3", "D5", "D4", "D6", "D7", "B4"],
 14         "rows": ["F5", "F6", "F4", "F1", "B0", "B6"]
 15diff --git a/keyboards/bear_face/v1/v1.c b/keyboards/bear_face/v1/v1.c
 16deleted file mode 100644
 17index b64a63f0b430b48573175e518a57d32dd0569622..0000000000000000000000000000000000000000
 18--- a/keyboards/bear_face/v1/v1.c
 19+++ /dev/null
 20@@ -1,34 +0,0 @@
 21-/*
 22-Copyright 2020 chemicalwill <https://github.com/chemicalwill>
 23-
 24-This program is free software: you can redistribute it and/or modify
 25-it under the terms of the GNU General Public License as published by
 26-the Free Software Foundation, either version 2 of the License, or
 27-(at your option) any later version.
 28-
 29-This program is distributed in the hope that it will be useful,
 30-but WITHOUT ANY WARRANTY; without even the implied warranty of
 31-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 32-GNU General Public License for more details.
 33-
 34-You should have received a copy of the GNU General Public License
 35-along with this program.  If not, see <http://www.gnu.org/licenses/>.
 36-*/
 37-
 38-#include "quantum.h"
 39-
 40-void keyboard_pre_init_kb(void) {
 41-    //Sets LED pin as output
 42-    gpio_set_pin_output(F7);
 43-
 44-    keyboard_pre_init_user();
 45-}
 46-
 47-bool led_update_kb(led_t led_state) {
 48-    // Caps Lock LED indicator toggling code here
 49-    bool res = led_update_user(led_state);
 50-    if(res) {
 51-        gpio_write_pin(F7, led_state.caps_lock);
 52-    }
 53-    return res;
 54-}
 55diff --git a/keyboards/bear_face/v2/v2.c b/keyboards/bear_face/v2/v2.c
 56deleted file mode 100644
 57index b64a63f0b430b48573175e518a57d32dd0569622..0000000000000000000000000000000000000000
 58--- a/keyboards/bear_face/v2/v2.c
 59+++ /dev/null
 60@@ -1,34 +0,0 @@
 61-/*
 62-Copyright 2020 chemicalwill <https://github.com/chemicalwill>
 63-
 64-This program is free software: you can redistribute it and/or modify
 65-it under the terms of the GNU General Public License as published by
 66-the Free Software Foundation, either version 2 of the License, or
 67-(at your option) any later version.
 68-
 69-This program is distributed in the hope that it will be useful,
 70-but WITHOUT ANY WARRANTY; without even the implied warranty of
 71-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 72-GNU General Public License for more details.
 73-
 74-You should have received a copy of the GNU General Public License
 75-along with this program.  If not, see <http://www.gnu.org/licenses/>.
 76-*/
 77-
 78-#include "quantum.h"
 79-
 80-void keyboard_pre_init_kb(void) {
 81-    //Sets LED pin as output
 82-    gpio_set_pin_output(F7);
 83-
 84-    keyboard_pre_init_user();
 85-}
 86-
 87-bool led_update_kb(led_t led_state) {
 88-    // Caps Lock LED indicator toggling code here
 89-    bool res = led_update_user(led_state);
 90-    if(res) {
 91-        gpio_write_pin(F7, led_state.caps_lock);
 92-    }
 93-    return res;
 94-}
 95diff --git a/keyboards/dztech/bocc/bocc.c b/keyboards/dztech/bocc/bocc.c
 96deleted file mode 100644
 97index 646a7861f831d9bdac0ebb3d60f87a9a7ee7d769..0000000000000000000000000000000000000000
 98--- a/keyboards/dztech/bocc/bocc.c
 99+++ /dev/null
100@@ -1,29 +0,0 @@
101-/* Copyright 2020 dztech
102- *
103- * This program is free software: you can redistribute it and/or modify
104- * it under the terms of the GNU General Public License as published by
105- * the Free Software Foundation, either version 2 of the License, or
106- * (at your option) any later version.
107- *
108- * This program is distributed in the hope that it will be useful,
109- * but WITHOUT ANY WARRANTY; without even the implied warranty of
110- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
111- * GNU General Public License for more details.
112- *
113- * You should have received a copy of the GNU General Public License
114- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
115- */
116-#include "quantum.h"
117-
118-void matrix_init_kb(void) {
119-    gpio_set_pin_output(E6);
120-    matrix_init_user();
121-}
122-
123-bool led_update_kb(led_t led_state) {
124-    bool res = led_update_user(led_state);
125-    if(res) {
126-        gpio_write_pin(E6, !led_state.caps_lock);
127-    }
128-    return res;
129-}
130diff --git a/keyboards/dztech/bocc/keyboard.json b/keyboards/dztech/bocc/keyboard.json
131index 7e40fde49cb9f2b21f55688e5ae98314570e1028..a6208b2bf7c15d1237a7e3fc16aa53c55887cdd9 100644
132--- a/keyboards/dztech/bocc/keyboard.json
133+++ b/keyboards/dztech/bocc/keyboard.json
134@@ -33,6 +33,10 @@
135         "pin": "B7",
136         "levels": 5
137     },
138+    "indicators": {
139+        "caps_lock": "E6",
140+        "on_state": 0
141+    },
142     "rgblight": {
143         "saturation_steps": 8,
144         "brightness_steps": 8,
145diff --git a/keyboards/evyd13/gh80_3700/gh80_3700.c b/keyboards/evyd13/gh80_3700/gh80_3700.c
146index 6d903e48e1c461e2d991a575c18fd471d9e467f6..8c4c81fe6438f8f4b533ffe7385e373af94e3067 100644
147--- a/keyboards/evyd13/gh80_3700/gh80_3700.c
148+++ b/keyboards/evyd13/gh80_3700/gh80_3700.c
149@@ -15,24 +15,16 @@
150  */
151 #include "quantum.h"
152 
153-void led_init_ports(void) {
154-  gpio_set_pin_output(E6);
155+void keyboard_pre_init_kb(void) {
156   gpio_set_pin_output(B1);
157   gpio_set_pin_output(D0);
158   gpio_set_pin_output(D1);
159   gpio_set_pin_output(F0);
160   
161-  gpio_write_pin_high(E6);
162   gpio_write_pin_high(B1);
163   gpio_write_pin_high(D0);
164   gpio_write_pin_high(D1);
165   gpio_write_pin_high(F0);
166-}
167-
168-bool led_update_kb(led_t led_state) {
169-  if(led_update_user(led_state)) {
170-    gpio_write_pin(E6, !led_state.num_lock);
171-  }
172 
173-  return true;
174-}
175+  keyboard_pre_init_user();
176+}
177diff --git a/keyboards/evyd13/gh80_3700/keyboard.json b/keyboards/evyd13/gh80_3700/keyboard.json
178index fa11a482df02f50a45f8e9492627dc06a43b31c6..a647f4611885c2f8320f478fc3f8509a6c05ec06 100644
179--- a/keyboards/evyd13/gh80_3700/keyboard.json
180+++ b/keyboards/evyd13/gh80_3700/keyboard.json
181@@ -23,6 +23,10 @@
182             "resync": true
183         }
184     },
185+    "indicators": {
186+        "num_lock": "E6",
187+        "on_state": 0
188+    },
189     "matrix_pins": {
190         "cols": ["B0", "D7", "D6", "D4"],
191         "rows": ["B3", "C7", "C6", "B6", "B5", "B4"]
192diff --git a/keyboards/exclusive/e85/hotswap/hotswap.c b/keyboards/exclusive/e85/hotswap/hotswap.c
193deleted file mode 100644
194index 18ca30b44cd2cac62cceb255e1d4306c2133b59c..0000000000000000000000000000000000000000
195--- a/keyboards/exclusive/e85/hotswap/hotswap.c
196+++ /dev/null
197@@ -1,32 +0,0 @@
198-/* Copyright 2020 MechMerlin
199- *
200- * This program is free software: you can redistribute it and/or modify
201- * it under the terms of the GNU General Public License as published by
202- * the Free Software Foundation, either version 2 of the License, or
203- * (at your option) any later version.
204- *
205- * This program is distributed in the hope that it will be useful,
206- * but WITHOUT ANY WARRANTY; without even the implied warranty of
207- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
208- * GNU General Public License for more details.
209- *
210- * You should have received a copy of the GNU General Public License
211- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
212- */
213-
214-#include "quantum.h"
215-
216-void keyboard_pre_init_kb(void) {
217-    gpio_set_pin_output(C7);
218-    gpio_set_pin_output(B5);
219-
220-    keyboard_pre_init_user();
221-}
222-
223-bool led_update_kb(led_t led_state) {
224-    if (led_update_user(led_state)) {
225-        gpio_write_pin(C7, led_state.caps_lock);
226-        gpio_write_pin(B5, led_state.scroll_lock);
227-    }
228-    return true;
229-}
230diff --git a/keyboards/exclusive/e85/hotswap/keyboard.json b/keyboards/exclusive/e85/hotswap/keyboard.json
231index 4bd8e738829aeae8b648d8bf2396f899e04b9737..7fcd61c8433f81eefd2085a9e408e138ae84a01f 100644
232--- a/keyboards/exclusive/e85/hotswap/keyboard.json
233+++ b/keyboards/exclusive/e85/hotswap/keyboard.json
234@@ -18,6 +18,10 @@
235         "levels": 6,
236         "breathing": true
237     },
238+    "indicators": {
239+        "caps_lock": "C7",
240+        "scroll_lock": "B5"
241+    },
242     "rgblight": {
243         "saturation_steps": 8,
244         "brightness_steps": 8,
245diff --git a/keyboards/fjlabs/bolsa65/bolsa65.c b/keyboards/fjlabs/bolsa65/bolsa65.c
246deleted file mode 100644
247index 669404192c0e4556cfc734227a7558ce3d1f329d..0000000000000000000000000000000000000000
248--- a/keyboards/fjlabs/bolsa65/bolsa65.c
249+++ /dev/null
250@@ -1,28 +0,0 @@
251-/*
252-Copyright 2020 <me@homedrop.org>
253-This program is free software: you can redistribute it and/or modify
254-it under the terms of the GNU General Public License as published by
255-the Free Software Foundation, either version 2 of the License, or
256-(at your option) any later version.
257-This program is distributed in the hope that it will be useful,
258-but WITHOUT ANY WARRANTY; without even the implied warranty of
259-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
260-GNU General Public License for more details.
261-You should have received a copy of the GNU General Public License
262-along with this program. If not, see <http://www.gnu.org/licenses/>.
263-*/
264-#include "quantum.h"
265-
266-void matrix_init_kb(void) {
267-    // Initialize indicator LEDs to output
268-    gpio_set_pin_output(F7); // Caps
269-    matrix_init_user();
270-}
271-
272-bool led_update_kb(led_t led_state) {
273-    bool res = led_update_user(led_state);
274-    if(res) {
275-        gpio_write_pin(F7, led_state.caps_lock);
276-    }
277-    return res;
278-}
279diff --git a/keyboards/fjlabs/bolsa65/keyboard.json b/keyboards/fjlabs/bolsa65/keyboard.json
280index dfa47e90bb537b7dcc60d9d42ca0af943ed6d41f..63281ae9f6d4c970a3736cfa5fbc52225e413249 100644
281--- a/keyboards/fjlabs/bolsa65/keyboard.json
282+++ b/keyboards/fjlabs/bolsa65/keyboard.json
283@@ -8,6 +8,9 @@
284         "pid": "0x0001",
285         "device_version": "0.0.1"
286     },
287+    "indicators": {
288+        "caps_lock": "F7"
289+    },
290     "matrix_pins": {
291         "cols": ["C7", "B1", "B2", "B3", "B7", "D0", "D1", "D2", "D3", "D5", "D4", "D6", "D7", "B4", "B5"],
292         "rows": ["F1", "F0", "F6", "F5", "F4"]
293diff --git a/keyboards/flx/virgo/keyboard.json b/keyboards/flx/virgo/keyboard.json
294index 8396ce51daa6d95d3d39f0210ea83fc8a4b39480..996425282d76be6a0a18064fb0af756eb0942f8a 100644
295--- a/keyboards/flx/virgo/keyboard.json
296+++ b/keyboards/flx/virgo/keyboard.json
297@@ -30,6 +30,11 @@
298         "pin": "B7",
299         "levels": 5
300     },
301+    "indicators": {
302+        "caps_lock": "E6",
303+        "scroll_lock": "B2",
304+        "on_state": 0
305+    },
306     "rgblight": {
307         "saturation_steps": 8,
308         "brightness_steps": 8,
309diff --git a/keyboards/flx/virgo/virgo.c b/keyboards/flx/virgo/virgo.c
310deleted file mode 100644
311index 2f875531d0f22dd33f7a78e2a496f5b350dbb768..0000000000000000000000000000000000000000
312--- a/keyboards/flx/virgo/virgo.c
313+++ /dev/null
314@@ -1,34 +0,0 @@
315-/* Copyright 2019 MechMerlin
316- * Edits etc 2020 Flexerm
317- *
318- * This program is free software: you can redistribute it and/or modify
319- * it under the terms of the GNU General Public License as published by
320- * the Free Software Foundation, either version 2 of the License, or
321- * (at your option) any later version.
322- *
323- * This program is distributed in the hope that it will be useful,
324- * but WITHOUT ANY WARRANTY; without even the implied warranty of
325- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
326- * GNU General Public License for more details.
327- *
328- * You should have received a copy of the GNU General Public License
329- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
330- */
331-#include "quantum.h"
332-
333-void matrix_init_kb(void) {
334-    // put your keyboard start-up code here
335-    // runs once when the firmware starts up
336-
337-  gpio_set_pin_output(E6);
338-  gpio_set_pin_output(B2);
339-  matrix_init_user();
340-}
341-
342-bool led_update_kb(led_t led_state) {
343-    if(led_update_user(led_state)) {
344-        gpio_write_pin(E6, !led_state.caps_lock);
345-        gpio_write_pin(B2, !led_state.scroll_lock);
346-    }
347-    return true;
348-}
349diff --git a/keyboards/handwired/colorlice/colorlice.c b/keyboards/handwired/colorlice/colorlice.c
350index ede3fba82fb3eceb10433ab6f7e315b75ee04f96..92914b79bc6357f3c15717fdbe2dadac3475ace2 100644
351--- a/keyboards/handwired/colorlice/colorlice.c
352+++ b/keyboards/handwired/colorlice/colorlice.c
353@@ -51,18 +51,3 @@ void suspend_wakeup_init_kb(void)
354     suspend_wakeup_init_user();
355 }
356 #endif
357-
358-bool led_update_kb(led_t led_state) {
359-    bool res = led_update_user(led_state);
360-    if(res) {
361-        // gpio_write_pin sets the pin high for 1 and low for 0.
362-        // In this example the pins are inverted, setting
363-        // it low/0 turns it on, and high/1 turns the LED off.
364-        // This behavior depends on whether the LED is between the pin
365-        // and VCC or the pin and GND.
366-        gpio_write_pin(B2, !led_state.num_lock);
367-        gpio_write_pin(C6, !led_state.caps_lock);
368-        gpio_write_pin(B7, !led_state.scroll_lock);
369-    }
370-    return res;
371-}
372diff --git a/keyboards/handwired/colorlice/keyboard.json b/keyboards/handwired/colorlice/keyboard.json
373index 77f5ded0970f19fb386f14860ff83af246fede86..4ccc10527c145ea99dd1e1bf270e87307e909c17 100644
374--- a/keyboards/handwired/colorlice/keyboard.json
375+++ b/keyboards/handwired/colorlice/keyboard.json
376@@ -65,6 +65,12 @@
377     "build": {
378         "lto": true
379     },
380+    "indicators": {
381+      "caps_lock": "C6",
382+      "num_lock": "B2",
383+      "scroll_lock": "B7",
384+      "on_state": 0
385+    },
386     "features": {
387         "bootmagic": true,
388         "command": false,
389diff --git a/keyboards/handwired/evk/v1_3/v1_3.c b/keyboards/handwired/evk/v1_3/v1_3.c
390index a568ba3f866ef32f8eaf6d13fce6714c6794a91f..575bf33759162bb8614dfcdeaac60f9ab1ea52c7 100644
391--- a/keyboards/handwired/evk/v1_3/v1_3.c
392+++ b/keyboards/handwired/evk/v1_3/v1_3.c
393@@ -33,12 +33,3 @@ __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) {
394     gpio_write_pin(D5, layer_state_cmp(state, 1));
395     return state;
396 }
397-
398-bool led_update_kb(led_t led_state) {
399-    bool res = led_update_user(led_state);
400-    if (res) {
401-        // gpio_write_pin sets the pin high for 1 and low for 0.
402-        gpio_write_pin(D4, led_state.caps_lock);
403-    }
404-    return res;
405-}
406diff --git a/keyboards/handwired/retro_refit/keyboard.json b/keyboards/handwired/retro_refit/keyboard.json
407index 1e7812d578f2e0a5f1b83b62009d8aa1bbb4a8b0..7acdb48b44dbfcb0c3b08cae1f45d2fd0d3dea37 100644
408--- a/keyboards/handwired/retro_refit/keyboard.json
409+++ b/keyboards/handwired/retro_refit/keyboard.json
410@@ -23,6 +23,12 @@
411       "resync": true
412     }
413   },
414+  "indicators": {
415+    "caps_lock": "D0",
416+    "num_lock": "D1",
417+    "scroll_lock": "C6",
418+    "on_state": 0
419+  },
420   "matrix_pins": {
421     "cols": ["B0", "B1", "B2", "B3", "D2", "D3", "C7", "D5"],
422     "rows": ["D4", "D7", "B4", "B5", "B6", "F7", "F6", "F5", "F4", "F1", "F0"]
423diff --git a/keyboards/handwired/retro_refit/retro_refit.c b/keyboards/handwired/retro_refit/retro_refit.c
424index b62d94d7418c2963a15ef08635a8da07eb18f342..08e8e1d528eba3019053a0c32a8ea463a7dbb36f 100644
425--- a/keyboards/handwired/retro_refit/retro_refit.c
426+++ b/keyboards/handwired/retro_refit/retro_refit.c
427@@ -1,5 +1,4 @@
428 #include "quantum.h"
429-#include "led.h"
430 
431 void matrix_init_kb(void) {
432     // put your keyboard start-up code here
433@@ -11,14 +10,3 @@ void matrix_init_kb(void) {
434 
435     matrix_init_user();
436 };
437-
438-bool led_update_kb(led_t led_state) {
439-    bool res = led_update_user(led_state);
440-    if(res) {
441-        gpio_write_pin(D0, !led_state.caps_lock);
442-        gpio_write_pin(D1, !led_state.num_lock);
443-        gpio_write_pin(C6, !led_state.scroll_lock);
444-
445-    }
446-    return res;
447-}
448diff --git a/keyboards/handwired/selene/keyboard.json b/keyboards/handwired/selene/keyboard.json
449index 592b51aaf40d81164dbfea14eab595f17efe118d..34eec11664ed3e80919a936326ffb10b5d14fe3a 100644
450--- a/keyboards/handwired/selene/keyboard.json
451+++ b/keyboards/handwired/selene/keyboard.json
452@@ -8,6 +8,11 @@
453     "pid": "0x0001",
454     "device_version": "0.0.1"
455   },
456+  "indicators": {
457+    "caps_lock": "A2",
458+    "num_lock": "A0",
459+    "scroll_lock": "A1"
460+  },
461   "rgblight": {
462     "led_count": 50
463   },
464diff --git a/keyboards/handwired/selene/selene.c b/keyboards/handwired/selene/selene.c
465index b0924c06f4998097eb299c1ad9cfd078c3c8a508..3d0ef667cf19d36ac4fa61edab03d658e599d12f 100644
466--- a/keyboards/handwired/selene/selene.c
467+++ b/keyboards/handwired/selene/selene.c
468@@ -15,24 +15,8 @@
469  */
470 
471 
472-#include "selene.h"
473-
474-void matrix_init_kb(void){
475-    gpio_set_pin_output(NUM_LOCK_PIN);
476-    gpio_set_pin_output(CAPS_LOCK_PIN);
477-    gpio_set_pin_output(SCROLL_LOCK_PIN);
478-}
479+#include "quantum.h"
480 
481 void keyboard_post_init_user(void) {
482     rgblight_setrgb(0xff, 0xff, 0xff);
483 }
484-
485-bool led_update_kb(led_t led_state) {
486-    bool res = led_update_user(led_state);
487-    if(res) {
488-        gpio_write_pin(NUM_LOCK_PIN, led_state.num_lock);
489-        gpio_write_pin(CAPS_LOCK_PIN, led_state.caps_lock);
490-        gpio_write_pin(SCROLL_LOCK_PIN, led_state.scroll_lock);
491-    }
492-    return res;
493-}
494diff --git a/keyboards/handwired/selene/selene.h b/keyboards/handwired/selene/selene.h
495deleted file mode 100644
496index bcd4215e366041e6f8d1e982fa7c1d8806e49bc7..0000000000000000000000000000000000000000
497--- a/keyboards/handwired/selene/selene.h
498+++ /dev/null
499@@ -1,23 +0,0 @@
500-/* Copyright 2020 Bpendragon
501- *
502- * This program is free software: you can redistribute it and/or modify
503- * it under the terms of the GNU General Public License as published by
504- * the Free Software Foundation, either version 2 of the License, or
505- * (at your option) any later version.
506- *
507- * This program is distributed in the hope that it will be useful,
508- * but WITHOUT ANY WARRANTY; without even the implied warranty of
509- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
510- * GNU General Public License for more details.
511- *
512- * You should have received a copy of the GNU General Public License
513- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
514- */
515-
516-#pragma once
517-
518-#include "quantum.h"
519-
520-#define NUM_LOCK_PIN A0
521-#define CAPS_LOCK_PIN A2
522-#define SCROLL_LOCK_PIN A1
523diff --git a/keyboards/handwired/z150/config.h b/keyboards/handwired/z150/config.h
524deleted file mode 100644
525index 7a054266ea45203a9b95088f933c3cf185739df0..0000000000000000000000000000000000000000
526--- a/keyboards/handwired/z150/config.h
527+++ /dev/null
528@@ -1,38 +0,0 @@
529-/*
530-Copyright 2020 DmNosachev
531-
532-This program is free software: you can redistribute it and/or modify
533-it under the terms of the GNU General Public License as published by
534-the Free Software Foundation, either version 2 of the License, or
535-(at your option) any later version.
536-
537-This program is distributed in the hope that it will be useful,
538-but WITHOUT ANY WARRANTY; without even the implied warranty of
539-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
540-GNU General Public License for more details.
541-
542-You should have received a copy of the GNU General Public License
543-along with this program.  If not, see <http://www.gnu.org/licenses/>.
544-*/
545-
546-#pragma once
547-
548-#define NUM_LOCK_LED_PIN B5
549-#define SCROLL_LOCK_LED_PIN B4
550-#define CAPS_LOCK_LED_PIN B3
551-
552-/*
553- * Feature disable options
554- *  These options are also useful to firmware size reduction.
555- */
556-
557-/* disable debug print */
558-//#define NO_DEBUG
559-
560-/* disable print */
561-//#define NO_PRINT
562-
563-/* disable action features */
564-//#define NO_ACTION_LAYER
565-//#define NO_ACTION_TAPPING
566-//#define NO_ACTION_ONESHOT
567diff --git a/keyboards/handwired/z150/keyboard.json b/keyboards/handwired/z150/keyboard.json
568index 0658bb523397ba9f307dcaa4b5098e235a7ae47a..38c92a6537d4f1ce4c411202731e355a0c62d6d4 100644
569--- a/keyboards/handwired/z150/keyboard.json
570+++ b/keyboards/handwired/z150/keyboard.json
571@@ -16,6 +16,12 @@
572         "mousekey": true,
573         "nkro": false
574     },
575+    "indicators": {
576+        "caps_lock": "B3",
577+        "num_lock": "B5",
578+        "scroll_lock": "B4",
579+        "on_state": 0
580+    },
581     "matrix_pins": {
582         "cols": ["B11", "B10", "B1", "B0", "A7", "A6", "A5", "A4"],
583         "rows": ["B13", "B14", "B15", "A8", "A9", "A3", "A10", "A1", "A2", "A15", "A0"]
584diff --git a/keyboards/handwired/z150/z150.c b/keyboards/handwired/z150/z150.c
585deleted file mode 100644
586index ab6709eed756031eee745c90956401e654249683..0000000000000000000000000000000000000000
587--- a/keyboards/handwired/z150/z150.c
588+++ /dev/null
589@@ -1,39 +0,0 @@
590-/* Copyright 2020 DmNosachev
591- *
592- * This program is free software: you can redistribute it and/or modify
593- * it under the terms of the GNU General Public License as published by
594- * the Free Software Foundation, either version 2 of the License, or
595- * (at your option) any later version.
596- *
597- * This program is distributed in the hope that it will be useful,
598- * but WITHOUT ANY WARRANTY; without even the implied warranty of
599- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
600- * GNU General Public License for more details.
601- *
602- * You should have received a copy of the GNU General Public License
603- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
604- */
605-
606-#include "quantum.h"
607-
608-void matrix_init_kb(void) {
609-    gpio_set_pin_output(NUM_LOCK_LED_PIN);
610-    gpio_set_pin_output(CAPS_LOCK_LED_PIN);
611-    gpio_set_pin_output(SCROLL_LOCK_LED_PIN);
612-
613-    gpio_write_pin_low(NUM_LOCK_LED_PIN);
614-    gpio_write_pin_low(CAPS_LOCK_LED_PIN);
615-    gpio_write_pin_low(SCROLL_LOCK_LED_PIN);
616-
617-    matrix_init_user();
618-}
619-
620-bool led_update_kb(led_t led_state) {
621-    bool res = led_update_user(led_state);
622-    if(res) {
623-        gpio_write_pin(NUM_LOCK_LED_PIN, !led_state.num_lock);
624-        gpio_write_pin(CAPS_LOCK_LED_PIN, !led_state.caps_lock);
625-        gpio_write_pin(SCROLL_LOCK_LED_PIN, !led_state.scroll_lock);
626-    }
627-    return res;
628-}
629diff --git a/keyboards/kabedon/kabedon980/kabedon980.c b/keyboards/kabedon/kabedon980/kabedon980.c
630deleted file mode 100644
631index 7024a2eaa99f68d5fb028638c8277255853ca0b8..0000000000000000000000000000000000000000
632--- a/keyboards/kabedon/kabedon980/kabedon980.c
633+++ /dev/null
634@@ -1,8 +0,0 @@
635-#include "quantum.h"
636-
637- bool led_update_kb(led_t led_state) {
638-    if (led_update_user(led_state)) {
639-        gpio_write_pin(E6, !led_state.caps_lock);
640-    }
641-    return true;
642-}
643diff --git a/keyboards/kabedon/kabedon980/keyboard.json b/keyboards/kabedon/kabedon980/keyboard.json
644index cf9def2b8fef8726bf01626ada6fbba5d87d28c3..b8e100ceac02b4ce1e18f7f720a119ec1b568da0 100644
645--- a/keyboards/kabedon/kabedon980/keyboard.json
646+++ b/keyboards/kabedon/kabedon980/keyboard.json
647@@ -8,6 +8,10 @@
648         "pid": "0x3938",
649         "device_version": "0.0.1"
650     },
651+    "indicators": {
652+        "caps_lock": "E6",
653+        "on_state": 0
654+    },
655     "rgblight": {
656         "saturation_steps": 8,
657         "brightness_steps": 8,
658diff --git a/keyboards/noxary/x268/keyboard.json b/keyboards/noxary/x268/keyboard.json
659index f5a991deff5bd3ecce01b8c25c29940aed606e97..7ca5799de2400d1dc9ffd720c8117eeb214bfbe9 100644
660--- a/keyboards/noxary/x268/keyboard.json
661+++ b/keyboards/noxary/x268/keyboard.json
662@@ -32,6 +32,9 @@
663   "backlight": {
664     "pin": "B7"
665   },
666+  "indicators": {
667+    "caps_lock": "B0"
668+  },
669   "rgblight": {
670     "hue_steps": 16,
671     "saturation_steps": 16,
672diff --git a/keyboards/noxary/x268/x268.c b/keyboards/noxary/x268/x268.c
673deleted file mode 100644
674index 67d6dff89df8f7788aab0e07147cc68e9db73a37..0000000000000000000000000000000000000000
675--- a/keyboards/noxary/x268/x268.c
676+++ /dev/null
677@@ -1,34 +0,0 @@
678-/* Copyright 2020 Rozakiin
679- *
680- * This program is free software: you can redistribute it and/or modify
681- * it under the terms of the GNU General Public License as published by
682- * the Free Software Foundation, either version 2 of the License, or
683- * (at your option) any later version.
684- *
685- * This program is distributed in the hope that it will be useful,
686- * but WITHOUT ANY WARRANTY; without even the implied warranty of
687- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
688- * GNU General Public License for more details.
689- *
690- * You should have received a copy of the GNU General Public License
691- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
692- */
693-#include "quantum.h"
694-
695-// Optional override functions below.
696-// You can leave any or all of these undefined.
697-// These are only required if you want to perform custom actions.
698-
699-void matrix_init_kb(void) {
700-	// put your keyboard start-up code here
701-	// runs once when the firmware starts up
702-    gpio_set_pin_output(B0);
703-	matrix_init_user();
704-}
705-
706-bool led_update_kb(led_t led_state) {
707-    if(led_update_user(led_state)) {
708-        gpio_write_pin(B0, led_state.caps_lock);
709-    }
710-    return true;
711-}
712diff --git a/keyboards/punk75/config.h b/keyboards/punk75/config.h
713deleted file mode 100644
714index 321865330c7d7618599638774337a5d3661b4b1a..0000000000000000000000000000000000000000
715--- a/keyboards/punk75/config.h
716+++ /dev/null
717@@ -1,20 +0,0 @@
718-/*
719-Copyright 2020 dsanchezseco
720-
721-This program is free software: you can redistribute it and/or modify
722-it under the terms of the GNU General Public License as published by
723-the Free Software Foundation, either version 2 of the License, or
724-(at your option) any later version.
725-
726-This program is distributed in the hope that it will be useful,
727-but WITHOUT ANY WARRANTY; without even the implied warranty of
728-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
729-GNU General Public License for more details.
730-
731-You should have received a copy of the GNU General Public License
732-along with this program.  If not, see <http://www.gnu.org/licenses/>.
733-*/
734-
735-#pragma once
736-
737-#define LED A0
738diff --git a/keyboards/punk75/keyboard.json b/keyboards/punk75/keyboard.json
739index dd084a147c4cb5606550899de289a87c9a971100..c7082e564fb8ac1efe8219af3a42fdc47cc74c1a 100644
740--- a/keyboards/punk75/keyboard.json
741+++ b/keyboards/punk75/keyboard.json
742@@ -32,6 +32,10 @@
743             {"pin_a": "B1", "pin_b": "B0"}
744         ]
745     },
746+    "indicators": {
747+        "caps_lock": "A0",
748+        "on_state": 0
749+    },
750     "processor": "atmega32a",
751     "bootloader": "usbasploader",
752     "community_layouts": ["ortho_5x15"],
753diff --git a/keyboards/punk75/keymaps/default/keymap.c b/keyboards/punk75/keymaps/default/keymap.c
754index 9a6ef29307e8fac4f884080cb2284c3dace9b73b..57f00e1e615d942d5688d54ff93f94c2f0eb89bc 100644
755--- a/keyboards/punk75/keymaps/default/keymap.c
756+++ b/keyboards/punk75/keymaps/default/keymap.c
757@@ -74,7 +74,7 @@ void led_keypress_update(pin_t led_pin, uint16_t keycode, keyrecord_t *record) {
758 
759 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
760     // Update LED state
761-    led_keypress_update(LED, keycode, record);
762+    led_keypress_update(LED_CAPS_LOCK_PIN, keycode, record);
763     return true;
764 }
765 
766diff --git a/keyboards/punk75/keymaps/via/keymap.c b/keyboards/punk75/keymaps/via/keymap.c
767index 72ef91fd370a5d83a6e79bd33ec0db1e25c23087..214135b55de79d2f51f663647e2a8cec2a688c94 100644
768--- a/keyboards/punk75/keymaps/via/keymap.c
769+++ b/keyboards/punk75/keymaps/via/keymap.c
770@@ -69,7 +69,7 @@ void led_keypress_update(pin_t led_pin, uint16_t keycode, keyrecord_t *record) {
771 
772 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
773     // Update LED state
774-    led_keypress_update(LED, keycode, record);
775+    led_keypress_update(LED_CAPS_LOCK_PIN, keycode, record);
776     return true;
777 }
778 
779diff --git a/keyboards/punk75/punk75.c b/keyboards/punk75/punk75.c
780deleted file mode 100644
781index 8d9d09d43c4e09385c4c10f39b7a183762f65dde..0000000000000000000000000000000000000000
782--- a/keyboards/punk75/punk75.c
783+++ /dev/null
784@@ -1,32 +0,0 @@
785-/* Copyright 2020 dsanchezseco
786- *
787- * This program is free software: you can redistribute it and/or modify
788- * it under the terms of the GNU General Public License as published by
789- * the Free Software Foundation, either version 2 of the License, or
790- * (at your option) any later version.
791- *
792- * This program is distributed in the hope that it will be useful,
793- * but WITHOUT ANY WARRANTY; without even the implied warranty of
794- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
795- * GNU General Public License for more details.
796- *
797- * You should have received a copy of the GNU General Public License
798- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
799- */
800-
801-#include "quantum.h"
802-
803-void matrix_init_kb(void) {
804-    // Set our LED pin as output
805-    gpio_set_pin_output(LED);
806-
807-    matrix_init_user();
808-}
809-
810-bool led_update_kb(led_t led_state) {
811-    bool res = led_update_user(led_state);
812-    if(res) {
813-        gpio_write_pin(LED, !led_state.caps_lock);
814-    }
815-    return res;
816-}
817diff --git a/keyboards/redscarf_i/keyboard.json b/keyboards/redscarf_i/keyboard.json
818index 0a268169ef19a591bf0747a947a95d903d62475f..6a186dff0bb2be8d08b77ea4eb474165d073f57d 100644
819--- a/keyboards/redscarf_i/keyboard.json
820+++ b/keyboards/redscarf_i/keyboard.json
821@@ -25,6 +25,10 @@
822     "backlight": {
823         "pin": "B5"
824     },
825+    "indicators": {
826+        "num_lock": "F7",
827+        "on_state": 0
828+    },
829     "processor": "atmega32u4",
830     "bootloader": "atmel-dfu",
831     "community_layouts": ["ortho_5x4", "ortho_6x4", "numpad_5x4", "numpad_6x4"],
832diff --git a/keyboards/redscarf_i/redscarf_i.c b/keyboards/redscarf_i/redscarf_i.c
833index 949bc362ad2cd0ace0ba7244d4c2baeae0a95149..7544b89d176686be36e9ebd166aae92e0ce21687 100644
834--- a/keyboards/redscarf_i/redscarf_i.c
835+++ b/keyboards/redscarf_i/redscarf_i.c
836@@ -18,21 +18,13 @@
837 
838 void keyboard_pre_init_kb(void) {
839   // initialize top row leds
840-  gpio_set_pin_output(F7);
841   gpio_set_pin_output(F6);
842   gpio_set_pin_output(F5);
843   // and then turn them off
844-  gpio_write_pin_high(F7);
845   gpio_write_pin_high(F6);
846   gpio_write_pin_high(F5);
847-}
848 
849-bool led_update_kb(led_t led_state) {
850-    bool res = led_update_user(led_state);
851-    if(res) {
852-        gpio_write_pin(F7, !led_state.num_lock);
853-    }
854-    return res;
855+  keyboard_pre_init_user();
856 }
857 
858 layer_state_t layer_state_set_kb(layer_state_t state) {
859diff --git a/keyboards/sneakbox/aliceclone/aliceclone.c b/keyboards/sneakbox/aliceclone/aliceclone.c
860deleted file mode 100644
861index 74d19e515c129b8ad9bb14dcb98cb6c0e57e1b25..0000000000000000000000000000000000000000
862--- a/keyboards/sneakbox/aliceclone/aliceclone.c
863+++ /dev/null
864@@ -1,36 +0,0 @@
865-/*
866-Copyright 2020 Bryan Ong
867-
868-This program is free software: you can redistribute it and/or modify
869-it under the terms of the GNU General Public License as published by
870-the Free Software Foundation, either version 2 of the License, or
871-(at your option) any later version.
872-
873-This program is distributed in the hope that it will be useful,
874-but WITHOUT ANY WARRANTY; without even the implied warranty of
875-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
876-GNU General Public License for more details.
877-
878-You should have received a copy of the GNU General Public License
879-along with this program.  If not, see <http://www.gnu.org/licenses/>.
880-*/
881-
882-#include "quantum.h"
883-
884-void keyboard_pre_init_kb(void) {
885-    gpio_set_pin_output(D7);
886-    gpio_set_pin_output(D6);
887-    gpio_set_pin_output(D4);
888-    
889-    keyboard_pre_init_user();
890-}
891-
892-bool led_update_kb(led_t led_state) {
893-    bool res = led_update_user(led_state);
894-    if(res) {
895-        gpio_write_pin(D7, led_state.num_lock);
896-        gpio_write_pin(D6, led_state.caps_lock);
897-        gpio_write_pin(D4, led_state.scroll_lock);
898-    }
899-    return res;
900-}
901diff --git a/keyboards/sneakbox/aliceclone/keyboard.json b/keyboards/sneakbox/aliceclone/keyboard.json
902index 869b8bd20b6978f785cd2f60ed1b601e036d26eb..bb0cd8e4b8588c6f042f4f6a53db76ec29b50eef 100644
903--- a/keyboards/sneakbox/aliceclone/keyboard.json
904+++ b/keyboards/sneakbox/aliceclone/keyboard.json
905@@ -36,6 +36,11 @@
906   "bootmagic": {
907     "matrix": [2, 0]
908   },
909+  "indicators": {
910+    "caps_lock": "D6",
911+    "num_lock": "D7",
912+    "scroll_lock": "D4"
913+  },
914   "processor": "atmega32u4",
915   "bootloader": "atmel-dfu",
916   "community_layouts": ["alice", "alice_split_bs"],
917diff --git a/keyboards/yiancardesigns/barleycorn/barleycorn.c b/keyboards/yiancardesigns/barleycorn/barleycorn.c
918deleted file mode 100644
919index c73c1559c2086dc8481ca0bbf16481859f20e063..0000000000000000000000000000000000000000
920--- a/keyboards/yiancardesigns/barleycorn/barleycorn.c
921+++ /dev/null
922@@ -1,37 +0,0 @@
923-/* Copyright 2020 Yiancar
924- *
925- * This program is free software: you can redistribute it and/or modify
926- * it under the terms of the GNU General Public License as published by
927- * the Free Software Foundation, either version 2 of the License, or
928- * (at your option) any later version.
929- *
930- * This program is distributed in the hope that it will be useful,
931- * but WITHOUT ANY WARRANTY; without even the implied warranty of
932- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
933- * GNU General Public License for more details.
934- *
935- * You should have received a copy of the GNU General Public License
936- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
937- */
938-#include "quantum.h"
939-
940-void keyboard_pre_init_kb(void) {
941-    // Set our LED pins as output
942-    gpio_set_pin_output(B5);
943-    gpio_set_pin_output(C0);
944-    keyboard_pre_init_user();
945-}
946-
947-bool led_update_kb(led_t led_state) {
948-    bool res = led_update_user(led_state);
949-    if(res) {
950-        // gpio_write_pin sets the pin high for 1 and low for 0.
951-        // In this example the pins are inverted, setting
952-        // it low/0 turns it on, and high/1 turns the LED off.
953-        // This behavior depends on whether the LED is between the pin
954-        // and VCC or the pin and GND.
955-        gpio_write_pin(B5, led_state.caps_lock);
956-        gpio_write_pin(C0, led_state.num_lock);
957-    }
958-    return res;
959-}
960diff --git a/keyboards/yiancardesigns/barleycorn/keyboard.json b/keyboards/yiancardesigns/barleycorn/keyboard.json
961index a1676840a55c8d94c8e46a31ba6187f01e2520b1..cf041b96c574d8e4239c8f4a2b146c9af9491520 100644
962--- a/keyboards/yiancardesigns/barleycorn/keyboard.json
963+++ b/keyboards/yiancardesigns/barleycorn/keyboard.json
964@@ -19,6 +19,10 @@
965             "resync": true
966         }
967     },
968+    "indicators": {
969+      "caps_lock": "B5",
970+      "num_lock": "C0"
971+    },
972     "processor": "atmega328p",
973     "bootloader": "usbasploader",
974     "layouts": {