diff options
30 files changed, 54 insertions, 546 deletions
diff --git a/keyboards/1upkeyboards/sweet16/v1/config.h b/keyboards/1upkeyboards/sweet16/v1/config.h index 5264ef698..4020f4fdc 100644 --- a/keyboards/1upkeyboards/sweet16/v1/config.h +++ b/keyboards/1upkeyboards/sweet16/v1/config.h | |||
@@ -17,6 +17,12 @@ | |||
17 | /* Set 0 if debouncing isn't needed */ | 17 | /* Set 0 if debouncing isn't needed */ |
18 | #define DEBOUNCE 5 | 18 | #define DEBOUNCE 5 |
19 | 19 | ||
20 | #ifndef CONVERT_TO_PROTON_C | ||
21 | # define LED_NUM_LOCK_PIN B0 // RXLED | ||
22 | # define LED_CAPS_LOCK_PIN D5 // TXLED | ||
23 | # define LED_PIN_ON_STATE 0 | ||
24 | #endif | ||
25 | |||
20 | /* Underglow options */ | 26 | /* Underglow options */ |
21 | #define RGB_DI_PIN B1 | 27 | #define RGB_DI_PIN B1 |
22 | #ifdef RGB_DI_PIN | 28 | #ifdef RGB_DI_PIN |
diff --git a/keyboards/1upkeyboards/sweet16/v1/v1.c b/keyboards/1upkeyboards/sweet16/v1/v1.c index 053620d33..0ff1041aa 100644 --- a/keyboards/1upkeyboards/sweet16/v1/v1.c +++ b/keyboards/1upkeyboards/sweet16/v1/v1.c | |||
@@ -1,21 +1 @@ | |||
1 | #include "v1.h" | #include "v1.h" | |
2 | |||
3 | void led_set_kb(uint8_t usb_led) { | ||
4 | #ifndef CONVERT_TO_PROTON_C | ||
5 | /* Map RXLED to USB_LED_NUM_LOCK */ | ||
6 | if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { | ||
7 | setPinOutput(B0); | ||
8 | writePinLow(B0); | ||
9 | } else { | ||
10 | setPinInput(B0); | ||
11 | } | ||
12 | |||
13 | /* Map TXLED to USB_LED_CAPS_LOCK */ | ||
14 | if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { | ||
15 | setPinOutput(D5); | ||
16 | writePinLow(D5); | ||
17 | } else { | ||
18 | setPinInput(D5); | ||
19 | } | ||
20 | #endif | ||
21 | } | ||
diff --git a/keyboards/alps64/alps64.c b/keyboards/alps64/alps64.c index 0e4ef07bc..61270aace 100644 --- a/keyboards/alps64/alps64.c +++ b/keyboards/alps64/alps64.c | |||
@@ -15,23 +15,3 @@ You should have received a copy of the GNU General Public License | |||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | */ | 16 | */ |
17 | #include "alps64.h" | 17 | #include "alps64.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | // put your keyboard start-up code here | ||
21 | // runs once when the firmware starts up | ||
22 | setPinOutput(C5); | ||
23 | keyboard_pre_init_user(); | ||
24 | } | ||
25 | |||
26 | void led_set_kb(uint8_t usb_led) | ||
27 | { | ||
28 | if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { | ||
29 | // output high | ||
30 | writePinHigh(C5); | ||
31 | } else { | ||
32 | // Hi-Z | ||
33 | writePinLow(C5); | ||
34 | } | ||
35 | |||
36 | led_set_user(usb_led); | ||
37 | } | ||
diff --git a/keyboards/alps64/config.h b/keyboards/alps64/config.h index 25453e696..15903818b 100644 --- a/keyboards/alps64/config.h +++ b/keyboards/alps64/config.h | |||
@@ -37,6 +37,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
37 | 37 | ||
38 | #define DIODE_DIRECTION COL2ROW | 38 | #define DIODE_DIRECTION COL2ROW |
39 | 39 | ||
40 | #define LED_CAPS_LOCK_PIN C5 | ||
41 | |||
40 | /* define if matrix has ghost */ | 42 | /* define if matrix has ghost */ |
41 | //#define MATRIX_HAS_GHOST | 43 | //#define MATRIX_HAS_GHOST |
42 | 44 | ||
diff --git a/keyboards/amjpad/amjpad.c b/keyboards/amjpad/amjpad.c index ac5991bd0..83cdedf68 100644 --- a/keyboards/amjpad/amjpad.c +++ b/keyboards/amjpad/amjpad.c | |||
@@ -1,30 +1 @@ | |||
1 | #include "amjpad.h" | #include "amjpad.h" | |
2 | #include "led.h" | ||
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) { | ||
18 | // * Set our LED pins as output | ||
19 | DDRD |= (1<<6); | ||
20 | } | ||
21 | |||
22 | void led_set_kb(uint8_t usb_led) { | ||
23 | if (usb_led & (1<<USB_LED_NUM_LOCK)) { | ||
24 | // Turn numlock on | ||
25 | PORTD &= ~(1<<6); | ||
26 | } else { | ||
27 | // Turn numlock off | ||
28 | PORTD |= (1<<6); | ||
29 | } | ||
30 | } | ||
diff --git a/keyboards/amjpad/config.h b/keyboards/amjpad/config.h index bbb48624f..dd579be5f 100644 --- a/keyboards/amjpad/config.h +++ b/keyboards/amjpad/config.h | |||
@@ -54,6 +54,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
54 | /* Locking resynchronize hack */ | 54 | /* Locking resynchronize hack */ |
55 | #define LOCKING_RESYNC_ENABLE | 55 | #define LOCKING_RESYNC_ENABLE |
56 | 56 | ||
57 | #define LED_NUM_LOCK_PIN D6 | ||
58 | #define LED_PIN_ON_STATE 0 | ||
59 | |||
57 | /* Backlight configuration | 60 | /* Backlight configuration |
58 | */ | 61 | */ |
59 | #define BACKLIGHT_LEVELS 4 | 62 | #define BACKLIGHT_LEVELS 4 |
diff --git a/keyboards/exclusive/e6v2/le/config.h b/keyboards/exclusive/e6v2/le/config.h index 6477d5364..71bd66b15 100644 --- a/keyboards/exclusive/e6v2/le/config.h +++ b/keyboards/exclusive/e6v2/le/config.h | |||
@@ -37,6 +37,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
37 | #define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 } | 37 | #define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 } |
38 | #define UNUSED_PINS | 38 | #define UNUSED_PINS |
39 | 39 | ||
40 | #define LED_CAPS_LOCK_PIN B7 | ||
41 | #define LED_PIN_ON_STATE 0 | ||
42 | |||
40 | #define RGB_DI_PIN E6 | 43 | #define RGB_DI_PIN E6 |
41 | #ifdef RGB_DI_PIN | 44 | #ifdef RGB_DI_PIN |
42 | #define RGBLIGHT_ANIMATIONS | 45 | #define RGBLIGHT_ANIMATIONS |
diff --git a/keyboards/exclusive/e6v2/le/le.c b/keyboards/exclusive/e6v2/le/le.c index f27bdc113..dd973feec 100644 --- a/keyboards/exclusive/e6v2/le/le.c +++ b/keyboards/exclusive/e6v2/le/le.c | |||
@@ -1,33 +1 @@ | |||
1 | #include "le.h" | #include "le.h" | |
2 | |||
3 | void matrix_init_kb(void) { | ||
4 | // put your keyboard start-up code here | ||
5 | // runs once when the firmware starts up | ||
6 | |||
7 | matrix_init_user(); | ||
8 | } | ||
9 | |||
10 | void matrix_scan_kb(void) { | ||
11 | // put your looping keyboard code here | ||
12 | // runs every cycle (a lot) | ||
13 | |||
14 | matrix_scan_user(); | ||
15 | } | ||
16 | |||
17 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
18 | // put your per-action keyboard code here | ||
19 | // runs for every action, just before processing by the firmware | ||
20 | |||
21 | return process_record_user(keycode, record); | ||
22 | } | ||
23 | |||
24 | void led_set_user(uint8_t usb_led) { | ||
25 | if (usb_led & (1 << USB_LED_CAPS_LOCK)) { | ||
26 | DDRB |= (1 << 7); | ||
27 | PORTB &= ~(1 << 7); | ||
28 | } else { | ||
29 | DDRB &= ~(1 << 7); | ||
30 | PORTB &= ~(1 << 7); | ||
31 | } | ||
32 | } | ||
33 | |||
diff --git a/keyboards/exclusive/e7v1/config.h b/keyboards/exclusive/e7v1/config.h index c8f150125..11e47c360 100644 --- a/keyboards/exclusive/e7v1/config.h +++ b/keyboards/exclusive/e7v1/config.h | |||
@@ -22,6 +22,8 @@ | |||
22 | /* COL2ROW or ROW2COL */ | 22 | /* COL2ROW or ROW2COL */ |
23 | #define DIODE_DIRECTION COL2ROW | 23 | #define DIODE_DIRECTION COL2ROW |
24 | 24 | ||
25 | #define LED_CAPS_LOCK_PIN F0 | ||
26 | |||
25 | /* number of backlight levels */ | 27 | /* number of backlight levels */ |
26 | #define BACKLIGHT_PIN B7 | 28 | #define BACKLIGHT_PIN B7 |
27 | #ifdef BACKLIGHT_PIN | 29 | #ifdef BACKLIGHT_PIN |
diff --git a/keyboards/exclusive/e7v1/e7v1.c b/keyboards/exclusive/e7v1/e7v1.c index 381585e6c..880121f4f 100644 --- a/keyboards/exclusive/e7v1/e7v1.c +++ b/keyboards/exclusive/e7v1/e7v1.c | |||
@@ -1,25 +1 @@ | |||
1 | #include "e7v1.h" | #include "e7v1.h" | |
2 | |||
3 | void matrix_init_kb(void) { | ||
4 | setPinOutput(F0); | ||
5 | matrix_init_user(); | ||
6 | } | ||
7 | |||
8 | void matrix_scan_kb(void) { | ||
9 | matrix_scan_user(); | ||
10 | } | ||
11 | |||
12 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
13 | return process_record_user(keycode, record); | ||
14 | } | ||
15 | |||
16 | void led_set_kb(uint8_t usb_led) { | ||
17 | if (usb_led & (1 << USB_LED_CAPS_LOCK)) { | ||
18 | writePinHigh(F0); | ||
19 | } else { | ||
20 | writePinLow(F0); | ||
21 | } | ||
22 | |||
23 | led_set_user(usb_led); | ||
24 | } | ||
25 | |||
diff --git a/keyboards/fc980c/config.h b/keyboards/fc980c/config.h index f9d3e06d6..7e79d8d1f 100644 --- a/keyboards/fc980c/config.h +++ b/keyboards/fc980c/config.h | |||
@@ -49,7 +49,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
49 | 49 | ||
50 | /* Set 0 if debouncing isn't needed */ | 50 | /* Set 0 if debouncing isn't needed */ |
51 | #define DEBOUNCE 0 | 51 | #define DEBOUNCE 0 |
52 | #define TAPPING_TERM 175 | 52 | |
53 | #define LED_NUM_LOCK_PIN B4 | ||
54 | #define LED_CAPS_LOCK_PIN B5 | ||
55 | #define LED_SCROLL_LOCK_PIN B6 | ||
53 | 56 | ||
54 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | 57 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ |
55 | // #define LOCKING_SUPPORT_ENABLE | 58 | // #define LOCKING_SUPPORT_ENABLE |
diff --git a/keyboards/fc980c/fc980c.c b/keyboards/fc980c/fc980c.c index c09eacfa3..744a3614a 100644 --- a/keyboards/fc980c/fc980c.c +++ b/keyboards/fc980c/fc980c.c | |||
@@ -22,46 +22,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
22 | #endif | 22 | #endif |
23 | 23 | ||
24 | void matrix_init_kb(void) { | 24 | void matrix_init_kb(void) { |
25 | // put your keyboard start-up code here | ||
26 | // runs once when the firmware starts up | ||
27 | |||
28 | #ifdef ACTUATION_DEPTH_ADJUSTMENT | 25 | #ifdef ACTUATION_DEPTH_ADJUSTMENT |
29 | adjust_actuation_point(ACTUATION_DEPTH_ADJUSTMENT); | 26 | adjust_actuation_point(ACTUATION_DEPTH_ADJUSTMENT); |
30 | #endif | 27 | #endif |
31 | 28 | ||
32 | matrix_init_user(); | 29 | matrix_init_user(); |
33 | } | 30 | } |
34 | |||
35 | void matrix_scan_kb(void) { | ||
36 | // put your looping keyboard code here | ||
37 | // runs every cycle (a lot) | ||
38 | |||
39 | matrix_scan_user(); | ||
40 | } | ||
41 | |||
42 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
43 | // put your per-action keyboard code here | ||
44 | // runs for every action, just before processing by the firmware | ||
45 | |||
46 | return process_record_user(keycode, record); | ||
47 | } | ||
48 | |||
49 | void led_set_kb(uint8_t usb_led) { | ||
50 | if (usb_led & (1<<USB_LED_NUM_LOCK)) { | ||
51 | PORTB |= (1<<4); | ||
52 | } else { | ||
53 | PORTB &= ~(1<<4); | ||
54 | } | ||
55 | if (usb_led & (1<<USB_LED_CAPS_LOCK)) { | ||
56 | PORTB |= (1<<5); | ||
57 | } else { | ||
58 | PORTB &= ~(1<<5); | ||
59 | } | ||
60 | if (usb_led & (1<<USB_LED_SCROLL_LOCK)) { | ||
61 | PORTB |= (1<<6); | ||
62 | } else { | ||
63 | PORTB &= ~(1<<6); | ||
64 | } | ||
65 | |||
66 | led_set_user(usb_led); | ||
67 | } | ||
diff --git a/keyboards/foxlab/leaf60/hotswap/config.h b/keyboards/foxlab/leaf60/hotswap/config.h index 26b67586e..0934c87bb 100644 --- a/keyboards/foxlab/leaf60/hotswap/config.h +++ b/keyboards/foxlab/leaf60/hotswap/config.h | |||
@@ -48,6 +48,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
48 | /* COL2ROW, ROW2COL*/ | 48 | /* COL2ROW, ROW2COL*/ |
49 | #define DIODE_DIRECTION COL2ROW | 49 | #define DIODE_DIRECTION COL2ROW |
50 | 50 | ||
51 | #define LED_CAPS_LOCK_PIN E6 | ||
52 | #define LED_PIN_ON_STATE 0 | ||
53 | |||
51 | #define BACKLIGHT_PIN B7 | 54 | #define BACKLIGHT_PIN B7 |
52 | #define BACKLIGHT_BREATHING | 55 | #define BACKLIGHT_BREATHING |
53 | #define BACKLIGHT_LEVELS 4 | 56 | #define BACKLIGHT_LEVELS 4 |
diff --git a/keyboards/foxlab/leaf60/hotswap/hotswap.c b/keyboards/foxlab/leaf60/hotswap/hotswap.c index 20778d927..e2de4a7e3 100644 --- a/keyboards/foxlab/leaf60/hotswap/hotswap.c +++ b/keyboards/foxlab/leaf60/hotswap/hotswap.c | |||
@@ -14,46 +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 "hotswap.h" | 16 | #include "hotswap.h" |
17 | |||
18 | // Optional override functions below. | ||
19 | // You can leave any or all of these undefined. | ||
20 | // These are only required if you want to perform custom actions. | ||
21 | |||
22 | void matrix_init_kb(void) { | ||
23 | // put your keyboard start-up code here | ||
24 | // runs once when the firmware starts up | ||
25 | setPinOutput(E6); | ||
26 | matrix_init_user(); | ||
27 | } | ||
28 | /* | ||
29 | |||
30 | void matrix_scan_kb(void) { | ||
31 | // put your looping keyboard code here | ||
32 | // runs every cycle (a lot) | ||
33 | |||
34 | matrix_scan_user(); | ||
35 | } | ||
36 | |||
37 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
38 | // put your per-action keyboard code here | ||
39 | // runs for every action, just before processing by the firmware | ||
40 | |||
41 | return process_record_user(keycode, record); | ||
42 | } | ||
43 | |||
44 | void led_set_kb(uint8_t usb_led) { | ||
45 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | ||
46 | |||
47 | led_set_user(usb_led); | ||
48 | } | ||
49 | |||
50 | */ | ||
51 | |||
52 | void led_set_kb(uint8_t usb_led) { | ||
53 | if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { | ||
54 | writePinLow(E6); | ||
55 | } else { | ||
56 | writePinHigh(E6); | ||
57 | } | ||
58 | led_set_user(usb_led); | ||
59 | } | ||
diff --git a/keyboards/foxlab/leaf60/universal/config.h b/keyboards/foxlab/leaf60/universal/config.h index 9f761f454..f48bae497 100644 --- a/keyboards/foxlab/leaf60/universal/config.h +++ b/keyboards/foxlab/leaf60/universal/config.h | |||
@@ -48,6 +48,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
48 | /* COL2ROW, ROW2COL*/ | 48 | /* COL2ROW, ROW2COL*/ |
49 | #define DIODE_DIRECTION COL2ROW | 49 | #define DIODE_DIRECTION COL2ROW |
50 | 50 | ||
51 | #define LED_CAPS_LOCK_PIN E6 | ||
52 | #define LED_PIN_ON_STATE 0 | ||
53 | |||
51 | #define BACKLIGHT_PIN B7 | 54 | #define BACKLIGHT_PIN B7 |
52 | #define BACKLIGHT_BREATHING | 55 | #define BACKLIGHT_BREATHING |
53 | #define BACKLIGHT_LEVELS 3 | 56 | #define BACKLIGHT_LEVELS 3 |
diff --git a/keyboards/foxlab/leaf60/universal/universal.c b/keyboards/foxlab/leaf60/universal/universal.c index 5fe663a1b..197e411d7 100644 --- a/keyboards/foxlab/leaf60/universal/universal.c +++ b/keyboards/foxlab/leaf60/universal/universal.c | |||
@@ -14,48 +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 "universal.h" | 16 | #include "universal.h" |
17 | |||
18 | // Optional override functions below. | ||
19 | // You can leave any or all of these undefined. | ||
20 | // These are only required if you want to perform custom actions. | ||
21 | |||
22 | void matrix_init_kb(void) { | ||
23 | // put your keyboard start-up code here | ||
24 | // runs once when the firmware starts up | ||
25 | setPinOutput(E6); | ||
26 | matrix_init_user(); | ||
27 | } | ||
28 | |||
29 | /* | ||
30 | |||
31 | void matrix_scan_kb(void) { | ||
32 | // put your looping keyboard code here | ||
33 | // runs every cycle (a lot) | ||
34 | |||
35 | matrix_scan_user(); | ||
36 | } | ||
37 | |||
38 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
39 | // put your per-action keyboard code here | ||
40 | // runs for every action, just before processing by the firmware | ||
41 | |||
42 | return process_record_user(keycode, record); | ||
43 | } | ||
44 | |||
45 | void led_set_kb(uint8_t usb_led) { | ||
46 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | ||
47 | |||
48 | led_set_user(usb_led); | ||
49 | } | ||
50 | |||
51 | */ | ||
52 | |||
53 | |||
54 | void led_set_kb(uint8_t usb_led) { | ||
55 | if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { | ||
56 | writePinLow(E6); | ||
57 | } else { | ||
58 | writePinHigh(E6); | ||
59 | } | ||
60 | led_set_user(usb_led); | ||
61 | } | ||
diff --git a/keyboards/hineybush/hineyg80/config.h b/keyboards/hineybush/hineyg80/config.h index 4072def2f..81bf62272 100644 --- a/keyboards/hineybush/hineyg80/config.h +++ b/keyboards/hineybush/hineyg80/config.h | |||
@@ -22,6 +22,11 @@ | |||
22 | /* COL2ROW or ROW2COL */ | 22 | /* COL2ROW or ROW2COL */ |
23 | #define DIODE_DIRECTION COL2ROW | 23 | #define DIODE_DIRECTION COL2ROW |
24 | 24 | ||
25 | |||
26 | #define LED_NUM_LOCK_PIN C6 | ||
27 | #define LED_CAPS_LOCK_PIN B6 | ||
28 | #define LED_SCROLL_LOCK_PIN B5 | ||
29 | |||
25 | /* number of backlight levels */ | 30 | /* number of backlight levels */ |
26 | 31 | ||
27 | #ifdef BACKLIGHT_PIN | 32 | #ifdef BACKLIGHT_PIN |
diff --git a/keyboards/hineybush/hineyg80/hineyg80.c b/keyboards/hineybush/hineyg80/hineyg80.c index 236c646be..a56e46e9d 100644 --- a/keyboards/hineybush/hineyg80/hineyg80.c +++ b/keyboards/hineybush/hineyg80/hineyg80.c | |||
@@ -14,50 +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 "hineyg80.h" | 16 | #include "hineyg80.h" |
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 | } | ||
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_set_kb(uint8_t usb_led) { | ||
40 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | ||
41 | if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { | ||
42 | // Turn numlock on | ||
43 | writePinHigh(C6); | ||
44 | } else { | ||
45 | // Turn numlock off | ||
46 | writePinLow(C6); | ||
47 | } | ||
48 | if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { | ||
49 | // Turn capslock on | ||
50 | writePinHigh(B6); | ||
51 | } else { | ||
52 | // Turn capslock off | ||
53 | writePinLow(B6); | ||
54 | } | ||
55 | if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { | ||
56 | // Turn scrolllock on | ||
57 | writePinHigh(B5); | ||
58 | } else { | ||
59 | // Turn scrolllock off | ||
60 | writePinLow(B5); | ||
61 | } | ||
62 | led_set_user(usb_led); | ||
63 | } | ||
diff --git a/keyboards/jc65/v32u4/config.h b/keyboards/jc65/v32u4/config.h index 8233dd1e8..a00f64a1f 100644 --- a/keyboards/jc65/v32u4/config.h +++ b/keyboards/jc65/v32u4/config.h | |||
@@ -37,6 +37,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
37 | #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4, F5 } | 37 | #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4, F5 } |
38 | #define UNUSED_PINS | 38 | #define UNUSED_PINS |
39 | 39 | ||
40 | #define LED_CAPS_LOCK_PIN B2 | ||
41 | #define LED_PIN_ON_STATE 0 | ||
42 | |||
40 | #define RGB_DI_PIN E2 | 43 | #define RGB_DI_PIN E2 |
41 | #ifdef RGB_DI_PIN | 44 | #ifdef RGB_DI_PIN |
42 | #define RGBLIGHT_ANIMATIONS | 45 | #define RGBLIGHT_ANIMATIONS |
diff --git a/keyboards/jc65/v32u4/v32u4.c b/keyboards/jc65/v32u4/v32u4.c index c69c5d531..a6837268e 100644 --- a/keyboards/jc65/v32u4/v32u4.c +++ b/keyboards/jc65/v32u4/v32u4.c | |||
@@ -1,36 +1 @@ | |||
1 | #include "v32u4.h" | #include "v32u4.h" | |
2 | |||
3 | void matrix_init_kb(void) { | ||
4 | // put your keyboard start-up code here | ||
5 | // runs once when the firmware starts up | ||
6 | |||
7 | matrix_init_user(); | ||
8 | } | ||
9 | |||
10 | void matrix_scan_kb(void) { | ||
11 | // put your looping keyboard code here | ||
12 | // runs every cycle (a lot) | ||
13 | |||
14 | matrix_scan_user(); | ||
15 | } | ||
16 | |||
17 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
18 | // put your per-action keyboard code here | ||
19 | // runs for every action, just before processing by the firmware | ||
20 | |||
21 | return process_record_user(keycode, record); | ||
22 | } | ||
23 | |||
24 | void led_set_kb(uint8_t usb_led) { | ||
25 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | ||
26 | if (usb_led & (1<<USB_LED_CAPS_LOCK)) { | ||
27 | // output low | ||
28 | DDRB |= (1<<2); | ||
29 | PORTB &= ~(1<<2); | ||
30 | } else { | ||
31 | // Hi-Z | ||
32 | DDRB &= ~(1<<2); | ||
33 | PORTB &= ~(1<<2); | ||
34 | } | ||
35 | led_set_user(usb_led); | ||
36 | } | ||
diff --git a/keyboards/kmac/config.h b/keyboards/kmac/config.h index b2c7f4d44..e924a4b14 100644 --- a/keyboards/kmac/config.h +++ b/keyboards/kmac/config.h | |||
@@ -45,6 +45,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
45 | /* COL2ROW, ROW2COL*/ | 45 | /* COL2ROW, ROW2COL*/ |
46 | //#define DIODE_DIRECTION | 46 | //#define DIODE_DIRECTION |
47 | 47 | ||
48 | #define LED_CAPS_LOCK_PIN B0 | ||
49 | #define LED_SCROLL_LOCK_PIN E6 | ||
50 | #define LED_PIN_ON_STATE 0 | ||
51 | |||
48 | /* number of backlight levels */ | 52 | /* number of backlight levels */ |
49 | //#define BACKLIGHT_LEVELS 3 | 53 | //#define BACKLIGHT_LEVELS 3 |
50 | // #define BACKLIGHT_PIN B7 | 54 | // #define BACKLIGHT_PIN B7 |
diff --git a/keyboards/kmac/kmac.c b/keyboards/kmac/kmac.c index dcbbc2f17..78334cb75 100644 --- a/keyboards/kmac/kmac.c +++ b/keyboards/kmac/kmac.c | |||
@@ -15,62 +15,9 @@ | |||
15 | */ | 15 | */ |
16 | #include "kmac.h" | 16 | #include "kmac.h" |
17 | 17 | ||
18 | #define CAPS_PIN B0 | ||
19 | #define SCROLL_PIN E6 | ||
20 | #define F_ROW_MASK 0b01 | 18 | #define F_ROW_MASK 0b01 |
21 | #define WASD_MASK 0b10 | 19 | #define WASD_MASK 0b10 |
22 | 20 | ||
23 | // Optional override functions below. | ||
24 | // You can leave any or all of these undefined. | ||
25 | // These are only required if you want to perform custom actions. | ||
26 | |||
27 | void matrix_init_kb(void) { | ||
28 | // put your keyboard start-up code here | ||
29 | // runs once when the firmware starts up | ||
30 | setPinOutput(CAPS_PIN); | ||
31 | setPinOutput(SCROLL_PIN); | ||
32 | |||
33 | matrix_init_user(); | ||
34 | } | ||
35 | |||
36 | /* | ||
37 | |||
38 | void matrix_scan_kb(void) { | ||
39 | // put your looping keyboard code here | ||
40 | // runs every cycle (a lot) | ||
41 | |||
42 | matrix_scan_user(); | ||
43 | } | ||
44 | |||
45 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
46 | // put your per-action keyboard code here | ||
47 | // runs for every action, just before processing by the firmware | ||
48 | |||
49 | return process_record_user(keycode, record); | ||
50 | } | ||
51 | |||
52 | */ | ||
53 | |||
54 | /* LED pin configuration | ||
55 | * Scroll Lock: Low PE6 | ||
56 | * Caps Lock: Low PB0 | ||
57 | */ | ||
58 | void led_set_kb(uint8_t usb_led) { | ||
59 | if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { | ||
60 | writePinLow(CAPS_PIN); | ||
61 | } else { | ||
62 | writePinHigh(CAPS_PIN); | ||
63 | } | ||
64 | |||
65 | if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { | ||
66 | writePinLow(SCROLL_PIN); | ||
67 | } else { | ||
68 | writePinHigh(SCROLL_PIN); | ||
69 | } | ||
70 | |||
71 | led_set_user(usb_led); | ||
72 | } | ||
73 | |||
74 | void backlight_init_ports(void) { | 21 | void backlight_init_ports(void) { |
75 | setPinOutput(B1); | 22 | setPinOutput(B1); |
76 | setPinOutput(B2); | 23 | setPinOutput(B2); |
diff --git a/keyboards/melody96/config.h b/keyboards/melody96/config.h index 2533bfa35..038d97460 100644 --- a/keyboards/melody96/config.h +++ b/keyboards/melody96/config.h | |||
@@ -22,6 +22,11 @@ | |||
22 | /* COL2ROW or ROW2COL */ | 22 | /* COL2ROW or ROW2COL */ |
23 | #define DIODE_DIRECTION ROW2COL | 23 | #define DIODE_DIRECTION ROW2COL |
24 | 24 | ||
25 | #define LED_NUM_LOCK_PIN C6 | ||
26 | #define LED_CAPS_LOCK_PIN C7 | ||
27 | #define LED_SCROLL_LOCK_PIN B5 | ||
28 | #define LED_PIN_ON_STATE 0 | ||
29 | |||
25 | /* number of backlight levels */ | 30 | /* number of backlight levels */ |
26 | #define BACKLIGHT_PIN B6 | 31 | #define BACKLIGHT_PIN B6 |
27 | #ifdef BACKLIGHT_PIN | 32 | #ifdef BACKLIGHT_PIN |
diff --git a/keyboards/melody96/melody96.c b/keyboards/melody96/melody96.c index 2fe274ee4..44e813586 100644 --- a/keyboards/melody96/melody96.c +++ b/keyboards/melody96/melody96.c | |||
@@ -1,23 +1 @@ | |||
1 | #include "melody96.h" | #include "melody96.h" | |
2 | |||
3 | void led_set_kb(uint8_t usb_led) { | ||
4 | if (usb_led & (1 << USB_LED_NUM_LOCK)) { | ||
5 | DDRC |= (1 << 6); PORTC &= ~(1 << 6); | ||
6 | } else { | ||
7 | DDRC &= ~(1 << 6); PORTC &= ~(1 << 6); | ||
8 | } | ||
9 | |||
10 | if (usb_led & (1 << USB_LED_CAPS_LOCK)) { | ||
11 | DDRC |= (1 << 7); PORTC &= ~(1 << 7); | ||
12 | } else { | ||
13 | DDRC &= ~(1 << 7); PORTC &= ~(1 << 7); | ||
14 | } | ||
15 | |||
16 | if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { | ||
17 | DDRB |= (1 << 5); PORTB &= ~(1 << 5); | ||
18 | } else { | ||
19 | DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); | ||
20 | } | ||
21 | |||
22 | led_set_user(usb_led); | ||
23 | } | ||
diff --git a/keyboards/peiorisboards/ixora/config.h b/keyboards/peiorisboards/ixora/config.h index 77ba89c29..4b52d18f3 100644 --- a/keyboards/peiorisboards/ixora/config.h +++ b/keyboards/peiorisboards/ixora/config.h | |||
@@ -22,3 +22,7 @@ | |||
22 | 22 | ||
23 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | 23 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ |
24 | #define DEBOUNCE 0 | 24 | #define DEBOUNCE 0 |
25 | |||
26 | #define LED_NUM_LOCK_PIN A9 | ||
27 | #define LED_CAPS_LOCK_PIN A10 | ||
28 | #define LED_SCROLL_LOCK_PIN A8 | ||
diff --git a/keyboards/peiorisboards/ixora/ixora.c b/keyboards/peiorisboards/ixora/ixora.c index 7996db629..f2dcd864a 100644 --- a/keyboards/peiorisboards/ixora/ixora.c +++ b/keyboards/peiorisboards/ixora/ixora.c | |||
@@ -1,43 +1 @@ | |||
1 | #include "ixora.h" | #include "ixora.h" | |
2 | |||
3 | void matrix_init_kb(void) { | ||
4 | // put your keyboard start-up code here | ||
5 | // runs once when the firmware starts up | ||
6 | setPinOutput(A8); | ||
7 | setPinOutput(A9); | ||
8 | setPinOutput(A10); | ||
9 | writePinLow(A8); | ||
10 | writePinLow(A9); | ||
11 | writePinLow(A10); | ||
12 | |||
13 | matrix_init_user(); | ||
14 | } | ||
15 | |||
16 | void matrix_scan_kb(void) { | ||
17 | |||
18 | matrix_scan_user(); | ||
19 | } | ||
20 | |||
21 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
22 | |||
23 | return process_record_user(keycode, record); | ||
24 | } | ||
25 | |||
26 | void led_set_kb(uint8_t usb_led) { | ||
27 | if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { | ||
28 | writePinHigh(A10); | ||
29 | } else { | ||
30 | writePinLow(A10); | ||
31 | } | ||
32 | if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { | ||
33 | writePinHigh(A9); | ||
34 | } else { | ||
35 | writePinLow(A9); | ||
36 | } | ||
37 | if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { | ||
38 | writePinHigh(A8); | ||
39 | } else { | ||
40 | writePinLow(A8); | ||
41 | } | ||
42 | led_set_user(usb_led); | ||
43 | } | ||
diff --git a/keyboards/redscarf_iiplus/verb/config.h b/keyboards/redscarf_iiplus/verb/config.h index 3fecdcac3..d920596ec 100755 --- a/keyboards/redscarf_iiplus/verb/config.h +++ b/keyboards/redscarf_iiplus/verb/config.h | |||
@@ -49,10 +49,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
49 | /* COL2ROW, ROW2COL*/ | 49 | /* COL2ROW, ROW2COL*/ |
50 | #define DIODE_DIRECTION COL2ROW | 50 | #define DIODE_DIRECTION COL2ROW |
51 | 51 | ||
52 | /* | 52 | #define LED_NUM_LOCK_PIN E6 |
53 | * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. | 53 | #define LED_CAPS_LOCK_PIN C7 |
54 | */ | 54 | #define LED_PIN_ON_STATE 0 |
55 | //#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 | ||
56 | 55 | ||
57 | #define BACKLIGHT_PIN B7 | 56 | #define BACKLIGHT_PIN B7 |
58 | // #define BACKLIGHT_BREATHING | 57 | // #define BACKLIGHT_BREATHING |
diff --git a/keyboards/redscarf_iiplus/verb/verb.c b/keyboards/redscarf_iiplus/verb/verb.c index 62ea1859d..27a3d8153 100755 --- a/keyboards/redscarf_iiplus/verb/verb.c +++ b/keyboards/redscarf_iiplus/verb/verb.c | |||
@@ -14,38 +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 "verb.h" | 16 | #include "verb.h" |
17 | |||
18 | // Optional override functions below. | ||
19 | // You can leave any or all of these undefined. | ||
20 | // These are only required if you want to perform custom actions. | ||
21 | |||
22 | void matrix_init_kb(void) { | ||
23 | // put your keyboard start-up code here | ||
24 | // runs once when the firmware starts up | ||
25 | |||
26 | matrix_init_user(); | ||
27 | led_init_ports(); | ||
28 | } | ||
29 | |||
30 | void led_init_ports(void) { | ||
31 | setPinOutput(C7); | ||
32 | setPinOutput(E6); | ||
33 | } | ||
34 | |||
35 | void led_set_kb(uint8_t usb_led) { | ||
36 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | ||
37 | |||
38 | if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { | ||
39 | writePinLow(C7); | ||
40 | } else { | ||
41 | writePinHigh(C7); | ||
42 | } | ||
43 | |||
44 | if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { | ||
45 | writePinLow(E6); | ||
46 | } else { | ||
47 | writePinHigh(E6); | ||
48 | } | ||
49 | |||
50 | led_set_user(usb_led); | ||
51 | } | ||
diff --git a/keyboards/sck/osa/config.h b/keyboards/sck/osa/config.h index 671013440..9d041d0f0 100644 --- a/keyboards/sck/osa/config.h +++ b/keyboards/sck/osa/config.h | |||
@@ -91,6 +91,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
91 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | 91 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ |
92 | //#define MATRIX_HAS_GHOST | 92 | //#define MATRIX_HAS_GHOST |
93 | 93 | ||
94 | #define LED_NUM_LOCK_PIN C7 | ||
95 | #define LED_CAPS_LOCK_PIN C6 | ||
96 | #define LED_SCROLL_LOCK_PIN B6 | ||
97 | |||
94 | /* number of backlight levels */ | 98 | /* number of backlight levels */ |
95 | 99 | ||
96 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | 100 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ |
diff --git a/keyboards/sck/osa/osa.c b/keyboards/sck/osa/osa.c index 138a28893..7f144035e 100644 --- a/keyboards/sck/osa/osa.c +++ b/keyboards/sck/osa/osa.c | |||
@@ -14,60 +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 "osa.h" | 16 | #include "osa.h" |
17 | |||
18 | |||
19 | // Optional override functions below. | ||
20 | // You can leave any or all of these undefined. | ||
21 | // These are only required if you want to perform custom actions. | ||
22 | |||
23 | /* | ||
24 | |||
25 | void matrix_init_kb(void) { | ||
26 | // put your keyboard start-up code here | ||
27 | // runs once when the firmware starts up | ||
28 | |||
29 | matrix_init_user(); | ||
30 | } | ||
31 | |||
32 | void matrix_scan_kb(void) { | ||
33 | // put your looping keyboard code here | ||
34 | // runs every cycle (a lot) | ||
35 | |||
36 | matrix_scan_user(); | ||
37 | } | ||
38 | |||
39 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
40 | // put your per-action keyboard code here | ||
41 | // runs for every action, just before processing by the firmware | ||
42 | |||
43 | return process_record_user(keycode, record); | ||
44 | } | ||
45 | */ | ||
46 | |||
47 | void matrix_init_board(void){ | ||
48 | setPinOutput(C7); | ||
49 | setPinOutput(C6); | ||
50 | setPinOutput(B6); | ||
51 | } | ||
52 | |||
53 | void led_set_kb(uint8_t usb_led) { | ||
54 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | ||
55 | |||
56 | if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { | ||
57 | writePinHigh(C7); | ||
58 | } else { | ||
59 | writePinLow(C7); | ||
60 | } | ||
61 | if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { | ||
62 | writePinHigh(C6); | ||
63 | } else { | ||
64 | writePinLow(C6); | ||
65 | } | ||
66 | if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { | ||
67 | writePinHigh(B6); | ||
68 | } else { | ||
69 | writePinLow(B6); | ||
70 | } | ||
71 | led_set_user(usb_led); | ||
72 | } | ||
73 | |||