diff options
30 files changed, 20 insertions, 215 deletions
diff --git a/keyboards/clueboard/66/rev4/rev4.c b/keyboards/clueboard/66/rev4/rev4.c index 00d4f325e..510181827 100644 --- a/keyboards/clueboard/66/rev4/rev4.c +++ b/keyboards/clueboard/66/rev4/rev4.c | |||
| @@ -1,12 +1,6 @@ | |||
| 1 | #include "rev4.h" | 1 | #include "rev4.h" |
| 2 | 2 | ||
| 3 | void matrix_init_kb(void) { | 3 | void led_init_ports(void) { |
| 4 | led_init_ports(); | ||
| 5 | |||
| 6 | matrix_init_user(); | ||
| 7 | } | ||
| 8 | |||
| 9 | void led_init_ports() { | ||
| 10 | // Set our LED pins as output | 4 | // Set our LED pins as output |
| 11 | setPinOutput(B13); // LED1 | 5 | setPinOutput(B13); // LED1 |
| 12 | writePinLow(B13); | 6 | writePinLow(B13); |
diff --git a/keyboards/dk60/dk60.c b/keyboards/dk60/dk60.c index 6d72ff6bd..7d9f79386 100644 --- a/keyboards/dk60/dk60.c +++ b/keyboards/dk60/dk60.c | |||
| @@ -34,7 +34,6 @@ void dk60_blink_all_leds(void) { | |||
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | void matrix_init_kb(void) { | 36 | void matrix_init_kb(void) { |
| 37 | led_init_ports(); | ||
| 38 | dk60_blink_all_leds(); | 37 | dk60_blink_all_leds(); |
| 39 | 38 | ||
| 40 | matrix_init_user(); | 39 | matrix_init_user(); |
diff --git a/keyboards/evyd13/atom47/rev2/rev2.c b/keyboards/evyd13/atom47/rev2/rev2.c index 06fce06da..0242a84f4 100644 --- a/keyboards/evyd13/atom47/rev2/rev2.c +++ b/keyboards/evyd13/atom47/rev2/rev2.c | |||
| @@ -1,19 +1,6 @@ | |||
| 1 | #include "rev2.h" | 1 | #include "rev2.h" |
| 2 | #include "led.h" | 2 | #include "led.h" |
| 3 | 3 | ||
| 4 | void matrix_init_kb(void) { | ||
| 5 | // put your keyboard start-up code here | ||
| 6 | // runs once when the firmware starts up | ||
| 7 | matrix_init_user(); | ||
| 8 | led_init_ports(); | ||
| 9 | }; | ||
| 10 | |||
| 11 | void matrix_scan_kb(void) { | ||
| 12 | // put your looping keyboard code here | ||
| 13 | // runs every cycle (a lot) | ||
| 14 | matrix_scan_user(); | ||
| 15 | }; | ||
| 16 | |||
| 17 | void led_init_ports(void) { | 4 | void led_init_ports(void) { |
| 18 | // * Set our LED pins as output | 5 | // * Set our LED pins as output |
| 19 | DDRB &= ~(1<<5); | 6 | DDRB &= ~(1<<5); |
diff --git a/keyboards/evyd13/atom47/rev3/rev3.c b/keyboards/evyd13/atom47/rev3/rev3.c index c541ed559..24e12c840 100644 --- a/keyboards/evyd13/atom47/rev3/rev3.c +++ b/keyboards/evyd13/atom47/rev3/rev3.c | |||
| @@ -1,19 +1,6 @@ | |||
| 1 | #include "rev3.h" | 1 | #include "rev3.h" |
| 2 | #include "led.h" | 2 | #include "led.h" |
| 3 | 3 | ||
| 4 | void matrix_init_kb(void) { | ||
| 5 | // put your keyboard start-up code here | ||
| 6 | // runs once when the firmware starts up | ||
| 7 | matrix_init_user(); | ||
| 8 | led_init_ports(); | ||
| 9 | }; | ||
| 10 | |||
| 11 | void matrix_scan_kb(void) { | ||
| 12 | // put your looping keyboard code here | ||
| 13 | // runs every cycle (a lot) | ||
| 14 | matrix_scan_user(); | ||
| 15 | }; | ||
| 16 | |||
| 17 | void led_init_ports(void) { | 4 | void led_init_ports(void) { |
| 18 | // * Set our LED pins as output | 5 | // * Set our LED pins as output |
| 19 | DDRE |= (1 << 6); | 6 | DDRE |= (1 << 6); |
diff --git a/keyboards/evyd13/gh80_3700/gh80_3700.c b/keyboards/evyd13/gh80_3700/gh80_3700.c index f607a440e..40093f102 100644 --- a/keyboards/evyd13/gh80_3700/gh80_3700.c +++ b/keyboards/evyd13/gh80_3700/gh80_3700.c | |||
| @@ -15,14 +15,6 @@ | |||
| 15 | */ | 15 | */ |
| 16 | #include "gh80_3700.h" | 16 | #include "gh80_3700.h" |
| 17 | 17 | ||
| 18 | void matrix_init_kb(void) { | ||
| 19 | // put your keyboard start-up code here | ||
| 20 | // runs once when the firmware starts up | ||
| 21 | |||
| 22 | matrix_init_user(); | ||
| 23 | led_init_ports(); | ||
| 24 | } | ||
| 25 | |||
| 26 | void led_init_ports(void) { | 18 | void led_init_ports(void) { |
| 27 | setPinOutput(E6); | 19 | setPinOutput(E6); |
| 28 | setPinOutput(B1); | 20 | setPinOutput(B1); |
diff --git a/keyboards/evyd13/pockettype/pockettype.c b/keyboards/evyd13/pockettype/pockettype.c index fe25a7048..06175edf5 100644 --- a/keyboards/evyd13/pockettype/pockettype.c +++ b/keyboards/evyd13/pockettype/pockettype.c | |||
| @@ -15,12 +15,6 @@ | |||
| 15 | */ | 15 | */ |
| 16 | #include "pockettype.h" | 16 | #include "pockettype.h" |
| 17 | 17 | ||
| 18 | void matrix_init_kb(void) { | ||
| 19 | led_init_ports(); | ||
| 20 | |||
| 21 | matrix_init_user(); | ||
| 22 | }; | ||
| 23 | |||
| 24 | void led_init_ports(void) { | 18 | void led_init_ports(void) { |
| 25 | // * Enable LED anodes (Vbus pin is replaced by B0 on some boards) | 19 | // * Enable LED anodes (Vbus pin is replaced by B0 on some boards) |
| 26 | setPinOutput(B0); | 20 | setPinOutput(B0); |
diff --git a/keyboards/handwired/jopr/jopr.c b/keyboards/handwired/jopr/jopr.c index 3dccb719c..a337867dd 100644 --- a/keyboards/handwired/jopr/jopr.c +++ b/keyboards/handwired/jopr/jopr.c | |||
| @@ -1,8 +1,4 @@ | |||
| 1 | #include "jopr.h" | 1 | #include "jopr.h" |
| 2 | void matrix_init_kb(void) { | ||
| 3 | matrix_init_user(); | ||
| 4 | led_init_ports(); | ||
| 5 | }; | ||
| 6 | 2 | ||
| 7 | void led_init_ports(void) { | 3 | void led_init_ports(void) { |
| 8 | setPinOutput(F0); | 4 | setPinOutput(F0); |
diff --git a/keyboards/hardlineworks/otd_plus/config.h b/keyboards/hardlineworks/otd_plus/config.h index 5474dbfee..15e6df758 100644 --- a/keyboards/hardlineworks/otd_plus/config.h +++ b/keyboards/hardlineworks/otd_plus/config.h | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | /* COL2ROW or ROW2COL */ | 20 | /* COL2ROW or ROW2COL */ |
| 21 | #define DIODE_DIRECTION COL2ROW | 21 | #define DIODE_DIRECTION COL2ROW |
| 22 | 22 | ||
| 23 | #define CAPS_LOCK_LED_PIN F4 | 23 | #define LED_CAPS_LOCK_PIN F4 |
| 24 | #define SCROLL_LOCK_LED_PIN D5 | 24 | #define LED_SCROLL_LOCK_PIN D5 |
| 25 | 25 | ||
| 26 | /* Set 0 if debouncing isn't needed */ | 26 | /* Set 0 if debouncing isn't needed */ |
| 27 | #define DEBOUNCE 5 | 27 | #define DEBOUNCE 5 |
diff --git a/keyboards/hardlineworks/otd_plus/otd_plus.c b/keyboards/hardlineworks/otd_plus/otd_plus.c index f7f96800d..29d395d28 100644 --- a/keyboards/hardlineworks/otd_plus/otd_plus.c +++ b/keyboards/hardlineworks/otd_plus/otd_plus.c | |||
| @@ -1,12 +1 @@ | |||
| 1 | #include "otd_plus.h" | #include "otd_plus.h" | |
| 2 | |||
| 3 | void keyboard_pre_init_kb(void) { | ||
| 4 | led_init_ports(); | ||
| 5 | keyboard_pre_init_user(); | ||
| 6 | } | ||
| 7 | void led_init_ports(void) { | ||
| 8 | setPinOutput(CAPS_LOCK_LED_PIN); | ||
| 9 | setPinOutput(SCROLL_LOCK_LED_PIN); | ||
| 10 | } | ||
| 11 | |||
| 12 | |||
diff --git a/keyboards/id80/config.h b/keyboards/id80/config.h index fb11ab2cb..c6cf66738 100644 --- a/keyboards/id80/config.h +++ b/keyboards/id80/config.h | |||
| @@ -57,7 +57,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 57 | #define BACKLIGHT_BREATHING | 57 | #define BACKLIGHT_BREATHING |
| 58 | #define BACKLIGHT_LEVELS 3 | 58 | #define BACKLIGHT_LEVELS 3 |
| 59 | 59 | ||
| 60 | #define CAPS_LOCK_LED_PIN C7 | 60 | #define LED_CAPS_LOCK_PIN C7 |
| 61 | #define LED_PIN_ON_STATE 0 | ||
| 61 | 62 | ||
| 62 | #define RGB_DI_PIN E2 | 63 | #define RGB_DI_PIN E2 |
| 63 | #ifdef RGB_DI_PIN | 64 | #ifdef RGB_DI_PIN |
diff --git a/keyboards/id80/id80.c b/keyboards/id80/id80.c index 5e5dbc312..4a06660de 100644 --- a/keyboards/id80/id80.c +++ b/keyboards/id80/id80.c | |||
| @@ -14,23 +14,3 @@ | |||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ | 15 | */ |
| 16 | #include "id80.h" | 16 | #include "id80.h" |
| 17 | |||
| 18 | void matrix_init_kb(void) { | ||
| 19 | led_init_ports(); | ||
| 20 | matrix_init_user(); | ||
| 21 | } | ||
| 22 | |||
| 23 | void led_init_ports(void) { | ||
| 24 | setPinOutput(CAPS_LOCK_LED_PIN); | ||
| 25 | } | ||
| 26 | |||
| 27 | bool led_update_kb(led_t led_state) { | ||
| 28 | bool res = led_update_user(led_state); | ||
| 29 | if (res) { | ||
| 30 | writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock); | ||
| 31 | } | ||
| 32 | return res; | ||
| 33 | } | ||
| 34 | |||
| 35 | // partially generated by KBFirmware JSON to QMK Parser | ||
| 36 | // https://noroadsleft.github.io/kbf_qmk_converter/ | ||
diff --git a/keyboards/id87/config.h b/keyboards/id87/config.h index e0a81eb75..a268091d4 100644 --- a/keyboards/id87/config.h +++ b/keyboards/id87/config.h | |||
| @@ -51,7 +51,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 51 | #define BACKLIGHT_LEVELS 3 | 51 | #define BACKLIGHT_LEVELS 3 |
| 52 | #endif | 52 | #endif |
| 53 | 53 | ||
| 54 | #define CAPS_LOCK_LED_PIN C7 | 54 | #define LED_CAPS_LOCK_PIN C7 |
| 55 | 55 | ||
| 56 | /* Set 0 if debouncing isn't needed */ | 56 | /* Set 0 if debouncing isn't needed */ |
| 57 | #define DEBOUNCE 5 | 57 | #define DEBOUNCE 5 |
diff --git a/keyboards/id87/id87.c b/keyboards/id87/id87.c index 0ec1c76bc..145edc163 100644 --- a/keyboards/id87/id87.c +++ b/keyboards/id87/id87.c | |||
| @@ -13,20 +13,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 13 | */ | 13 | */ |
| 14 | 14 | ||
| 15 | #include "id87.h" | 15 | #include "id87.h" |
| 16 | |||
| 17 | void matrix_init_kb(void) { | ||
| 18 | led_init_ports(); | ||
| 19 | matrix_init_user(); | ||
| 20 | } | ||
| 21 | |||
| 22 | void led_init_ports(void) { | ||
| 23 | setPinOutput(CAPS_LOCK_LED_PIN); | ||
| 24 | } | ||
| 25 | |||
| 26 | bool led_update_kb(led_t led_state) { | ||
| 27 | bool res = led_update_user(led_state); | ||
| 28 | if (res) { | ||
| 29 | writePin(CAPS_LOCK_LED_PIN, led_state.caps_lock); | ||
| 30 | } | ||
| 31 | return res; | ||
| 32 | } \ No newline at end of file | ||
diff --git a/keyboards/kmini/kmini.c b/keyboards/kmini/kmini.c index f67231871..cd8cd68a9 100755 --- a/keyboards/kmini/kmini.c +++ b/keyboards/kmini/kmini.c | |||
| @@ -15,27 +15,6 @@ | |||
| 15 | */ | 15 | */ |
| 16 | #include "kmini.h" | 16 | #include "kmini.h" |
| 17 | 17 | ||
| 18 | void matrix_init_kb(void) { | ||
| 19 | // put your keyboard start-up code here | ||
| 20 | // runs once when the firmware starts up | ||
| 21 | led_init_ports(); | ||
| 22 | matrix_init_user(); | ||
| 23 | } | ||
| 24 | |||
| 25 | void matrix_scan_kb(void) { | ||
| 26 | // put your looping keyboard code here | ||
| 27 | // runs every cycle (a lot) | ||
| 28 | |||
| 29 | matrix_scan_user(); | ||
| 30 | } | ||
| 31 | |||
| 32 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
| 33 | // put your per-action keyboard code here | ||
| 34 | // runs for every action, just before processing by the firmware | ||
| 35 | |||
| 36 | return process_record_user(keycode, record); | ||
| 37 | } | ||
| 38 | |||
| 39 | void led_init_ports(void) { | 18 | void led_init_ports(void) { |
| 40 | DDRB |= (1<<1); // OUT | 19 | DDRB |= (1<<1); // OUT |
| 41 | DDRB |= (1<<2); // OUT | 20 | DDRB |= (1<<2); // OUT |
diff --git a/keyboards/knops/mini/keymaps/default-gsm-newbs/keymap.c b/keyboards/knops/mini/keymaps/default-gsm-newbs/keymap.c index 68c96fc19..4ac904dc7 100644 --- a/keyboards/knops/mini/keymaps/default-gsm-newbs/keymap.c +++ b/keyboards/knops/mini/keymaps/default-gsm-newbs/keymap.c | |||
| @@ -204,7 +204,7 @@ void set_layer_led(int layerId) { | |||
| 204 | } | 204 | } |
| 205 | 205 | ||
| 206 | void matrix_init_user(void) { | 206 | void matrix_init_user(void) { |
| 207 | led_init_ports(); | 207 | led_init_ports_user(); |
| 208 | 208 | ||
| 209 | PORTB |= (1 << 7); | 209 | PORTB |= (1 << 7); |
| 210 | DDRB &= ~(1<<7); | 210 | DDRB &= ~(1<<7); |
| @@ -223,7 +223,7 @@ void matrix_init_user(void) { | |||
| 223 | void matrix_scan_user(void) { | 223 | void matrix_scan_user(void) { |
| 224 | } | 224 | } |
| 225 | 225 | ||
| 226 | void led_init_ports() { | 226 | void led_init_ports_user() { |
| 227 | // led voor switch #1 | 227 | // led voor switch #1 |
| 228 | DDRD |= (1<<7); | 228 | DDRD |= (1<<7); |
| 229 | PORTD &= ~(1<<7); | 229 | PORTD &= ~(1<<7); |
diff --git a/keyboards/knops/mini/keymaps/default/keymap.c b/keyboards/knops/mini/keymaps/default/keymap.c index 859f07aa0..d916aa9d1 100644 --- a/keyboards/knops/mini/keymaps/default/keymap.c +++ b/keyboards/knops/mini/keymaps/default/keymap.c | |||
| @@ -130,7 +130,7 @@ void set_layer_led(int layerId) { | |||
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | void matrix_init_user(void) { | 132 | void matrix_init_user(void) { |
| 133 | led_init_ports(); | 133 | led_init_ports_user(); |
| 134 | 134 | ||
| 135 | PORTB |= (1 << 7); | 135 | PORTB |= (1 << 7); |
| 136 | DDRB &= ~(1<<7); | 136 | DDRB &= ~(1<<7); |
| @@ -149,7 +149,7 @@ void matrix_init_user(void) { | |||
| 149 | void matrix_scan_user(void) { | 149 | void matrix_scan_user(void) { |
| 150 | } | 150 | } |
| 151 | 151 | ||
| 152 | void led_init_ports() { | 152 | void led_init_ports_user() { |
| 153 | // led voor switch #1 | 153 | // led voor switch #1 |
| 154 | DDRD |= (1<<7); | 154 | DDRD |= (1<<7); |
| 155 | PORTD &= ~(1<<7); | 155 | PORTD &= ~(1<<7); |
diff --git a/keyboards/knops/mini/keymaps/knops/keymap.c b/keyboards/knops/mini/keymaps/knops/keymap.c index 7bc7fbe43..52360d6a8 100644 --- a/keyboards/knops/mini/keymaps/knops/keymap.c +++ b/keyboards/knops/mini/keymaps/knops/keymap.c | |||
| @@ -82,7 +82,7 @@ void set_led_state(int ledId, bool state) { | |||
| 82 | } | 82 | } |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | void led_init_ports() { | 85 | void led_init_ports_user() { |
| 86 | PORTB |= (1 << 7); | 86 | PORTB |= (1 << 7); |
| 87 | DDRB &= ~(1<<7); | 87 | DDRB &= ~(1<<7); |
| 88 | 88 | ||
| @@ -106,7 +106,7 @@ void led_set_layer(int layer) { | |||
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | void matrix_init_user(void) { | 108 | void matrix_init_user(void) { |
| 109 | led_init_ports(); | 109 | led_init_ports_user(); |
| 110 | 110 | ||
| 111 | led_set_layer(1); | 111 | led_set_layer(1); |
| 112 | 112 | ||
diff --git a/keyboards/knops/mini/keymaps/mverteuil/keymap.c b/keyboards/knops/mini/keymaps/mverteuil/keymap.c index 5ecba0d5a..bd172e7aa 100644 --- a/keyboards/knops/mini/keymaps/mverteuil/keymap.c +++ b/keyboards/knops/mini/keymaps/mverteuil/keymap.c | |||
| @@ -270,7 +270,7 @@ void led_set_layer(int layer) { | |||
| 270 | /* | 270 | /* |
| 271 | * Prepare all LED ports for output | 271 | * Prepare all LED ports for output |
| 272 | */ | 272 | */ |
| 273 | void led_init_ports() { | 273 | void led_init_ports_user() { |
| 274 | setPinOutput(D7); // Switch 1 LED | 274 | setPinOutput(D7); // Switch 1 LED |
| 275 | setPinOutput(C6); // Switch 2 LED Pin1 | 275 | setPinOutput(C6); // Switch 2 LED Pin1 |
| 276 | setPinOutput(C7); // Switch 2 LED Pin2 | 276 | setPinOutput(C7); // Switch 2 LED Pin2 |
| @@ -291,7 +291,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { | |||
| 291 | } | 291 | } |
| 292 | 292 | ||
| 293 | void matrix_init_user(void) { | 293 | void matrix_init_user(void) { |
| 294 | led_init_ports(); | 294 | led_init_ports_user(); |
| 295 | led_init_animation(); | 295 | led_init_animation(); |
| 296 | } | 296 | } |
| 297 | 297 | ||
diff --git a/keyboards/mechlovin/hannah60rgb/rev1/rev1.c b/keyboards/mechlovin/hannah60rgb/rev1/rev1.c index 5acea8c66..6b1b8604a 100644 --- a/keyboards/mechlovin/hannah60rgb/rev1/rev1.c +++ b/keyboards/mechlovin/hannah60rgb/rev1/rev1.c | |||
| @@ -16,13 +16,6 @@ | |||
| 16 | 16 | ||
| 17 | #include "hannah60rgb.h" | 17 | #include "hannah60rgb.h" |
| 18 | 18 | ||
| 19 | void matrix_init_kb(void) { | ||
| 20 | // put your keyboard start-up code here | ||
| 21 | // runs once when the firmware starts up | ||
| 22 | matrix_init_user(); | ||
| 23 | led_init_ports(); | ||
| 24 | }; | ||
| 25 | |||
| 26 | #ifdef RGB_MATRIX_ENABLE | 19 | #ifdef RGB_MATRIX_ENABLE |
| 27 | led_config_t g_led_config = { { | 20 | led_config_t g_led_config = { { |
| 28 | //Key Matrix to LED Index | 21 | //Key Matrix to LED Index |
diff --git a/keyboards/mechlovin/hannah910/hannah910.c b/keyboards/mechlovin/hannah910/hannah910.c index 99addb981..3237636be 100644 --- a/keyboards/mechlovin/hannah910/hannah910.c +++ b/keyboards/mechlovin/hannah910/hannah910.c | |||
| @@ -15,10 +15,6 @@ | |||
| 15 | */ | 15 | */ |
| 16 | #include "hannah910.h" | 16 | #include "hannah910.h" |
| 17 | 17 | ||
| 18 | void matrix_init_kb(void) { | ||
| 19 | matrix_init_user(); | ||
| 20 | led_init_ports(); | ||
| 21 | }; | ||
| 22 | void led_init_ports(void) { | 18 | void led_init_ports(void) { |
| 23 | setPinOutput(B2); | 19 | setPinOutput(B2); |
| 24 | setPinOutput(D0); | 20 | setPinOutput(D0); |
diff --git a/keyboards/mechlovin/infinity87/rev2/rev2.c b/keyboards/mechlovin/infinity87/rev2/rev2.c index 5a92f8bec..dfaa27d03 100644 --- a/keyboards/mechlovin/infinity87/rev2/rev2.c +++ b/keyboards/mechlovin/infinity87/rev2/rev2.c | |||
| @@ -16,10 +16,6 @@ | |||
| 16 | 16 | ||
| 17 | #include "rev2.h" | 17 | #include "rev2.h" |
| 18 | 18 | ||
| 19 | void matrix_init_kb(void) { | ||
| 20 | matrix_init_user(); | ||
| 21 | led_init_ports(); | ||
| 22 | }; | ||
| 23 | void led_init_ports(void) { | 19 | void led_init_ports(void) { |
| 24 | setPinOutput(A5); | 20 | setPinOutput(A5); |
| 25 | setPinOutput(A6); | 21 | setPinOutput(A6); |
diff --git a/keyboards/mechlovin/infinityce/infinityce.c b/keyboards/mechlovin/infinityce/infinityce.c index 5d75b480b..84eaf0b7e 100644 --- a/keyboards/mechlovin/infinityce/infinityce.c +++ b/keyboards/mechlovin/infinityce/infinityce.c | |||
| @@ -16,13 +16,6 @@ | |||
| 16 | 16 | ||
| 17 | #include "infinityce.h" | 17 | #include "infinityce.h" |
| 18 | 18 | ||
| 19 | void matrix_init_kb(void) { | ||
| 20 | // put your keyboard start-up code here | ||
| 21 | // runs once when the firmware starts up | ||
| 22 | matrix_init_user(); | ||
| 23 | led_init_ports(); | ||
| 24 | }; | ||
| 25 | |||
| 26 | void led_init_ports(void) { | 19 | void led_init_ports(void) { |
| 27 | // * Set our LED pins as output | 20 | // * Set our LED pins as output |
| 28 | setPinOutput(B3); | 21 | setPinOutput(B3); |
diff --git a/keyboards/mechlovin/kanu/kanu.c b/keyboards/mechlovin/kanu/kanu.c index d19b7f103..ceb874e12 100644 --- a/keyboards/mechlovin/kanu/kanu.c +++ b/keyboards/mechlovin/kanu/kanu.c | |||
| @@ -16,10 +16,6 @@ | |||
| 16 | 16 | ||
| 17 | #include "kanu.h" | 17 | #include "kanu.h" |
| 18 | 18 | ||
| 19 | void matrix_init_kb(void) { | ||
| 20 | matrix_init_user(); | ||
| 21 | led_init_ports(); | ||
| 22 | }; | ||
| 23 | void led_init_ports(void) { | 19 | void led_init_ports(void) { |
| 24 | setPinOutput(B2); | 20 | setPinOutput(B2); |
| 25 | setPinOutput(D0); | 21 | setPinOutput(D0); |
diff --git a/keyboards/tokyokeyboard/tokyo60/tokyo60.c b/keyboards/tokyokeyboard/tokyo60/tokyo60.c index 2126bb612..67113700a 100644 --- a/keyboards/tokyokeyboard/tokyo60/tokyo60.c +++ b/keyboards/tokyokeyboard/tokyo60/tokyo60.c | |||
| @@ -1,18 +1 @@ | |||
| 1 | #include "tokyo60.h" | #include "tokyo60.h" | |
| 2 | |||
| 3 | void matrix_init_kb(void) { | ||
| 4 | // Keyboard start-up code goes here | ||
| 5 | // Runs once when the firmware starts up | ||
| 6 | matrix_init_user(); | ||
| 7 | led_init_ports(); | ||
| 8 | }; | ||
| 9 | |||
| 10 | void matrix_scan_kb(void) { | ||
| 11 | // Looping keyboard code goes here | ||
| 12 | // This runs every cycle (a lot) | ||
| 13 | matrix_scan_user(); | ||
| 14 | }; | ||
| 15 | |||
| 16 | void led_init_ports(void) { | ||
| 17 | /* LEDs on */ | ||
| 18 | } | ||
diff --git a/keyboards/wheatfield/split75/config.h b/keyboards/wheatfield/split75/config.h index 4646dac46..63c9492c3 100644 --- a/keyboards/wheatfield/split75/config.h +++ b/keyboards/wheatfield/split75/config.h | |||
| @@ -10,6 +10,10 @@ | |||
| 10 | #define MATRIX_ROWS 8 | 10 | #define MATRIX_ROWS 8 |
| 11 | #define MATRIX_COLS 14 | 11 | #define MATRIX_COLS 14 |
| 12 | 12 | ||
| 13 | #define LED_NUM_LOCK_PIN D0 | ||
| 14 | #define LED_CAPS_LOCK_PIN D1 | ||
| 15 | #define LED_SCROLL_LOCK_PIN D6 | ||
| 16 | |||
| 13 | #define RGBLED_NUM 8 | 17 | #define RGBLED_NUM 8 |
| 14 | #define RGBLIGHT_ANIMATIONS | 18 | #define RGBLIGHT_ANIMATIONS |
| 15 | #define RGBLIGHT_SLEEP | 19 | #define RGBLIGHT_SLEEP |
diff --git a/keyboards/wheatfield/split75/split75.c b/keyboards/wheatfield/split75/split75.c index 3ed456292..b8a3fe6c2 100644 --- a/keyboards/wheatfield/split75/split75.c +++ b/keyboards/wheatfield/split75/split75.c | |||
| @@ -1,25 +1 @@ | |||
| 1 | #include "split75.h" | #include "split75.h" | |
| 2 | |||
| 3 | #include "i2c_master.h" | ||
| 4 | |||
| 5 | |||
| 6 | void keyboard_pre_init_kb(void) { | ||
| 7 | led_init_ports(); | ||
| 8 | keyboard_pre_init_user(); | ||
| 9 | } | ||
| 10 | |||
| 11 | void led_init_ports(void) { | ||
| 12 | setPinOutput(NUMLOCK_LED_PIN); | ||
| 13 | setPinOutput(CAPSLOCK_LED_PIN); | ||
| 14 | setPinOutput(SCROLLLOCK_LED_PIN); | ||
| 15 | } | ||
| 16 | |||
| 17 | bool led_update_kb(led_t led_state) { | ||
| 18 | bool res = led_update_user(led_state); | ||
| 19 | if(res) { | ||
| 20 | writePin(NUMLOCK_LED_PIN, led_state.num_lock); | ||
| 21 | writePin(CAPSLOCK_LED_PIN, led_state.caps_lock); | ||
| 22 | writePin(SCROLLLOCK_LED_PIN, led_state.scroll_lock); | ||
| 23 | } | ||
| 24 | return res; | ||
| 25 | } | ||
diff --git a/keyboards/wheatfield/split75/split75.h b/keyboards/wheatfield/split75/split75.h index 9a84c129d..93da3e7b8 100644 --- a/keyboards/wheatfield/split75/split75.h +++ b/keyboards/wheatfield/split75/split75.h | |||
| @@ -45,7 +45,3 @@ | |||
| 45 | { K06, K16, K26, K36, K46, KC_NO, KC_NO, KC_NO, K86, K96, KC_NO, K116, K126, K136 }, \ | 45 | { K06, K16, K26, K36, K46, KC_NO, KC_NO, KC_NO, K86, K96, KC_NO, K116, K126, K136 }, \ |
| 46 | { K07, K17, K27, K37, K47, KC_NO, KC_NO, KC_NO, K87, K97, K107, K117, K127, K137 } \ | 46 | { K07, K17, K27, K37, K47, KC_NO, KC_NO, KC_NO, K87, K97, K107, K117, K127, K137 } \ |
| 47 | } | 47 | } |
| 48 | |||
| 49 | #define NUMLOCK_LED_PIN D0 | ||
| 50 | #define CAPSLOCK_LED_PIN D1 | ||
| 51 | #define SCROLLLOCK_LED_PIN D6 | ||
diff --git a/keyboards/wilba_tech/rama_works_m10_b/keymaps/knops/keymap.c b/keyboards/wilba_tech/rama_works_m10_b/keymaps/knops/keymap.c index b90ca686f..d58606495 100644 --- a/keyboards/wilba_tech/rama_works_m10_b/keymaps/knops/keymap.c +++ b/keyboards/wilba_tech/rama_works_m10_b/keymaps/knops/keymap.c | |||
| @@ -23,14 +23,8 @@ void set_led_state(int ledId, bool state) | |||
| 23 | { | 23 | { |
| 24 | } | 24 | } |
| 25 | 25 | ||
| 26 | void led_init_ports() | ||
| 27 | { | ||
| 28 | } | ||
| 29 | |||
| 30 | void led_set_layer(int layer) | 26 | void led_set_layer(int layer) |
| 31 | { | 27 | { |
| 32 | led_init_ports(); | ||
| 33 | |||
| 34 | led_set_layer(0); | 28 | led_set_layer(0); |
| 35 | 29 | ||
| 36 | /*KNOPS_SIMPLELED_STATES*/ | 30 | /*KNOPS_SIMPLELED_STATES*/ |
diff --git a/keyboards/wilba_tech/rama_works_m6_a/keymaps/knops/keymap.c b/keyboards/wilba_tech/rama_works_m6_a/keymaps/knops/keymap.c index d687fe851..db2167c46 100644 --- a/keyboards/wilba_tech/rama_works_m6_a/keymaps/knops/keymap.c +++ b/keyboards/wilba_tech/rama_works_m6_a/keymaps/knops/keymap.c | |||
| @@ -60,7 +60,7 @@ void set_led_state(int ledId, bool state) | |||
| 60 | } | 60 | } |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | void led_init_ports() | 63 | void led_init_ports_user() |
| 64 | { | 64 | { |
| 65 | // Switch #1 | 65 | // Switch #1 |
| 66 | DDRD |= (1 << 6); | 66 | DDRD |= (1 << 6); |
| @@ -95,7 +95,7 @@ void led_set_layer(int layer) | |||
| 95 | 95 | ||
| 96 | void matrix_init_user(void) | 96 | void matrix_init_user(void) |
| 97 | { | 97 | { |
| 98 | led_init_ports(); | 98 | led_init_ports_user(); |
| 99 | 99 | ||
| 100 | led_set_layer(0); | 100 | led_set_layer(0); |
| 101 | 101 | ||
diff --git a/quantum/quantum.c b/quantum/quantum.c index f35939216..3329c1146 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c | |||
| @@ -356,10 +356,7 @@ void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3) { layer_st | |||
| 356 | 356 | ||
| 357 | void matrix_init_quantum() { | 357 | void matrix_init_quantum() { |
| 358 | magic(); | 358 | magic(); |
| 359 | #if defined(LED_NUM_LOCK_PIN) || defined(LED_CAPS_LOCK_PIN) || defined(LED_SCROLL_LOCK_PIN) || defined(LED_COMPOSE_PIN) || defined(LED_KANA_PIN) | ||
| 360 | // TODO: remove calls to led_init_ports from keyboards and remove ifdef | ||
| 361 | led_init_ports(); | 359 | led_init_ports(); |
| 362 | #endif | ||
| 363 | #ifdef BACKLIGHT_ENABLE | 360 | #ifdef BACKLIGHT_ENABLE |
| 364 | backlight_init_ports(); | 361 | backlight_init_ports(); |
| 365 | #endif | 362 | #endif |
