diff options
Diffstat (limited to 'keyboards')
29 files changed, 20 insertions, 212 deletions
diff --git a/keyboards/clueboard/66/rev4/rev4.c b/keyboards/clueboard/66/rev4/rev4.c index 00d4f325e5..5101818270 100644 --- a/keyboards/clueboard/66/rev4/rev4.c +++ b/keyboards/clueboard/66/rev4/rev4.c @@ -1,12 +1,6 @@ #include "rev4.h" -void matrix_init_kb(void) { - led_init_ports(); - - matrix_init_user(); -} - -void led_init_ports() { +void led_init_ports(void) { // Set our LED pins as output setPinOutput(B13); // LED1 writePinLow(B13); diff --git a/keyboards/dk60/dk60.c b/keyboards/dk60/dk60.c index 6d72ff6bd8..7d9f793866 100644 --- a/keyboards/dk60/dk60.c +++ b/keyboards/dk60/dk60.c @@ -34,7 +34,6 @@ void dk60_blink_all_leds(void) { } void matrix_init_kb(void) { - led_init_ports(); dk60_blink_all_leds(); matrix_init_user(); diff --git a/keyboards/evyd13/atom47/rev2/rev2.c b/keyboards/evyd13/atom47/rev2/rev2.c index 06fce06dad..0242a84f45 100644 --- a/keyboards/evyd13/atom47/rev2/rev2.c +++ b/keyboards/evyd13/atom47/rev2/rev2.c @@ -1,19 +1,6 @@ #include "rev2.h" #include "led.h" -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - matrix_init_user(); - led_init_ports(); -}; - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - matrix_scan_user(); -}; - void led_init_ports(void) { // * Set our LED pins as output DDRB &= ~(1<<5); diff --git a/keyboards/evyd13/atom47/rev3/rev3.c b/keyboards/evyd13/atom47/rev3/rev3.c index c541ed559c..24e12c840b 100644 --- a/keyboards/evyd13/atom47/rev3/rev3.c +++ b/keyboards/evyd13/atom47/rev3/rev3.c @@ -1,19 +1,6 @@ #include "rev3.h" #include "led.h" -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - matrix_init_user(); - led_init_ports(); -}; - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - matrix_scan_user(); -}; - void led_init_ports(void) { // * Set our LED pins as output DDRE |= (1 << 6); diff --git a/keyboards/evyd13/gh80_3700/gh80_3700.c b/keyboards/evyd13/gh80_3700/gh80_3700.c index f607a440e9..40093f1022 100644 --- a/keyboards/evyd13/gh80_3700/gh80_3700.c +++ b/keyboards/evyd13/gh80_3700/gh80_3700.c @@ -15,14 +15,6 @@ */ #include "gh80_3700.h" -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); - led_init_ports(); -} - void led_init_ports(void) { setPinOutput(E6); setPinOutput(B1); diff --git a/keyboards/evyd13/pockettype/pockettype.c b/keyboards/evyd13/pockettype/pockettype.c index fe25a7048c..06175edf5a 100644 --- a/keyboards/evyd13/pockettype/pockettype.c +++ b/keyboards/evyd13/pockettype/pockettype.c @@ -15,12 +15,6 @@ */ #include "pockettype.h" -void matrix_init_kb(void) { - led_init_ports(); - - matrix_init_user(); -}; - void led_init_ports(void) { // * Enable LED anodes (Vbus pin is replaced by B0 on some boards) setPinOutput(B0); diff --git a/keyboards/handwired/jopr/jopr.c b/keyboards/handwired/jopr/jopr.c index 3dccb719c2..a337867dd1 100644 --- a/keyboards/handwired/jopr/jopr.c +++ b/keyboards/handwired/jopr/jopr.c @@ -1,8 +1,4 @@ #include "jopr.h" -void matrix_init_kb(void) { - matrix_init_user(); - led_init_ports(); -}; void led_init_ports(void) { setPinOutput(F0); diff --git a/keyboards/hardlineworks/otd_plus/config.h b/keyboards/hardlineworks/otd_plus/config.h index 5474dbfee9..15e6df7588 100644 --- a/keyboards/hardlineworks/otd_plus/config.h +++ b/keyboards/hardlineworks/otd_plus/config.h @@ -20,8 +20,8 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define CAPS_LOCK_LED_PIN F4 -#define SCROLL_LOCK_LED_PIN D5 +#define LED_CAPS_LOCK_PIN F4 +#define LED_SCROLL_LOCK_PIN D5 /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/hardlineworks/otd_plus/otd_plus.c b/keyboards/hardlineworks/otd_plus/otd_plus.c index f7f96800d0..29d395d287 100644 --- a/keyboards/hardlineworks/otd_plus/otd_plus.c +++ b/keyboards/hardlineworks/otd_plus/otd_plus.c @@ -1,12 +1 @@ #include "otd_plus.h" - -void keyboard_pre_init_kb(void) { - led_init_ports(); - keyboard_pre_init_user(); -} -void led_init_ports(void) { - setPinOutput(CAPS_LOCK_LED_PIN); - setPinOutput(SCROLL_LOCK_LED_PIN); -} - - diff --git a/keyboards/id80/config.h b/keyboards/id80/config.h index fb11ab2cbe..c6cf667382 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/>. #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 -#define CAPS_LOCK_LED_PIN C7 +#define LED_CAPS_LOCK_PIN C7 +#define LED_PIN_ON_STATE 0 #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN diff --git a/keyboards/id80/id80.c b/keyboards/id80/id80.c index 5e5dbc3124..4a06660de9 100644 --- a/keyboards/id80/id80.c +++ b/keyboards/id80/id80.c @@ -14,23 +14,3 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "id80.h" - -void matrix_init_kb(void) { - led_init_ports(); - matrix_init_user(); -} - -void led_init_ports(void) { - setPinOutput(CAPS_LOCK_LED_PIN); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { - writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock); - } - return res; -} - -// partially generated by KBFirmware JSON to QMK Parser -// https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/id87/config.h b/keyboards/id87/config.h index e0a81eb755..a268091d40 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/>. #define BACKLIGHT_LEVELS 3 #endif -#define CAPS_LOCK_LED_PIN C7 +#define LED_CAPS_LOCK_PIN C7 /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/id87/id87.c b/keyboards/id87/id87.c index 0ec1c76bc9..145edc1639 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/>. */ #include "id87.h" - -void matrix_init_kb(void) { - led_init_ports(); - matrix_init_user(); -} - -void led_init_ports(void) { - setPinOutput(CAPS_LOCK_LED_PIN); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { - writePin(CAPS_LOCK_LED_PIN, led_state.caps_lock); - } - return res; -}
\ No newline at end of file diff --git a/keyboards/kmini/kmini.c b/keyboards/kmini/kmini.c index f67231871a..cd8cd68a92 100755 --- a/keyboards/kmini/kmini.c +++ b/keyboards/kmini/kmini.c @@ -15,27 +15,6 @@ */ #include "kmini.h" -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - led_init_ports(); - matrix_init_user(); -} - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // put your per-action keyboard code here - // runs for every action, just before processing by the firmware - - return process_record_user(keycode, record); -} - void led_init_ports(void) { DDRB |= (1<<1); // OUT 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 68c96fc192..4ac904dc75 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) { } void matrix_init_user(void) { - led_init_ports(); + led_init_ports_user(); PORTB |= (1 << 7); DDRB &= ~(1<<7); @@ -223,7 +223,7 @@ void matrix_init_user(void) { void matrix_scan_user(void) { } -void led_init_ports() { +void led_init_ports_user() { // led voor switch #1 DDRD |= (1<<7); PORTD &= ~(1<<7); diff --git a/keyboards/knops/mini/keymaps/default/keymap.c b/keyboards/knops/mini/keymaps/default/keymap.c index 859f07aa07..d916aa9d13 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) { } void matrix_init_user(void) { - led_init_ports(); + led_init_ports_user(); PORTB |= (1 << 7); DDRB &= ~(1<<7); @@ -149,7 +149,7 @@ void matrix_init_user(void) { void matrix_scan_user(void) { } -void led_init_ports() { +void led_init_ports_user() { // led voor switch #1 DDRD |= (1<<7); PORTD &= ~(1<<7); diff --git a/keyboards/knops/mini/keymaps/knops/keymap.c b/keyboards/knops/mini/keymaps/knops/keymap.c index 7bc7fbe43d..52360d6a8f 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) { } } -void led_init_ports() { +void led_init_ports_user() { PORTB |= (1 << 7); DDRB &= ~(1<<7); @@ -106,7 +106,7 @@ void led_set_layer(int layer) { } void matrix_init_user(void) { - led_init_ports(); + led_init_ports_user(); led_set_layer(1); diff --git a/keyboards/knops/mini/keymaps/mverteuil/keymap.c b/keyboards/knops/mini/keymaps/mverteuil/keymap.c index 5ecba0d5a1..bd172e7aa8 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) { /* * Prepare all LED ports for output */ -void led_init_ports() { +void led_init_ports_user() { setPinOutput(D7); // Switch 1 LED setPinOutput(C6); // Switch 2 LED Pin1 setPinOutput(C7); // Switch 2 LED Pin2 @@ -291,7 +291,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { } void matrix_init_user(void) { - led_init_ports(); + led_init_ports_user(); led_init_animation(); } diff --git a/keyboards/mechlovin/hannah60rgb/rev1/rev1.c b/keyboards/mechlovin/hannah60rgb/rev1/rev1.c index 5acea8c665..6b1b8604a2 100644 --- a/keyboards/mechlovin/hannah60rgb/rev1/rev1.c +++ b/keyboards/mechlovin/hannah60rgb/rev1/rev1.c @@ -16,13 +16,6 @@ #include "hannah60rgb.h" -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - matrix_init_user(); - led_init_ports(); -}; - #ifdef RGB_MATRIX_ENABLE led_config_t g_led_config = { { //Key Matrix to LED Index diff --git a/keyboards/mechlovin/hannah910/hannah910.c b/keyboards/mechlovin/hannah910/hannah910.c index 99addb981d..3237636be2 100644 --- a/keyboards/mechlovin/hannah910/hannah910.c +++ b/keyboards/mechlovin/hannah910/hannah910.c @@ -15,10 +15,6 @@ */ #include "hannah910.h" -void matrix_init_kb(void) { - matrix_init_user(); - led_init_ports(); -}; void led_init_ports(void) { setPinOutput(B2); setPinOutput(D0); diff --git a/keyboards/mechlovin/infinity87/rev2/rev2.c b/keyboards/mechlovin/infinity87/rev2/rev2.c index 5a92f8bec6..dfaa27d036 100644 --- a/keyboards/mechlovin/infinity87/rev2/rev2.c +++ b/keyboards/mechlovin/infinity87/rev2/rev2.c @@ -16,10 +16,6 @@ #include "rev2.h" -void matrix_init_kb(void) { - matrix_init_user(); - led_init_ports(); -}; void led_init_ports(void) { setPinOutput(A5); setPinOutput(A6); diff --git a/keyboards/mechlovin/infinityce/infinityce.c b/keyboards/mechlovin/infinityce/infinityce.c index 5d75b480b3..84eaf0b7ee 100644 --- a/keyboards/mechlovin/infinityce/infinityce.c +++ b/keyboards/mechlovin/infinityce/infinityce.c @@ -16,13 +16,6 @@ #include "infinityce.h" -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - matrix_init_user(); - led_init_ports(); -}; - void led_init_ports(void) { // * Set our LED pins as output setPinOutput(B3); diff --git a/keyboards/mechlovin/kanu/kanu.c b/keyboards/mechlovin/kanu/kanu.c index d19b7f1031..ceb874e124 100644 --- a/keyboards/mechlovin/kanu/kanu.c +++ b/keyboards/mechlovin/kanu/kanu.c @@ -16,10 +16,6 @@ #include "kanu.h" -void matrix_init_kb(void) { - matrix_init_user(); - led_init_ports(); -}; void led_init_ports(void) { setPinOutput(B2); setPinOutput(D0); diff --git a/keyboards/tokyokeyboard/tokyo60/tokyo60.c b/keyboards/tokyokeyboard/tokyo60/tokyo60.c index 2126bb612d..67113700a5 100644 --- a/keyboards/tokyokeyboard/tokyo60/tokyo60.c +++ b/keyboards/tokyokeyboard/tokyo60/tokyo60.c @@ -1,18 +1 @@ #include "tokyo60.h" - -void matrix_init_kb(void) { - // Keyboard start-up code goes here - // Runs once when the firmware starts up - matrix_init_user(); - led_init_ports(); -}; - -void matrix_scan_kb(void) { - // Looping keyboard code goes here - // This runs every cycle (a lot) - matrix_scan_user(); -}; - -void led_init_ports(void) { - /* LEDs on */ -} diff --git a/keyboards/wheatfield/split75/config.h b/keyboards/wheatfield/split75/config.h index 4646dac463..63c9492c31 100644 --- a/keyboards/wheatfield/split75/config.h +++ b/keyboards/wheatfield/split75/config.h @@ -10,6 +10,10 @@ #define MATRIX_ROWS 8 #define MATRIX_COLS 14 +#define LED_NUM_LOCK_PIN D0 +#define LED_CAPS_LOCK_PIN D1 +#define LED_SCROLL_LOCK_PIN D6 + #define RGBLED_NUM 8 #define RGBLIGHT_ANIMATIONS #define RGBLIGHT_SLEEP diff --git a/keyboards/wheatfield/split75/split75.c b/keyboards/wheatfield/split75/split75.c index 3ed4562928..b8a3fe6c28 100644 --- a/keyboards/wheatfield/split75/split75.c +++ b/keyboards/wheatfield/split75/split75.c @@ -1,25 +1 @@ #include "split75.h" - -#include "i2c_master.h" - - -void keyboard_pre_init_kb(void) { - led_init_ports(); - keyboard_pre_init_user(); -} - -void led_init_ports(void) { - setPinOutput(NUMLOCK_LED_PIN); - setPinOutput(CAPSLOCK_LED_PIN); - setPinOutput(SCROLLLOCK_LED_PIN); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - writePin(NUMLOCK_LED_PIN, led_state.num_lock); - writePin(CAPSLOCK_LED_PIN, led_state.caps_lock); - writePin(SCROLLLOCK_LED_PIN, led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/wheatfield/split75/split75.h b/keyboards/wheatfield/split75/split75.h index 9a84c129d7..93da3e7b83 100644 --- a/keyboards/wheatfield/split75/split75.h +++ b/keyboards/wheatfield/split75/split75.h @@ -45,7 +45,3 @@ { K06, K16, K26, K36, K46, KC_NO, KC_NO, KC_NO, K86, K96, KC_NO, K116, K126, K136 }, \ { K07, K17, K27, K37, K47, KC_NO, KC_NO, KC_NO, K87, K97, K107, K117, K127, K137 } \ } - -#define NUMLOCK_LED_PIN D0 -#define CAPSLOCK_LED_PIN D1 -#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 b90ca686fb..d586064954 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) { } -void led_init_ports() -{ -} - void led_set_layer(int layer) { - led_init_ports(); - led_set_layer(0); /*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 d687fe8516..db2167c467 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) } } -void led_init_ports() +void led_init_ports_user() { // Switch #1 DDRD |= (1 << 6); @@ -95,7 +95,7 @@ void led_set_layer(int layer) void matrix_init_user(void) { - led_init_ports(); + led_init_ports_user(); led_set_layer(0); |