diff --git a/keyboards/aeboards/ext65/rev1/keyboard.json b/keyboards/aeboards/ext65/rev1/keyboard.json
index c254a671421..1d105505e53 100644
--- a/keyboards/aeboards/ext65/rev1/keyboard.json
+++ b/keyboards/aeboards/ext65/rev1/keyboard.json
@@ -13,6 +13,11 @@
"extrakey": true,
"nkro": true
},
+ "indicators": {
+ "caps_lock": "D3",
+ "num_lock": "D5",
+ "scroll_lock": "D2"
+ },
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"diode_direction": "COL2ROW",
diff --git a/keyboards/aeboards/ext65/rev1/rev1.c b/keyboards/aeboards/ext65/rev1/rev1.c
index 344a2bcb322..fc8280a5e4e 100644
--- a/keyboards/aeboards/ext65/rev1/rev1.c
+++ b/keyboards/aeboards/ext65/rev1/rev1.c
@@ -16,23 +16,10 @@
#include "quantum.h"
-void keyboard_pre_init_user(void) {
- // Call the keyboard pre init code.
- // Set our LED pins as output
- gpio_set_pin_output(D5);
- gpio_set_pin_output(D3);
- gpio_set_pin_output(D2);
- gpio_set_pin_output(D1);
-}
+void keyboard_pre_init_kb(void) {
+ gpio_set_pin_output(D1);
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if(res) {
- gpio_write_pin(D5, led_state.num_lock);
- gpio_write_pin(D3, led_state.caps_lock);
- gpio_write_pin(D2, led_state.scroll_lock);
- }
- return res;
+ keyboard_pre_init_user();
}
layer_state_t layer_state_set_kb(layer_state_t state) {
diff --git a/keyboards/aeboards/ext65/rev2/keyboard.json b/keyboards/aeboards/ext65/rev2/keyboard.json
index 0ab50f92582..ab7cceeefb3 100644
--- a/keyboards/aeboards/ext65/rev2/keyboard.json
+++ b/keyboards/aeboards/ext65/rev2/keyboard.json
@@ -22,6 +22,11 @@
"levels": 6,
"breathing": true
},
+ "indicators": {
+ "caps_lock": "B3",
+ "num_lock": "B4",
+ "scroll_lock": "A15"
+ },
"rgblight": {
"led_count": 24,
"animations": {
diff --git a/keyboards/aeboards/ext65/rev2/rev2.c b/keyboards/aeboards/ext65/rev2/rev2.c
index 5922b601cd1..7b8ebb00875 100644
--- a/keyboards/aeboards/ext65/rev2/rev2.c
+++ b/keyboards/aeboards/ext65/rev2/rev2.c
@@ -69,26 +69,11 @@ bool oled_task_kb(void) {
#else
void keyboard_pre_init_kb(void) {
- // Call the keyboard pre init code.
- // Set our LED pins as output
- gpio_set_pin_output(B4);
- gpio_set_pin_output(B3);
- gpio_set_pin_output(A15);
gpio_set_pin_output(A14);
keyboard_pre_init_user();
}
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if (res) {
- gpio_write_pin(B4, led_state.num_lock);
- gpio_write_pin(B3, led_state.caps_lock);
- gpio_write_pin(A15, led_state.scroll_lock);
- }
- return res;
-}
-
layer_state_t layer_state_set_kb(layer_state_t state) {
switch (get_highest_layer(state)) {
case 1:
diff --git a/keyboards/heliar/wm1_hotswap/keyboard.json b/keyboards/heliar/wm1_hotswap/keyboard.json
index 3fa1a8e6cb8..789a3c7d2b6 100644
--- a/keyboards/heliar/wm1_hotswap/keyboard.json
+++ b/keyboards/heliar/wm1_hotswap/keyboard.json
@@ -25,6 +25,12 @@
"backlight": {
"pin": "B7"
},
+ "indicators": {
+ "caps_lock": "D6",
+ "num_lock": "D7",
+ "scroll_lock": "D4",
+ "on_state": 0
+ },
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"layouts": {
diff --git a/keyboards/heliar/wm1_hotswap/wm1_hotswap.c b/keyboards/heliar/wm1_hotswap/wm1_hotswap.c
deleted file mode 100644
index d2d10b0b1f1..00000000000
--- a/keyboards/heliar/wm1_hotswap/wm1_hotswap.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright 2019 HELIAR MK
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#include "quantum.h"
-
-
-void keyboard_pre_init_kb(void)
-{
- gpio_set_pin_output(D7);
- gpio_write_pin_high(D7);
- gpio_set_pin_output(D6);
- gpio_write_pin_high(D6);
- gpio_set_pin_output(D4);
- gpio_write_pin_high(D4);
-}
-
-bool led_update_kb(led_t led_state) {
-
- if (led_update_user(led_state)){
- gpio_write_pin(D7, !led_state.num_lock);
- gpio_write_pin(D6, !led_state.caps_lock);
- gpio_write_pin(D4, !led_state.scroll_lock);
- }
-
- return true;
-}
diff --git a/keyboards/hineybush/h10/h10.c b/keyboards/hineybush/h10/h10.c
deleted file mode 100644
index 2170a8b2d7b..00000000000
--- a/keyboards/hineybush/h10/h10.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright 2020 hineybush
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#include "quantum.h"
-
-// Optional override functions below.
-// You can leave any or all of these undefined.
-// These are only required if you want to perform custom actions.
-
-void matrix_init_kb(void) {
- // put your keyboard start-up code here
- // runs once when the firmware starts up
- gpio_set_pin_output(F7);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- gpio_write_pin(F7, !led_state.num_lock);
- }
- return true;
-}
diff --git a/keyboards/hineybush/h10/keyboard.json b/keyboards/hineybush/h10/keyboard.json
index 73205f85ffc..63a109f4843 100644
--- a/keyboards/hineybush/h10/keyboard.json
+++ b/keyboards/hineybush/h10/keyboard.json
@@ -32,6 +32,10 @@
"pin": "B7",
"breathing": true
},
+ "indicators": {
+ "caps_lock": "F7",
+ "on_state": 0
+ },
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"community_layouts": ["ortho_6x4", "numpad_6x4"],
diff --git a/keyboards/hineybush/h60/h60.c b/keyboards/hineybush/h60/h60.c
deleted file mode 100644
index 472b99d8ba1..00000000000
--- a/keyboards/hineybush/h60/h60.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright 2020 hineybush
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#include "quantum.h"
-
-void matrix_init_kb(void) {
- // put your keyboard start-up code here
- // runs once when the firmware starts up
- gpio_set_pin_output(C6);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- gpio_write_pin(C6, !led_state.caps_lock);
- }
- return true;
-}
-
diff --git a/keyboards/hineybush/h60/keyboard.json b/keyboards/hineybush/h60/keyboard.json
index 8a019d42da3..ea058b6d646 100644
--- a/keyboards/hineybush/h60/keyboard.json
+++ b/keyboards/hineybush/h60/keyboard.json
@@ -34,6 +34,10 @@
"pin": "B7",
"levels": 12
},
+ "indicators": {
+ "caps_lock": "C6",
+ "on_state": 0
+ },
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
diff --git a/keyboards/hineybush/h87a/h87a.c b/keyboards/hineybush/h87a/h87a.c
index f2d0c62813e..8c10b68ca0e 100644
--- a/keyboards/hineybush/h87a/h87a.c
+++ b/keyboards/hineybush/h87a/h87a.c
@@ -15,22 +15,6 @@
*/
#include "quantum.h"
-void matrix_init_kb(void) {
- // put your keyboard start-up code here
- // runs once when the firmware starts up
- gpio_set_pin_output(D5);
- gpio_set_pin_output(E6);
- matrix_init_user();
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- gpio_write_pin(D5, !led_state.caps_lock);
- gpio_write_pin(E6, !led_state.scroll_lock);
- }
- return true;
-}
-
void eeconfig_init_kb(void) { // EEPROM is getting reset!
rgblight_enable(); // Enable RGB by default
rgblight_sethsv(0, 255, 128); // Set default HSV - red hue, full saturation, medium brightness
diff --git a/keyboards/hineybush/h87a/keyboard.json b/keyboards/hineybush/h87a/keyboard.json
index e9096201d92..987d1a60fdb 100644
--- a/keyboards/hineybush/h87a/keyboard.json
+++ b/keyboards/hineybush/h87a/keyboard.json
@@ -35,6 +35,11 @@
"backlight": {
"pin": "B7"
},
+ "indicators": {
+ "caps_lock": "D5",
+ "scroll_lock": "E6",
+ "on_state": 0
+ },
"ws2812": {
"pin": "D3"
},
diff --git a/keyboards/hineybush/h88/h88.c b/keyboards/hineybush/h88/h88.c
index a916609d75e..7c634467511 100644
--- a/keyboards/hineybush/h88/h88.c
+++ b/keyboards/hineybush/h88/h88.c
@@ -15,22 +15,6 @@
*/
#include "quantum.h"
-void matrix_init_kb(void) {
- // put your keyboard start-up code here
- // runs once when the firmware starts up
- gpio_set_pin_output(D5);
- gpio_set_pin_output(E6);
- matrix_init_user();
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- gpio_write_pin(D5, !led_state.caps_lock);
- gpio_write_pin(E6, !led_state.scroll_lock);
- }
- return true;
-}
-
void eeconfig_init_kb(void) { // EEPROM is getting reset!
rgblight_enable(); // Enable RGB by default
rgblight_sethsv(0, 255, 128); // Set default HSV - red hue, full saturation, medium brightness
diff --git a/keyboards/hineybush/h88/keyboard.json b/keyboards/hineybush/h88/keyboard.json
index e74a3f36234..b1bb8423035 100644
--- a/keyboards/hineybush/h88/keyboard.json
+++ b/keyboards/hineybush/h88/keyboard.json
@@ -35,6 +35,11 @@
"backlight": {
"pin": "B7"
},
+ "indicators": {
+ "caps_lock": "D5",
+ "scroll_lock": "E6",
+ "on_state": 0
+ },
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
diff --git a/keyboards/hineybush/physix/keyboard.json b/keyboards/hineybush/physix/keyboard.json
index b7b1c05393e..79a0bea7aba 100644
--- a/keyboards/hineybush/physix/keyboard.json
+++ b/keyboards/hineybush/physix/keyboard.json
@@ -33,6 +33,10 @@
"pin": "B7",
"breathing": true
},
+ "indicators": {
+ "caps_lock": "D3",
+ "scroll_lock": "D5"
+ },
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
diff --git a/keyboards/hineybush/physix/physix.c b/keyboards/hineybush/physix/physix.c
deleted file mode 100644
index cd920a72b30..00000000000
--- a/keyboards/hineybush/physix/physix.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Copyright 2019 hineybush
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#include "quantum.h"
-
-// Optional override functions below.
-// You can leave any or all of these undefined.
-// These are only required if you want to perform custom actions.
-
-
-void matrix_init_kb(void) {
- // put your keyboard start-up code here
- // runs once when the firmware starts up
- gpio_set_pin_output(D3);
- gpio_set_pin_output(D5);
- matrix_init_user();
-}
-
-bool led_update_kb(led_t led_state) {
- // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
- bool res = led_update_user(led_state);
- if(res) {
- // gpio_write_pin sets the pin high for 1 and low for 0.
- // In this example the pins are inverted, setting
- // it low/0 turns it on, and high/1 turns the LED off.
- // This behavior depends on whether the LED is between the pin
- // and VCC or the pin and GND.
- gpio_write_pin(D3, led_state.caps_lock);
- gpio_write_pin(D5, led_state.scroll_lock);
- }
- return res;
- return led_update_user(led_state);
-}
-
-
-
diff --git a/keyboards/kc60se/kc60se.c b/keyboards/kc60se/kc60se.c
deleted file mode 100644
index a7d60079b2e..00000000000
--- a/keyboards/kc60se/kc60se.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright 2017 Blake C. Lewis
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#include "quantum.h"
-
-void matrix_init_kb(void){
- gpio_set_pin_output(B2);
-}
-
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if(res) {
- gpio_write_pin(B2, !led_state.caps_lock);
- }
- return res;
-}
-
diff --git a/keyboards/kc60se/keyboard.json b/keyboards/kc60se/keyboard.json
index b7123b5749d..c8bdf24a4b8 100644
--- a/keyboards/kc60se/keyboard.json
+++ b/keyboards/kc60se/keyboard.json
@@ -27,6 +27,10 @@
"pin": "F5",
"levels": 6
},
+ "indicators": {
+ "caps_lock": "B2",
+ "on_state": 0
+ },
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"community_layouts": ["60_ansi", "60_ansi_split_bs_rshift", "60_iso", "60_iso_split_bs_rshift"],
diff --git a/keyboards/masterworks/classy_tkl/rev_a/keyboard.json b/keyboards/masterworks/classy_tkl/rev_a/keyboard.json
index d3e723d413d..889aa6d3f90 100644
--- a/keyboards/masterworks/classy_tkl/rev_a/keyboard.json
+++ b/keyboards/masterworks/classy_tkl/rev_a/keyboard.json
@@ -22,6 +22,10 @@
"resync": true
}
},
+ "indicators": {
+ "caps_lock": "B5",
+ "scroll_lock": "B6"
+ },
"matrix_pins": {
"cols": ["B4", "D7", "D6", "D4", "C6", "D5", "D3", "D2", "D1", "D0", "B7", "B3", "B2", "B1", "B0", "E6", "F7"],
"rows": ["C7", "F0", "F1", "F4", "F5", "F6"]
diff --git a/keyboards/masterworks/classy_tkl/rev_a/rev_a.c b/keyboards/masterworks/classy_tkl/rev_a/rev_a.c
deleted file mode 100644
index 6e01c217d2d..00000000000
--- a/keyboards/masterworks/classy_tkl/rev_a/rev_a.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Copyright 2020 Mathias Andersson
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-#include "quantum.h"
-
-#define CAPS_PIN B5
-#define SCROLL_PIN B6
-
-// Optional override functions below.
-// You can leave any or all of these undefined.
-// These are only required if you want to perform custom actions.
-
-void matrix_init_kb(void) {
- // put your keyboard start-up code here
- // runs once when the firmware starts up
-
- gpio_set_pin_output(CAPS_PIN);
- gpio_set_pin_output(SCROLL_PIN);
-
- matrix_init_user();
-}
-
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if(res) {
- gpio_write_pin(CAPS_PIN, led_state.caps_lock);
- gpio_write_pin(SCROLL_PIN, led_state.scroll_lock);
- }
- return res;
-}
diff --git a/keyboards/matrix/cain_re/cain_re.c b/keyboards/matrix/cain_re/cain_re.c
deleted file mode 100644
index 6dc24f22926..00000000000
--- a/keyboards/matrix/cain_re/cain_re.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * cain_re.c
- *
- Copyright 2020 astro
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
- */
-
-#include "quantum.h"
-
-void matrix_init_kb(void)
-{
- gpio_set_pin_output(NUM_PIN);
- gpio_set_pin_output(CAPS_PIN);
- gpio_set_pin_output(SCROLL_PIN);
-
- matrix_init_user();
-}
-
-bool led_update_kb(led_t led_state)
-{
- bool res = led_update_user(led_state);
- if (res) {
- gpio_write_pin(NUM_PIN, led_state.num_lock);
- gpio_write_pin(CAPS_PIN, led_state.caps_lock);
- gpio_write_pin(SCROLL_PIN, led_state.scroll_lock);
- }
- return res;
-}
diff --git a/keyboards/matrix/cain_re/config.h b/keyboards/matrix/cain_re/config.h
deleted file mode 100644
index 9469d689d0c..00000000000
--- a/keyboards/matrix/cain_re/config.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * config.h
- *
- Copyright 2020 astro
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
- */
-
-#pragma once
-
-#define CAPS_PIN D3
-#define NUM_PIN F7
-#define SCROLL_PIN B0
diff --git a/keyboards/matrix/cain_re/keyboard.json b/keyboards/matrix/cain_re/keyboard.json
index 02c6cbbeb56..7d93e806c25 100644
--- a/keyboards/matrix/cain_re/keyboard.json
+++ b/keyboards/matrix/cain_re/keyboard.json
@@ -8,6 +8,11 @@
"pid": "0x0106",
"device_version": "0.0.1"
},
+ "indicators": {
+ "caps_lock": "D3",
+ "num_lock": "F7",
+ "scroll_lock": "B0"
+ },
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
diff --git a/keyboards/matrix/m12og/rev2/keyboard.json b/keyboards/matrix/m12og/rev2/keyboard.json
index 42df6a75e87..45fcffe9eb6 100644
--- a/keyboards/matrix/m12og/rev2/keyboard.json
+++ b/keyboards/matrix/m12og/rev2/keyboard.json
@@ -8,6 +8,12 @@
"pid": "0x8712",
"device_version": "0.0.1"
},
+ "indicators": {
+ "caps_lock": "C6",
+ "num_lock": "B1",
+ "scroll_lock": "B2",
+ "on_state": 0
+ },
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
diff --git a/keyboards/matrix/m12og/rev2/rev2.c b/keyboards/matrix/m12og/rev2/rev2.c
deleted file mode 100644
index e64640b2d2d..00000000000
--- a/keyboards/matrix/m12og/rev2/rev2.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * rev2.c
- */
-
-#include "quantum.h"
-
-void matrix_init_kb(void) {
- gpio_set_pin_output(C6);
- gpio_set_pin_output(B2);
- gpio_set_pin_output(B1);
-
- matrix_init_user();
-}
-
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if (res) {
- gpio_write_pin(B1, !led_state.num_lock);
- gpio_write_pin(C6, !led_state.caps_lock);
- gpio_write_pin(B2, !led_state.scroll_lock);
- }
- return res;
-}
diff --git a/keyboards/quad_h/lb75/keyboard.json b/keyboards/quad_h/lb75/keyboard.json
index 0a51d4f47f4..e88ba4b3a4e 100644
--- a/keyboards/quad_h/lb75/keyboard.json
+++ b/keyboards/quad_h/lb75/keyboard.json
@@ -33,6 +33,11 @@
"pin": "B7",
"levels": 5
},
+ "indicators": {
+ "caps_lock": "B1",
+ "scroll_lock": "B2",
+ "on_state": 0
+ },
"ws2812": {
"pin": "B0"
},
diff --git a/keyboards/quad_h/lb75/lb75.c b/keyboards/quad_h/lb75/lb75.c
deleted file mode 100644
index ef716092b9f..00000000000
--- a/keyboards/quad_h/lb75/lb75.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Copyright 2019 Ryota Goto
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-#include "quantum.h"
-
-
-void matrix_init_kb(void) {
- // put your keyboard start-up code here
- // runs once when the firmware starts up
-
- gpio_set_pin_output(B1);
- gpio_set_pin_output(B2);
-
- matrix_init_user();
-}
-
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
-
- if(res) {
- gpio_write_pin(B1, !led_state.caps_lock);
- gpio_write_pin(B2, !led_state.scroll_lock);
- }
-
- return res;
-}
-
diff --git a/keyboards/rmi_kb/wete/v1/keyboard.json b/keyboards/rmi_kb/wete/v1/keyboard.json
index 8e8059c103d..c9a54f76c20 100644
--- a/keyboards/rmi_kb/wete/v1/keyboard.json
+++ b/keyboards/rmi_kb/wete/v1/keyboard.json
@@ -35,6 +35,12 @@
"levels": 24,
"breathing": true
},
+ "indicators": {
+ "caps_lock": "B3",
+ "num_lock": "A14",
+ "scroll_lock": "A15",
+ "on_state": 0
+ },
"rgblight": {
"led_count": 24,
"animations": {
diff --git a/keyboards/rmi_kb/wete/v1/v1.c b/keyboards/rmi_kb/wete/v1/v1.c
deleted file mode 100644
index 34a09174684..00000000000
--- a/keyboards/rmi_kb/wete/v1/v1.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright 2020 Ramon Imbao
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#include "quantum.h"
-
-void keyboard_pre_init_user(void) {
- // Initialize indicator LED pins
- gpio_set_pin_output(A14); // Num Lock
- gpio_set_pin_output(A15); // Scroll Lock
- gpio_set_pin_output(B3); // Caps Lock
-}
-
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if (res) {
- gpio_write_pin(A14, !led_state.num_lock);
- gpio_write_pin(A15, !led_state.scroll_lock);
- gpio_write_pin(B3, !led_state.caps_lock);
- }
-
- return res;
-}
diff --git a/keyboards/switchplate/southpaw_65/keyboard.json b/keyboards/switchplate/southpaw_65/keyboard.json
index e4090e49c72..72c4c71097e 100644
--- a/keyboards/switchplate/southpaw_65/keyboard.json
+++ b/keyboards/switchplate/southpaw_65/keyboard.json
@@ -29,6 +29,10 @@
"pin": "B5",
"levels": 10
},
+ "indicators": {
+ "caps_lock": "B6",
+ "on_state": 0
+ },
"rgblight": {
"led_count": 9,
"animations": {
diff --git a/keyboards/switchplate/southpaw_65/southpaw_65.c b/keyboards/switchplate/southpaw_65/southpaw_65.c
deleted file mode 100644
index dfe3665928b..00000000000
--- a/keyboards/switchplate/southpaw_65/southpaw_65.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright 2019
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-#include "quantum.h"
-
-void keyboard_pre_init_kb(void) {
- gpio_set_pin_output(B6);
-
- keyboard_pre_init_user();
-}
-
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if(res) {
- gpio_write_pin(B6, !led_state.caps_lock);
- }
- return res;
-}
diff --git a/keyboards/switchplate/southpaw_fullsize/keyboard.json b/keyboards/switchplate/southpaw_fullsize/keyboard.json
index ad897821c35..84942ccfa46 100644
--- a/keyboards/switchplate/southpaw_fullsize/keyboard.json
+++ b/keyboards/switchplate/southpaw_fullsize/keyboard.json
@@ -31,6 +31,12 @@
"backlight": {
"pin": "B7"
},
+ "indicators": {
+ "caps_lock": "D4",
+ "num_lock": "D3",
+ "scroll_lock": "D5",
+ "on_state": 0
+ },
"processor": "at90usb1286",
"bootloader": "atmel-dfu",
"layouts": {
diff --git a/keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.c b/keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.c
deleted file mode 100644
index 3d77e8722e6..00000000000
--- a/keyboards/switchplate/southpaw_fullsize/southpaw_fullsize.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Copyright 2020 Ryota Goto
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-#include "quantum.h"
-
-// Optional override functions below.
-// You can leave any or all of these undefined.
-// These are only required if you want to perform custom actions.
-
-#define INDICATOR_NUM D3
-#define INDICATOR_CAPS D4
-#define INDICATOR_SCR D5
-
-
-void matrix_init_kb(void) {
- // put your keyboard start-up code here
- // runs once when the firmware starts up
-
- // D3 Numlock, D4 Capslock, D5 Scrlock
- gpio_set_pin_output(INDICATOR_NUM);
- gpio_set_pin_output(INDICATOR_CAPS);
- gpio_set_pin_output(INDICATOR_SCR);
-
- matrix_init_user();
-}
-
-bool led_update_kb(led_t led_state) {
- // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
- bool res = led_update_user(led_state);
- if (res)
- {
- gpio_write_pin(INDICATOR_NUM, !led_state.num_lock);
- gpio_write_pin(INDICATOR_CAPS, !led_state.caps_lock);
- gpio_write_pin(INDICATOR_SCR, !led_state.scroll_lock);
- }
- return res;
-}
-
diff --git a/keyboards/westfoxtrot/cypher/rev1/keyboard.json b/keyboards/westfoxtrot/cypher/rev1/keyboard.json
index 09294d169c2..30dcc625de0 100644
--- a/keyboards/westfoxtrot/cypher/rev1/keyboard.json
+++ b/keyboards/westfoxtrot/cypher/rev1/keyboard.json
@@ -31,6 +31,11 @@
"levels": 5,
"breathing": true
},
+ "indicators": {
+ "caps_lock": "F1",
+ "num_lock": "F4",
+ "scroll_lock": "F5"
+ },
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"layouts": {
diff --git a/keyboards/westfoxtrot/cypher/rev1/rev1.c b/keyboards/westfoxtrot/cypher/rev1/rev1.c
deleted file mode 100644
index eeaa7b4a4cf..00000000000
--- a/keyboards/westfoxtrot/cypher/rev1/rev1.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright 2019 westfoxtrot
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-#include "quantum.h"
-
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if(res) {
- // gpio_write_pin sets the pin high for 1 and low for 0.
- // In this example the pins are inverted, setting
- // it low/0 turns it on, and high/1 turns the LED off.
- // This behavior depends on whether the LED is between the pin
- // and VCC or the pin and GND.
- gpio_write_pin(F4, led_state.num_lock);
- gpio_write_pin(F1, led_state.caps_lock);
- gpio_write_pin(F5, led_state.scroll_lock);
- }
- return res;
-}
diff --git a/keyboards/westfoxtrot/cypher/rev5/keyboard.json b/keyboards/westfoxtrot/cypher/rev5/keyboard.json
index fbb487534d5..278ff94b06e 100644
--- a/keyboards/westfoxtrot/cypher/rev5/keyboard.json
+++ b/keyboards/westfoxtrot/cypher/rev5/keyboard.json
@@ -33,6 +33,11 @@
"levels": 5,
"breathing": true
},
+ "indicators": {
+ "caps_lock": "D5",
+ "num_lock": "D3",
+ "scroll_lock": "D2"
+ },
"rgblight": {
"hue_steps": 12,
"saturation_steps": 25,
diff --git a/keyboards/westfoxtrot/cypher/rev5/rev5.c b/keyboards/westfoxtrot/cypher/rev5/rev5.c
deleted file mode 100644
index 37ca9cf3c16..00000000000
--- a/keyboards/westfoxtrot/cypher/rev5/rev5.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright 2019 westfoxtrot
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-#include "quantum.h"
-
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if(res) {
- // gpio_write_pin sets the pin high for 1 and low for 0.
- // In this example the pins are inverted, setting
- // it low/0 turns it on, and high/1 turns the LED off.
- // This behavior depends on whether the LED is between the pin
- // and VCC or the pin and GND.
- gpio_write_pin(D3, led_state.num_lock);
- gpio_write_pin(D5, led_state.caps_lock);
- gpio_write_pin(D2, led_state.scroll_lock);
- }
- return res;
-}
diff --git a/keyboards/westfoxtrot/prophet/keyboard.json b/keyboards/westfoxtrot/prophet/keyboard.json
index 049f5cd7fc5..f82c6da14dd 100644
--- a/keyboards/westfoxtrot/prophet/keyboard.json
+++ b/keyboards/westfoxtrot/prophet/keyboard.json
@@ -17,6 +17,9 @@
"nkro": true,
"sleep_led": true
},
+ "indicators": {
+ "caps_lock": "B13"
+ },
"qmk": {
"locking": {
"enabled": true,
diff --git a/keyboards/westfoxtrot/prophet/prophet.c b/keyboards/westfoxtrot/prophet/prophet.c
index 3ef0a3f9288..b33ecf90b41 100644
--- a/keyboards/westfoxtrot/prophet/prophet.c
+++ b/keyboards/westfoxtrot/prophet/prophet.c
@@ -1,16 +1,9 @@
#include "quantum.h"
-void keyboard_pre_init_kb (void) {
+void keyboard_pre_init_kb(void) {
gpio_set_pin_output(B12);
- gpio_set_pin_output(B13);
-}
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if(res) {
- gpio_write_pin(B13, led_state.caps_lock);
- }
- return res;
+ keyboard_pre_init_user();
}
__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) {