diff options
153 files changed, 249 insertions, 1623 deletions
diff --git a/keyboards/ares/ares.c b/keyboards/ares/ares.c index 95d4b878f..80d445517 100644 --- a/keyboards/ares/ares.c +++ b/keyboards/ares/ares.c | |||
@@ -16,19 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include "ares.h" | 18 | #include "ares.h" |
19 | |||
20 | void keyboard_pre_init_kb(void) { | ||
21 | led_init_ports(); | ||
22 | keyboard_pre_init_user(); | ||
23 | } | ||
24 | |||
25 | void led_init_ports(void) { | ||
26 | setPinOutput(D1); | ||
27 | } | ||
28 | |||
29 | bool led_update_kb(led_t led_state) { | ||
30 | if (led_update_user(led_state)) { | ||
31 | writePin(D1, led_state.caps_lock); | ||
32 | } | ||
33 | return true; | ||
34 | } | ||
diff --git a/keyboards/ares/config.h b/keyboards/ares/config.h index ffbe45605..35e885d69 100644 --- a/keyboards/ares/config.h +++ b/keyboards/ares/config.h | |||
@@ -37,6 +37,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
37 | #define DIODE_DIRECTION COL2ROW | 37 | #define DIODE_DIRECTION COL2ROW |
38 | #define DEBOUNCE 5 | 38 | #define DEBOUNCE 5 |
39 | 39 | ||
40 | #define LED_CAPS_LOCK_PIN D1 | ||
41 | |||
40 | #define BACKLIGHT_PIN D4 | 42 | #define BACKLIGHT_PIN D4 |
41 | #define BACKLIGHT_LEVELS 3 | 43 | #define BACKLIGHT_LEVELS 3 |
42 | 44 | ||
diff --git a/keyboards/bfake/bfake.c b/keyboards/bfake/bfake.c index 6d0c92746..5eedcc194 100644 --- a/keyboards/bfake/bfake.c +++ b/keyboards/bfake/bfake.c | |||
@@ -16,19 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include "bfake.h" | 18 | #include "bfake.h" |
19 | |||
20 | void keyboard_pre_init_kb(void) { | ||
21 | led_init_ports(); | ||
22 | keyboard_pre_init_user(); | ||
23 | } | ||
24 | |||
25 | void led_init_ports(void) { | ||
26 | setPinOutput(D1); | ||
27 | } | ||
28 | |||
29 | bool led_update_kb(led_t led_state) { | ||
30 | if (led_update_user(led_state)) { | ||
31 | writePin(D1, led_state.caps_lock); | ||
32 | } | ||
33 | return true; | ||
34 | } | ||
diff --git a/keyboards/bfake/config.h b/keyboards/bfake/config.h index 6c4710a9e..54e01ad3d 100644 --- a/keyboards/bfake/config.h +++ b/keyboards/bfake/config.h | |||
@@ -37,6 +37,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
37 | #define DIODE_DIRECTION COL2ROW | 37 | #define DIODE_DIRECTION COL2ROW |
38 | #define DEBOUNCE 5 | 38 | #define DEBOUNCE 5 |
39 | 39 | ||
40 | #define LED_CAPS_LOCK_PIN D1 | ||
41 | |||
40 | #define BACKLIGHT_PIN D4 | 42 | #define BACKLIGHT_PIN D4 |
41 | #define BACKLIGHT_LEVELS 3 | 43 | #define BACKLIGHT_LEVELS 3 |
42 | 44 | ||
diff --git a/keyboards/chili/chili.c b/keyboards/chili/chili.c index 40d3528b0..f629a6d60 100644 --- a/keyboards/chili/chili.c +++ b/keyboards/chili/chili.c | |||
@@ -14,29 +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 "chili.h" | 16 | #include "chili.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 | led_init_ports(); | ||
22 | matrix_init_user(); | ||
23 | } | ||
24 | |||
25 | void led_init_ports(void) { | ||
26 | setPinOutput(B1); | ||
27 | writePinHigh(B1); | ||
28 | setPinOutput(B2); | ||
29 | writePinHigh(B2); | ||
30 | setPinOutput(B3); | ||
31 | writePinHigh(B3); | ||
32 | } | ||
33 | |||
34 | bool led_update_kb(led_t led_state) { | ||
35 | bool res = led_update_user(led_state); | ||
36 | if(res) { | ||
37 | writePin(B1, !led_state.num_lock); | ||
38 | writePin(B2, !led_state.caps_lock); | ||
39 | writePin(B3, !led_state.scroll_lock); | ||
40 | } | ||
41 | return res; | ||
42 | } | ||
diff --git a/keyboards/chili/config.h b/keyboards/chili/config.h index 4b6a632cd..08c247587 100644 --- a/keyboards/chili/config.h +++ b/keyboards/chili/config.h | |||
@@ -42,6 +42,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
42 | /* COL2ROW or ROW2COL */ | 42 | /* COL2ROW or ROW2COL */ |
43 | #define DIODE_DIRECTION COL2ROW | 43 | #define DIODE_DIRECTION COL2ROW |
44 | 44 | ||
45 | #define LED_NUM_LOCK_PIN B1 | ||
46 | #define LED_CAPS_LOCK_PIN B2 | ||
47 | #define LED_SCROLL_LOCK_PIN B3 | ||
48 | #define LED_PIN_ON_STATE 0 | ||
49 | |||
45 | #define BACKLIGHT_PIN B7 | 50 | #define BACKLIGHT_PIN B7 |
46 | #define BACKLIGHT_BREATHING | 51 | #define BACKLIGHT_BREATHING |
47 | #define BACKLIGHT_LEVELS 3 | 52 | #define BACKLIGHT_LEVELS 3 |
diff --git a/keyboards/coarse/cordillera/config.h b/keyboards/coarse/cordillera/config.h index ac636d5d5..33b0d7944 100644 --- a/keyboards/coarse/cordillera/config.h +++ b/keyboards/coarse/cordillera/config.h | |||
@@ -32,6 +32,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
32 | #define MATRIX_COL_PINS { B15, B14, B13, B12, B11, B10, B2, B1, B8, B7, B6, B5, B4, B3, A15, A14 } | 32 | #define MATRIX_COL_PINS { B15, B14, B13, B12, B11, B10, B2, B1, B8, B7, B6, B5, B4, B3, A15, A14 } |
33 | #define DIODE_DIRECTION COL2ROW | 33 | #define DIODE_DIRECTION COL2ROW |
34 | 34 | ||
35 | #define LED_NUM_LOCK_PIN B0 | ||
36 | #define LED_CAPS_LOCK_PIN A1 | ||
37 | #define LED_SCROLL_LOCK_PIN A0 | ||
38 | |||
35 | #define BACKLIGHT_PIN A8 | 39 | #define BACKLIGHT_PIN A8 |
36 | #define BACKLIGHT_PWM_DRIVER PWMD1 | 40 | #define BACKLIGHT_PWM_DRIVER PWMD1 |
37 | #define BACKLIGHT_PWM_CHANNEL 1 | 41 | #define BACKLIGHT_PWM_CHANNEL 1 |
diff --git a/keyboards/coarse/cordillera/cordillera.c b/keyboards/coarse/cordillera/cordillera.c index 5bf07740b..437547ff2 100644 --- a/keyboards/coarse/cordillera/cordillera.c +++ b/keyboards/coarse/cordillera/cordillera.c | |||
@@ -16,23 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include "cordillera.h" | 18 | #include "cordillera.h" |
19 | |||
20 | void keyboard_pre_init_kb(void) { | ||
21 | led_init_ports(); | ||
22 | keyboard_pre_init_user(); | ||
23 | } | ||
24 | |||
25 | void led_init_ports(void) { | ||
26 | setPinOutput(B0); | ||
27 | setPinOutput(A1); | ||
28 | setPinOutput(A0); | ||
29 | } | ||
30 | |||
31 | bool led_update_kb(led_t led_state) { | ||
32 | if (led_update_user(led_state)) { | ||
33 | writePin(B0, led_state.num_lock); | ||
34 | writePin(A1, led_state.caps_lock); | ||
35 | writePin(A0, led_state.scroll_lock); | ||
36 | } | ||
37 | return true; | ||
38 | } | ||
diff --git a/keyboards/crazy_keyboard_68/config.h b/keyboards/crazy_keyboard_68/config.h index 2558e7579..e1304e18e 100644 --- a/keyboards/crazy_keyboard_68/config.h +++ b/keyboards/crazy_keyboard_68/config.h | |||
@@ -52,6 +52,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
52 | */ | 52 | */ |
53 | //#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 | 53 | //#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 |
54 | 54 | ||
55 | #define LED_CAPS_LOCK_PIN B2 | ||
56 | #define LED_PIN_ON_STATE 0 | ||
57 | |||
55 | //#define BACKLIGHT_PIN B7 | 58 | //#define BACKLIGHT_PIN B7 |
56 | //#define BACKLIGHT_LEVELS 3 | 59 | //#define BACKLIGHT_LEVELS 3 |
57 | //#define BACKLIGHT_BREATHING | 60 | //#define BACKLIGHT_BREATHING |
diff --git a/keyboards/crazy_keyboard_68/crazy_keyboard_68.c b/keyboards/crazy_keyboard_68/crazy_keyboard_68.c index f4f8515b7..cbea93fb8 100644 --- a/keyboards/crazy_keyboard_68/crazy_keyboard_68.c +++ b/keyboards/crazy_keyboard_68/crazy_keyboard_68.c | |||
@@ -15,22 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "crazy_keyboard_68.h" | 17 | #include "crazy_keyboard_68.h" |
18 | |||
19 | void matrix_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | |||
22 | matrix_init_user(); | ||
23 | } | ||
24 | |||
25 | void led_init_ports(void) { | ||
26 | // Caps lock pin | ||
27 | setPinOutput(B0); | ||
28 | writePinHigh(B0); | ||
29 | } | ||
30 | |||
31 | bool led_update_kb(led_t led_state) { | ||
32 | if(led_update_user(led_state)) { | ||
33 | writePin(B0, !led_state.caps_lock); | ||
34 | } | ||
35 | return true; | ||
36 | } | ||
diff --git a/keyboards/daisy/config.h b/keyboards/daisy/config.h index a41e158f1..ea56f948e 100644 --- a/keyboards/daisy/config.h +++ b/keyboards/daisy/config.h | |||
@@ -52,6 +52,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
52 | */ | 52 | */ |
53 | //#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 | 53 | //#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 |
54 | 54 | ||
55 | #define LED_CAPS_LOCK_PIN C6 | ||
56 | #define LED_PIN_ON_STATE 0 | ||
57 | |||
55 | #define BACKLIGHT_PIN D0 | 58 | #define BACKLIGHT_PIN D0 |
56 | // #define BACKLIGHT_BREATHING | 59 | // #define BACKLIGHT_BREATHING |
57 | #define BACKLIGHT_LEVELS 6 | 60 | #define BACKLIGHT_LEVELS 6 |
diff --git a/keyboards/daisy/daisy.c b/keyboards/daisy/daisy.c index 4e365ed46..98b7ac84b 100644 --- a/keyboards/daisy/daisy.c +++ b/keyboards/daisy/daisy.c | |||
@@ -15,21 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "daisy.h" | 17 | #include "daisy.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(C6); | ||
26 | writePinHigh(C6); | ||
27 | } | ||
28 | |||
29 | bool led_update_kb(led_t led_state) { | ||
30 | if (led_update_user(led_state)) { | ||
31 | writePin(C6, !led_state.caps_lock); | ||
32 | } | ||
33 | |||
34 | return true; | ||
35 | } | ||
diff --git a/keyboards/do60/config.h b/keyboards/do60/config.h index ef6c55c3e..f3ee1ed04 100644 --- a/keyboards/do60/config.h +++ b/keyboards/do60/config.h | |||
@@ -45,6 +45,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
45 | #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, F4, B4, D7, D6, B3, B0 } | 45 | #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, F4, B4, D7, D6, B3, B0 } |
46 | #define UNUSED_PINS | 46 | #define UNUSED_PINS |
47 | 47 | ||
48 | #define LED_CAPS_LOCK_PIN B2 | ||
49 | #define LED_PIN_ON_STATE 0 | ||
50 | |||
48 | /* Backlight Setup */ | 51 | /* Backlight Setup */ |
49 | #define BACKLIGHT_PIN B5 | 52 | #define BACKLIGHT_PIN B5 |
50 | #define BACKLIGHT_LEVELS 6 | 53 | #define BACKLIGHT_LEVELS 6 |
diff --git a/keyboards/do60/do60.c b/keyboards/do60/do60.c index 3dba9b535..b19fc5982 100644 --- a/keyboards/do60/do60.c +++ b/keyboards/do60/do60.c | |||
@@ -2,26 +2,9 @@ | |||
2 | 2 | ||
3 | extern inline void setdefaultrgb(void); | 3 | extern inline void setdefaultrgb(void); |
4 | 4 | ||
5 | |||
6 | void matrix_init_kb(void) { | 5 | void matrix_init_kb(void) { |
7 | // Keyboard start-up code goes here | 6 | // Keyboard start-up code goes here |
8 | // Runs once when the firmware starts up | 7 | // Runs once when the firmware starts up |
9 | matrix_init_user(); | 8 | matrix_init_user(); |
10 | led_init_ports(); | ||
11 | setdefaultrgb(); | 9 | setdefaultrgb(); |
12 | }; | 10 | }; |
13 | |||
14 | void led_init_ports(void) { | ||
15 | // Set caps lock LED pin as output | ||
16 | setPinOutput(B2); | ||
17 | // Default to off | ||
18 | writePinHigh(B2); | ||
19 | } | ||
20 | |||
21 | bool led_update_kb(led_t led_state) { | ||
22 | if(led_update_user(led_state)) { | ||
23 | writePin(B2, !led_state.caps_lock); | ||
24 | } | ||
25 | |||
26 | return true; | ||
27 | } | ||
diff --git a/keyboards/donutcables/budget96/budget96.c b/keyboards/donutcables/budget96/budget96.c index 5f3436dc6..8c7b894bc 100644 --- a/keyboards/donutcables/budget96/budget96.c +++ b/keyboards/donutcables/budget96/budget96.c | |||
@@ -15,21 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "budget96.h" | 17 | #include "budget96.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(D0); | ||
26 | setPinOutput(D1); | ||
27 | } | ||
28 | |||
29 | bool led_update_kb(led_t led_state) { | ||
30 | if (led_update_user(led_state)) { | ||
31 | writePin(D0, led_state.num_lock); | ||
32 | writePin(D1, led_state.caps_lock); | ||
33 | } | ||
34 | return true; | ||
35 | } | ||
diff --git a/keyboards/donutcables/budget96/config.h b/keyboards/donutcables/budget96/config.h index e04cc8b78..39b661dda 100644 --- a/keyboards/donutcables/budget96/config.h +++ b/keyboards/donutcables/budget96/config.h | |||
@@ -37,6 +37,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
37 | #define DIODE_DIRECTION COL2ROW | 37 | #define DIODE_DIRECTION COL2ROW |
38 | #define DEBOUNCE 5 | 38 | #define DEBOUNCE 5 |
39 | 39 | ||
40 | #define LED_NUM_LOCK_PIN D0 | ||
41 | #define LED_CAPS_LOCK_PIN D1 | ||
42 | |||
40 | #define BACKLIGHT_PIN D4 | 43 | #define BACKLIGHT_PIN D4 |
41 | #define BACKLIGHT_LEVELS 3 | 44 | #define BACKLIGHT_LEVELS 3 |
42 | 45 | ||
diff --git a/keyboards/eve/meteor/config.h b/keyboards/eve/meteor/config.h index 1e8c6ca05..a6b2c9b69 100644 --- a/keyboards/eve/meteor/config.h +++ b/keyboards/eve/meteor/config.h | |||
@@ -36,5 +36,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
36 | #define DIODE_DIRECTION COL2ROW | 36 | #define DIODE_DIRECTION COL2ROW |
37 | #define DEBOUNCE 5 | 37 | #define DEBOUNCE 5 |
38 | 38 | ||
39 | #define LED_CAPS_LOCK_PIN D1 | ||
40 | |||
39 | #define BACKLIGHT_PIN D4 | 41 | #define BACKLIGHT_PIN D4 |
40 | #define BACKLIGHT_LEVELS 3 | 42 | #define BACKLIGHT_LEVELS 3 |
diff --git a/keyboards/eve/meteor/meteor.c b/keyboards/eve/meteor/meteor.c index 1d080b389..6bdb117f3 100644 --- a/keyboards/eve/meteor/meteor.c +++ b/keyboards/eve/meteor/meteor.c | |||
@@ -15,19 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "meteor.h" | 17 | #include "meteor.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(D1); | ||
26 | } | ||
27 | |||
28 | bool led_update_kb(led_t led_state) { | ||
29 | if (led_update_user(led_state)) { | ||
30 | writePin(D1, led_state.caps_lock); | ||
31 | } | ||
32 | return true; | ||
33 | } | ||
diff --git a/keyboards/evyd13/eon75/config.h b/keyboards/evyd13/eon75/config.h index 707665140..d7d84de2a 100644 --- a/keyboards/evyd13/eon75/config.h +++ b/keyboards/evyd13/eon75/config.h | |||
@@ -51,6 +51,11 @@ | |||
51 | */ | 51 | */ |
52 | // #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 | 52 | // #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 |
53 | 53 | ||
54 | #define LED_NUM_LOCK_PIN B7 | ||
55 | #define LED_CAPS_LOCK_PIN D5 | ||
56 | #define LED_SCROLL_LOCK_PIN B0 | ||
57 | #define LED_PIN_ON_STATE 0 | ||
58 | |||
54 | // #define BACKLIGHT_PIN B7 | 59 | // #define BACKLIGHT_PIN B7 |
55 | // #define BACKLIGHT_BREATHING | 60 | // #define BACKLIGHT_BREATHING |
56 | // #define BACKLIGHT_LEVELS 3 | 61 | // #define BACKLIGHT_LEVELS 3 |
diff --git a/keyboards/evyd13/eon75/eon75.c b/keyboards/evyd13/eon75/eon75.c index 67e9fe66a..38620a636 100644 --- a/keyboards/evyd13/eon75/eon75.c +++ b/keyboards/evyd13/eon75/eon75.c | |||
@@ -14,32 +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 "eon75.h" | 16 | #include "eon75.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 | matrix_init_user(); | ||
22 | led_init_ports(); | ||
23 | }; | ||
24 | |||
25 | void led_init_ports(void) { | ||
26 | // * Set our LED pins as output and high | ||
27 | setPinOutput(D5); | ||
28 | writePinHigh(D5); | ||
29 | |||
30 | setPinOutput(B7); | ||
31 | writePinHigh(B7); | ||
32 | |||
33 | setPinOutput(B0); | ||
34 | writePinHigh(B0); | ||
35 | } | ||
36 | |||
37 | bool led_update_kb(led_t led_state) { | ||
38 | if(led_update_user(led_state)) { | ||
39 | writePin(D5, !led_state.caps_lock); | ||
40 | writePin(B7, !led_state.num_lock); | ||
41 | writePin(B0, !led_state.scroll_lock); | ||
42 | } | ||
43 | |||
44 | return true; | ||
45 | } | ||
diff --git a/keyboards/evyd13/eon95/config.h b/keyboards/evyd13/eon95/config.h index eb44d8957..2d9ede3ee 100644 --- a/keyboards/evyd13/eon95/config.h +++ b/keyboards/evyd13/eon95/config.h | |||
@@ -51,6 +51,11 @@ | |||
51 | */ | 51 | */ |
52 | // #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 | 52 | // #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 |
53 | 53 | ||
54 | #define LED_NUM_LOCK_PIN B7 | ||
55 | #define LED_CAPS_LOCK_PIN D5 | ||
56 | #define LED_SCROLL_LOCK_PIN B0 | ||
57 | #define LED_PIN_ON_STATE 0 | ||
58 | |||
54 | // #define BACKLIGHT_PIN B7 | 59 | // #define BACKLIGHT_PIN B7 |
55 | // #define BACKLIGHT_BREATHING | 60 | // #define BACKLIGHT_BREATHING |
56 | // #define BACKLIGHT_LEVELS 3 | 61 | // #define BACKLIGHT_LEVELS 3 |
diff --git a/keyboards/evyd13/eon95/eon95.c b/keyboards/evyd13/eon95/eon95.c index 5eec86cc1..603d84a13 100644 --- a/keyboards/evyd13/eon95/eon95.c +++ b/keyboards/evyd13/eon95/eon95.c | |||
@@ -14,32 +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 "eon95.h" | 16 | #include "eon95.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 | matrix_init_user(); | ||
22 | led_init_ports(); | ||
23 | } | ||
24 | |||
25 | void led_init_ports(void) { | ||
26 | // * Set our LED pins as output and high | ||
27 | setPinOutput(D5); | ||
28 | writePinHigh(D5); | ||
29 | |||
30 | setPinOutput(B7); | ||
31 | writePinHigh(B7); | ||
32 | |||
33 | setPinOutput(B0); | ||
34 | writePinHigh(B0); | ||
35 | } | ||
36 | |||
37 | bool led_update_kb(led_t led_state) { | ||
38 | if(led_update_user(led_state)) { | ||
39 | writePin(D5, !led_state.caps_lock); | ||
40 | writePin(B7, !led_state.num_lock); | ||
41 | writePin(B0, !led_state.scroll_lock); | ||
42 | } | ||
43 | |||
44 | return true; | ||
45 | } | ||
diff --git a/keyboards/evyd13/gh80_1800/config.h b/keyboards/evyd13/gh80_1800/config.h index c230aa9af..26ad8a8b1 100644 --- a/keyboards/evyd13/gh80_1800/config.h +++ b/keyboards/evyd13/gh80_1800/config.h | |||
@@ -51,6 +51,11 @@ | |||
51 | */ | 51 | */ |
52 | // #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 | 52 | // #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 |
53 | 53 | ||
54 | #define LED_NUM_LOCK_PIN D6 | ||
55 | #define LED_CAPS_LOCK_PIN D7 | ||
56 | #define LED_SCROLL_LOCK_PIN D4 | ||
57 | #define LED_PIN_ON_STATE 0 | ||
58 | |||
54 | // #define BACKLIGHT_PIN B7 | 59 | // #define BACKLIGHT_PIN B7 |
55 | // #define BACKLIGHT_BREATHING | 60 | // #define BACKLIGHT_BREATHING |
56 | // #define BACKLIGHT_LEVELS 3 | 61 | // #define BACKLIGHT_LEVELS 3 |
diff --git a/keyboards/evyd13/gh80_1800/gh80_1800.c b/keyboards/evyd13/gh80_1800/gh80_1800.c index 770c6f78b..1691b3949 100644 --- a/keyboards/evyd13/gh80_1800/gh80_1800.c +++ b/keyboards/evyd13/gh80_1800/gh80_1800.c | |||
@@ -14,31 +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 "gh80_1800.h" | 16 | #include "gh80_1800.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 | led_init_ports(); | ||
24 | } | ||
25 | |||
26 | void led_init_ports(void) { | ||
27 | setPinOutput(D6); | ||
28 | setPinOutput(D7); | ||
29 | setPinOutput(D4); | ||
30 | |||
31 | writePinHigh(D6); | ||
32 | writePinHigh(D7); | ||
33 | writePinHigh(D4); | ||
34 | } | ||
35 | |||
36 | bool led_update_kb(led_t led_state) { | ||
37 | if(led_update_user(led_state)) { | ||
38 | writePin(D6, !led_state.num_lock); | ||
39 | writePin(D7, !led_state.caps_lock); | ||
40 | writePin(D4, !led_state.scroll_lock); | ||
41 | } | ||
42 | |||
43 | return true; | ||
44 | } | ||
diff --git a/keyboards/evyd13/minitomic/config.h b/keyboards/evyd13/minitomic/config.h index c041e86a2..f26b4d1d9 100644 --- a/keyboards/evyd13/minitomic/config.h +++ b/keyboards/evyd13/minitomic/config.h | |||
@@ -51,6 +51,9 @@ | |||
51 | */ | 51 | */ |
52 | // #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 | 52 | // #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 |
53 | 53 | ||
54 | #define LED_CAPS_LOCK_PIN C7 | ||
55 | #define LED_PIN_ON_STATE 0 | ||
56 | |||
54 | // #define BACKLIGHT_PIN B7 | 57 | // #define BACKLIGHT_PIN B7 |
55 | // #define BACKLIGHT_BREATHING | 58 | // #define BACKLIGHT_BREATHING |
56 | // #define BACKLIGHT_LEVELS 3 | 59 | // #define BACKLIGHT_LEVELS 3 |
diff --git a/keyboards/evyd13/minitomic/minitomic.c b/keyboards/evyd13/minitomic/minitomic.c index 8d5f11a50..15f282964 100644 --- a/keyboards/evyd13/minitomic/minitomic.c +++ b/keyboards/evyd13/minitomic/minitomic.c | |||
@@ -14,37 +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 "minitomic.h" | 16 | #include "minitomic.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 | led_init_ports(); | ||
24 | } | ||
25 | |||
26 | void matrix_scan_kb(void) { | ||
27 | // put your looping keyboard code here | ||
28 | // runs every cycle (a lot) | ||
29 | |||
30 | matrix_scan_user(); | ||
31 | } | ||
32 | |||
33 | void led_init_ports(void) { | ||
34 | //Set led pin as output, then high (off) | ||
35 | writePinHigh(C7); | ||
36 | } | ||
37 | |||
38 | bool led_update_kb(led_t led_state) { | ||
39 | bool res = led_update_user(led_state); | ||
40 | if(res) { | ||
41 | // writePin sets the pin high for 1 and low for 0. | ||
42 | // In this example the pins are inverted, setting | ||
43 | // it low/0 turns it on, and high/1 turns the LED off. | ||
44 | // This behavior depends on whether the LED is between the pin | ||
45 | // and VCC or the pin and GND. | ||
46 | writePin(C7, !led_state.caps_lock); | ||
47 | } | ||
48 | return res; | ||
49 | } | ||
50 | |||
diff --git a/keyboards/evyd13/mx5160/config.h b/keyboards/evyd13/mx5160/config.h index 926095a5d..c65f81b87 100644 --- a/keyboards/evyd13/mx5160/config.h +++ b/keyboards/evyd13/mx5160/config.h | |||
@@ -55,6 +55,11 @@ | |||
55 | */ | 55 | */ |
56 | // #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 | 56 | // #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 |
57 | 57 | ||
58 | #define LED_NUM_LOCK_PIN B2 | ||
59 | #define LED_CAPS_LOCK_PIN B1 | ||
60 | #define LED_SCROLL_LOCK_PIN B3 | ||
61 | #define LED_PIN_ON_STATE 0 | ||
62 | |||
58 | // #define BACKLIGHT_PIN B7 | 63 | // #define BACKLIGHT_PIN B7 |
59 | // #define BACKLIGHT_BREATHING | 64 | // #define BACKLIGHT_BREATHING |
60 | // #define BACKLIGHT_LEVELS 3 | 65 | // #define BACKLIGHT_LEVELS 3 |
diff --git a/keyboards/evyd13/mx5160/mx5160.c b/keyboards/evyd13/mx5160/mx5160.c index c9e412da2..298c44fd4 100644 --- a/keyboards/evyd13/mx5160/mx5160.c +++ b/keyboards/evyd13/mx5160/mx5160.c | |||
@@ -14,45 +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 "mx5160.h" | 16 | #include "mx5160.h" |
17 | |||
18 | |||
19 | void matrix_init_kb(void) { | ||
20 | // put your keyboard start-up code here | ||
21 | // runs once when the firmware starts up | ||
22 | |||
23 | matrix_init_user(); | ||
24 | led_init_ports(); | ||
25 | } | ||
26 | |||
27 | void matrix_scan_kb(void) { | ||
28 | // put your looping keyboard code here | ||
29 | // runs every cycle (a lot) | ||
30 | |||
31 | matrix_scan_user(); | ||
32 | } | ||
33 | |||
34 | void led_init_ports(void) { | ||
35 | //Set led pin as output, then high (off) | ||
36 | |||
37 | //Caps lock | ||
38 | setPinOutput(B1); | ||
39 | writePinHigh(B1); | ||
40 | |||
41 | //Num lock | ||
42 | setPinOutput(B2); | ||
43 | writePinHigh(B2); | ||
44 | |||
45 | //Scroll lock | ||
46 | setPinOutput(B3); | ||
47 | writePinHigh(B3); | ||
48 | } | ||
49 | |||
50 | bool led_update_kb(led_t led_state) { | ||
51 | bool res = led_update_user(led_state); | ||
52 | if (res) { | ||
53 | writePin(B2, !led_state.num_lock); | ||
54 | writePin(B1, !led_state.caps_lock); | ||
55 | writePin(B3, !led_state.scroll_lock); | ||
56 | } | ||
57 | return res; | ||
58 | } | ||
diff --git a/keyboards/evyd13/nt660/config.h b/keyboards/evyd13/nt660/config.h index 0d9bbd330..863884714 100644 --- a/keyboards/evyd13/nt660/config.h +++ b/keyboards/evyd13/nt660/config.h | |||
@@ -53,6 +53,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
53 | */ | 53 | */ |
54 | // #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 | 54 | // #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 |
55 | 55 | ||
56 | #define LED_CAPS_LOCK_PIN D0 | ||
57 | |||
56 | // #define BACKLIGHT_PIN B7 | 58 | // #define BACKLIGHT_PIN B7 |
57 | // #define BACKLIGHT_BREATHING | 59 | // #define BACKLIGHT_BREATHING |
58 | // #define BACKLIGHT_LEVELS 3 | 60 | // #define BACKLIGHT_LEVELS 3 |
diff --git a/keyboards/evyd13/nt660/nt660.c b/keyboards/evyd13/nt660/nt660.c index 2a8ebfb46..f89fa579c 100644 --- a/keyboards/evyd13/nt660/nt660.c +++ b/keyboards/evyd13/nt660/nt660.c | |||
@@ -14,19 +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 "nt660.h" | 16 | #include "nt660.h" |
17 | void matrix_init_kb(void) { | ||
18 | matrix_init_user(); | ||
19 | led_init_ports(); | ||
20 | } | ||
21 | |||
22 | void led_init_ports(void) { | ||
23 | setPinOutput(D0); | ||
24 | } | ||
25 | |||
26 | bool led_update_kb(led_t led_state) { | ||
27 | if(led_update_user(led_state)) { | ||
28 | writePin(D0, !led_state.caps_lock); | ||
29 | } | ||
30 | |||
31 | return true; | ||
32 | } | ||
diff --git a/keyboards/evyd13/quackfire/config.h b/keyboards/evyd13/quackfire/config.h index 22083e811..151219a01 100644 --- a/keyboards/evyd13/quackfire/config.h +++ b/keyboards/evyd13/quackfire/config.h | |||
@@ -52,6 +52,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
52 | */ | 52 | */ |
53 | //#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 | 53 | //#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 |
54 | 54 | ||
55 | #define LED_CAPS_LOCK_PIN F7 | ||
56 | #define LED_SCROLL_LOCK_PIN F6 | ||
57 | #define LED_PIN_ON_STATE 0 | ||
58 | |||
55 | // #define BACKLIGHT_PIN B7 | 59 | // #define BACKLIGHT_PIN B7 |
56 | // #define BACKLIGHT_BREATHING | 60 | // #define BACKLIGHT_BREATHING |
57 | // #define BACKLIGHT_LEVELS 5 | 61 | // #define BACKLIGHT_LEVELS 5 |
diff --git a/keyboards/evyd13/quackfire/quackfire.c b/keyboards/evyd13/quackfire/quackfire.c index ab233bd6d..634d4187c 100644 --- a/keyboards/evyd13/quackfire/quackfire.c +++ b/keyboards/evyd13/quackfire/quackfire.c | |||
@@ -14,31 +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 "quackfire.h" | 16 | #include "quackfire.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(F6); | ||
32 | setPinOutput(F7); | ||
33 | writePinHigh(F6); | ||
34 | writePinHigh(F7); | ||
35 | } | ||
36 | |||
37 | bool led_update_kb(led_t led_state) { | ||
38 | if(led_update_user(led_state)) { | ||
39 | writePin(F7, !led_state.caps_lock); | ||
40 | writePin(F6, !led_state.scroll_lock); | ||
41 | } | ||
42 | |||
43 | return true; | ||
44 | } | ||
diff --git a/keyboards/evyd13/wasdat/config.h b/keyboards/evyd13/wasdat/config.h index c064d18a5..75b75a0d2 100644 --- a/keyboards/evyd13/wasdat/config.h +++ b/keyboards/evyd13/wasdat/config.h | |||
@@ -57,6 +57,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
57 | */ | 57 | */ |
58 | //#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 | 58 | //#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 |
59 | 59 | ||
60 | #define LED_NUM_LOCK_PIN B2 | ||
61 | #define LED_CAPS_LOCK_PIN B0 | ||
62 | #define LED_SCROLL_LOCK_PIN B1 | ||
63 | #define LED_PIN_ON_STATE 0 | ||
64 | |||
60 | // #define BACKLIGHT_PIN B7 | 65 | // #define BACKLIGHT_PIN B7 |
61 | // #define BACKLIGHT_BREATHING | 66 | // #define BACKLIGHT_BREATHING |
62 | // #define BACKLIGHT_LEVELS 3 | 67 | // #define BACKLIGHT_LEVELS 3 |
diff --git a/keyboards/evyd13/wasdat/wasdat.c b/keyboards/evyd13/wasdat/wasdat.c index 2d0e999c4..6aaa1b842 100644 --- a/keyboards/evyd13/wasdat/wasdat.c +++ b/keyboards/evyd13/wasdat/wasdat.c | |||
@@ -14,34 +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 "wasdat.h" | 16 | #include "wasdat.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(B0); | ||
32 | writePinHigh(B0); | ||
33 | setPinOutput(B1); | ||
34 | writePinHigh(B1); | ||
35 | setPinOutput(B2); | ||
36 | writePinHigh(B2); | ||
37 | } | ||
38 | |||
39 | bool led_update_kb(led_t led_state) { | ||
40 | if(led_update_user(led_state)) { | ||
41 | writePin(B0, !led_state.caps_lock); | ||
42 | writePin(B1, !led_state.scroll_lock); | ||
43 | writePin(B2, !led_state.num_lock); | ||
44 | } | ||
45 | |||
46 | return true; | ||
47 | } | ||
diff --git a/keyboards/evyd13/wasdat_code/config.h b/keyboards/evyd13/wasdat_code/config.h index 804839ee9..4ac77f217 100644 --- a/keyboards/evyd13/wasdat_code/config.h +++ b/keyboards/evyd13/wasdat_code/config.h | |||
@@ -57,6 +57,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
57 | */ | 57 | */ |
58 | //#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 | 58 | //#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 |
59 | 59 | ||
60 | #define LED_NUM_LOCK_PIN B3 | ||
61 | #define LED_CAPS_LOCK_PIN B1 | ||
62 | #define LED_SCROLL_LOCK_PIN B2 | ||
63 | #define LED_PIN_ON_STATE 0 | ||
64 | |||
60 | #define BACKLIGHT_PIN B7 | 65 | #define BACKLIGHT_PIN B7 |
61 | #define BACKLIGHT_BREATHING | 66 | #define BACKLIGHT_BREATHING |
62 | #define BACKLIGHT_LEVELS 5 | 67 | #define BACKLIGHT_LEVELS 5 |
diff --git a/keyboards/evyd13/wasdat_code/wasdat_code.c b/keyboards/evyd13/wasdat_code/wasdat_code.c index 33551c2d0..c1cdadea9 100644 --- a/keyboards/evyd13/wasdat_code/wasdat_code.c +++ b/keyboards/evyd13/wasdat_code/wasdat_code.c | |||
@@ -14,34 +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 "wasdat_code.h" | 16 | #include "wasdat_code.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(B1); | ||
32 | setPinOutput(B2); | ||
33 | setPinOutput(B3); | ||
34 | writePinHigh(B1); | ||
35 | writePinHigh(B2); | ||
36 | writePinHigh(B3); | ||
37 | } | ||
38 | |||
39 | bool led_update_kb(led_t led_state) { | ||
40 | if(led_update_user(led_state)) { | ||
41 | writePin(B1, !led_state.caps_lock); | ||
42 | writePin(B2, !led_state.scroll_lock); | ||
43 | writePin(B3, !led_state.num_lock); | ||
44 | } | ||
45 | |||
46 | return true; | ||
47 | } | ||
diff --git a/keyboards/evyd13/wonderland/config.h b/keyboards/evyd13/wonderland/config.h index 908c8a785..c5c7a8b6c 100644 --- a/keyboards/evyd13/wonderland/config.h +++ b/keyboards/evyd13/wonderland/config.h | |||
@@ -43,6 +43,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
43 | /* Set 0 if debouncing isn't needed */ | 43 | /* Set 0 if debouncing isn't needed */ |
44 | #define DEBOUNCE 5 | 44 | #define DEBOUNCE 5 |
45 | 45 | ||
46 | #define LED_NUM_LOCK_PIN B1 | ||
47 | #define LED_CAPS_LOCK_PIN B2 | ||
48 | #define LED_SCROLL_LOCK_PIN B3 | ||
49 | #define LED_PIN_ON_STATE 0 | ||
50 | |||
46 | /* Backlight configuration | 51 | /* Backlight configuration |
47 | */ | 52 | */ |
48 | #define RGB_DI_PIN B7 | 53 | #define RGB_DI_PIN B7 |
diff --git a/keyboards/evyd13/wonderland/wonderland.c b/keyboards/evyd13/wonderland/wonderland.c index 441544381..f2a53a17a 100644 --- a/keyboards/evyd13/wonderland/wonderland.c +++ b/keyboards/evyd13/wonderland/wonderland.c | |||
@@ -1,34 +1 @@ | |||
1 | #include "wonderland.h" | #include "wonderland.h" | |
2 | |||
3 | __attribute__ ((weak)) | ||
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 | __attribute__ ((weak)) | ||
12 | void matrix_scan_kb(void) { | ||
13 | // put your looping keyboard code here | ||
14 | // runs every cycle (a lot) | ||
15 | matrix_scan_user(); | ||
16 | }; | ||
17 | |||
18 | __attribute__ ((weak)) | ||
19 | void led_init_ports(void) { | ||
20 | // * Set our LED pins as output | ||
21 | setPinOutput(B1); | ||
22 | setPinOutput(B2); | ||
23 | setPinOutput(B3); | ||
24 | } | ||
25 | |||
26 | bool led_update_kb(led_t led_state) { | ||
27 | bool runDefault = led_update_user(led_state); | ||
28 | if (runDefault) { | ||
29 | writePin(B1, !led_state.num_lock); | ||
30 | writePin(B2, !led_state.caps_lock); | ||
31 | writePin(B3, !led_state.scroll_lock); | ||
32 | } | ||
33 | return runDefault; | ||
34 | } | ||
diff --git a/keyboards/exclusive/e65/config.h b/keyboards/exclusive/e65/config.h index bc0f1a1ed..1d43011b8 100644 --- a/keyboards/exclusive/e65/config.h +++ b/keyboards/exclusive/e65/config.h | |||
@@ -39,6 +39,9 @@ | |||
39 | /* COL2ROW or ROW2COL */ | 39 | /* COL2ROW or ROW2COL */ |
40 | #define DIODE_DIRECTION COL2ROW | 40 | #define DIODE_DIRECTION COL2ROW |
41 | 41 | ||
42 | #define LED_CAPS_LOCK_PIN B6 | ||
43 | #define LED_PIN_ON_STATE 0 | ||
44 | |||
42 | /* number of backlight levels */ | 45 | /* number of backlight levels */ |
43 | #define BACKLIGHT_PIN B7 | 46 | #define BACKLIGHT_PIN B7 |
44 | #ifdef BACKLIGHT_PIN | 47 | #ifdef BACKLIGHT_PIN |
diff --git a/keyboards/exclusive/e65/e65.c b/keyboards/exclusive/e65/e65.c index e01a0614c..feb0e6543 100644 --- a/keyboards/exclusive/e65/e65.c +++ b/keyboards/exclusive/e65/e65.c | |||
@@ -15,24 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "e65.h" | 17 | #include "e65.h" |
18 | |||
19 | void matrix_init_kb(void) { | ||
20 | // put your keyboard start-up code here | ||
21 | // runs once when the firmware starts up | ||
22 | |||
23 | matrix_init_user(); | ||
24 | led_init_ports(); | ||
25 | } | ||
26 | |||
27 | void led_init_ports(void) { | ||
28 | setPinOutput(B6); | ||
29 | writePinHigh(B6); | ||
30 | } | ||
31 | |||
32 | bool led_update_kb(led_t led_state) { | ||
33 | if(led_update_user(led_state)) { | ||
34 | writePin(B6, !led_state.caps_lock); | ||
35 | } | ||
36 | |||
37 | return true; | ||
38 | } | ||
diff --git a/keyboards/exclusive/e6v2/le_bmc/config.h b/keyboards/exclusive/e6v2/le_bmc/config.h index e9e8c9e53..8115f4ae1 100644 --- a/keyboards/exclusive/e6v2/le_bmc/config.h +++ b/keyboards/exclusive/e6v2/le_bmc/config.h | |||
@@ -44,6 +44,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
44 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, C2, C3, C4, C5, D7 } | 44 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, C2, C3, C4, C5, D7 } |
45 | #define DIODE_DIRECTION COL2ROW | 45 | #define DIODE_DIRECTION COL2ROW |
46 | 46 | ||
47 | #define LED_CAPS_LOCK_PIN D1 | ||
48 | |||
47 | #define BACKLIGHT_PIN D4 | 49 | #define BACKLIGHT_PIN D4 |
48 | #define BACKLIGHT_LEVELS 3 | 50 | #define BACKLIGHT_LEVELS 3 |
49 | 51 | ||
diff --git a/keyboards/exclusive/e6v2/le_bmc/le_bmc.c b/keyboards/exclusive/e6v2/le_bmc/le_bmc.c index df79cc5dc..e36cfd645 100644 --- a/keyboards/exclusive/e6v2/le_bmc/le_bmc.c +++ b/keyboards/exclusive/e6v2/le_bmc/le_bmc.c | |||
@@ -15,19 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "le_bmc.h" | 17 | #include "le_bmc.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(D1); | ||
26 | } | ||
27 | |||
28 | bool led_update_kb(led_t led_state) { | ||
29 | if (led_update_user(led_state)) { | ||
30 | writePin(D1, led_state.caps_lock); | ||
31 | } | ||
32 | return true; | ||
33 | } | ||
diff --git a/keyboards/exclusive/e6v2/oe_bmc/config.h b/keyboards/exclusive/e6v2/oe_bmc/config.h index f4abd2112..3f2a50cde 100644 --- a/keyboards/exclusive/e6v2/oe_bmc/config.h +++ b/keyboards/exclusive/e6v2/oe_bmc/config.h | |||
@@ -44,6 +44,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
44 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, C2, C3, C4, C5, D7 } | 44 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, C2, C3, C4, C5, D7 } |
45 | #define DIODE_DIRECTION COL2ROW | 45 | #define DIODE_DIRECTION COL2ROW |
46 | 46 | ||
47 | #define LED_CAPS_LOCK_PIN D1 | ||
48 | |||
47 | #define BACKLIGHT_PIN D4 | 49 | #define BACKLIGHT_PIN D4 |
48 | #define BACKLIGHT_LEVELS 3 | 50 | #define BACKLIGHT_LEVELS 3 |
49 | 51 | ||
diff --git a/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c b/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c index ea74d87cb..10dd1a26e 100644 --- a/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c +++ b/keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c | |||
@@ -15,19 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "oe_bmc.h" | 17 | #include "oe_bmc.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(D1); | ||
26 | } | ||
27 | |||
28 | bool led_update_kb(led_t led_state) { | ||
29 | if (led_update_user(led_state)) { | ||
30 | writePin(D1, led_state.caps_lock); | ||
31 | } | ||
32 | return true; | ||
33 | } | ||
diff --git a/keyboards/exent/config.h b/keyboards/exent/config.h index 6b37bdd1c..16a49e78f 100644 --- a/keyboards/exent/config.h +++ b/keyboards/exent/config.h | |||
@@ -38,6 +38,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
38 | #define DIODE_DIRECTION COL2ROW | 38 | #define DIODE_DIRECTION COL2ROW |
39 | #define DEBOUNCE 5 | 39 | #define DEBOUNCE 5 |
40 | 40 | ||
41 | #define LED_NUM_LOCK_PIN D0 | ||
42 | #define LED_CAPS_LOCK_PIN D1 | ||
43 | #define LED_SCROLL_LOCK_PIN D6 | ||
44 | |||
41 | #define BACKLIGHT_PIN D4 | 45 | #define BACKLIGHT_PIN D4 |
42 | #define BACKLIGHT_LEVELS 3 | 46 | #define BACKLIGHT_LEVELS 3 |
43 | 47 | ||
diff --git a/keyboards/exent/exent.c b/keyboards/exent/exent.c index a935e9e67..82066f7e8 100644 --- a/keyboards/exent/exent.c +++ b/keyboards/exent/exent.c | |||
@@ -15,23 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "exent.h" | 17 | #include "exent.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(D0); | ||
26 | setPinOutput(D1); | ||
27 | setPinOutput(D6); | ||
28 | } | ||
29 | |||
30 | bool led_update_kb(led_t led_state) { | ||
31 | if (led_update_user(led_state)) { | ||
32 | writePin(D0, led_state.num_lock); | ||
33 | writePin(D1, led_state.caps_lock); | ||
34 | writePin(D6, led_state.scroll_lock); | ||
35 | } | ||
36 | return true; | ||
37 | } | ||
diff --git a/keyboards/facew/config.h b/keyboards/facew/config.h index 5966429ca..14583dc83 100644 --- a/keyboards/facew/config.h +++ b/keyboards/facew/config.h | |||
@@ -37,6 +37,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
37 | #define DIODE_DIRECTION COL2ROW | 37 | #define DIODE_DIRECTION COL2ROW |
38 | #define DEBOUNCE 5 | 38 | #define DEBOUNCE 5 |
39 | 39 | ||
40 | #define LED_NUM_LOCK_PIN D0 | ||
41 | #define LED_CAPS_LOCK_PIN D1 | ||
42 | |||
40 | #define BACKLIGHT_PIN D4 | 43 | #define BACKLIGHT_PIN D4 |
41 | #define BACKLIGHT_LEVELS 3 | 44 | #define BACKLIGHT_LEVELS 3 |
42 | 45 | ||
diff --git a/keyboards/facew/facew.c b/keyboards/facew/facew.c index 2f091ae6b..373dbc6cd 100644 --- a/keyboards/facew/facew.c +++ b/keyboards/facew/facew.c | |||
@@ -16,21 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include "facew.h" | 18 | #include "facew.h" |
19 | |||
20 | void keyboard_pre_init_kb(void) { | ||
21 | led_init_ports(); | ||
22 | keyboard_pre_init_user(); | ||
23 | } | ||
24 | |||
25 | void led_init_ports(void) { | ||
26 | setPinOutput(D0); | ||
27 | setPinOutput(D1); | ||
28 | } | ||
29 | |||
30 | bool led_update_kb(led_t led_state) { | ||
31 | if (led_update_user(led_state)) { | ||
32 | writePin(D0, led_state.num_lock); | ||
33 | writePin(D1, led_state.caps_lock); | ||
34 | } | ||
35 | return true; | ||
36 | } | ||
diff --git a/keyboards/foxlab/key65/hotswap/config.h b/keyboards/foxlab/key65/hotswap/config.h index a5ada6bd0..43f883fce 100644 --- a/keyboards/foxlab/key65/hotswap/config.h +++ b/keyboards/foxlab/key65/hotswap/config.h | |||
@@ -45,6 +45,9 @@ | |||
45 | /* COL2ROW, ROW2COL*/ | 45 | /* COL2ROW, ROW2COL*/ |
46 | #define DIODE_DIRECTION COL2ROW | 46 | #define DIODE_DIRECTION COL2ROW |
47 | 47 | ||
48 | #define LED_SCROLL_LOCK_PIN E6 | ||
49 | #define LED_PIN_ON_STATE 0 | ||
50 | |||
48 | #define BACKLIGHT_PIN B7 | 51 | #define BACKLIGHT_PIN B7 |
49 | // #define BACKLIGHT_BREATHING | 52 | // #define BACKLIGHT_BREATHING |
50 | #define BACKLIGHT_LEVELS 5 | 53 | #define BACKLIGHT_LEVELS 5 |
diff --git a/keyboards/foxlab/key65/hotswap/hotswap.c b/keyboards/foxlab/key65/hotswap/hotswap.c index 6b3950d36..31fb011ad 100644 --- a/keyboards/foxlab/key65/hotswap/hotswap.c +++ b/keyboards/foxlab/key65/hotswap/hotswap.c | |||
@@ -15,20 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "hotswap.h" | 17 | #include "hotswap.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(E6); | ||
26 | writePinHigh(E6); | ||
27 | } | ||
28 | |||
29 | bool led_update_kb(led_t led_state) { | ||
30 | if (led_update_user(led_state)) { | ||
31 | writePin(E6, !led_state.caps_lock); | ||
32 | } | ||
33 | return true; | ||
34 | } | ||
diff --git a/keyboards/foxlab/key65/universal/config.h b/keyboards/foxlab/key65/universal/config.h index a3c01cd75..315af6676 100644 --- a/keyboards/foxlab/key65/universal/config.h +++ b/keyboards/foxlab/key65/universal/config.h | |||
@@ -45,6 +45,9 @@ | |||
45 | /* COL2ROW, ROW2COL*/ | 45 | /* COL2ROW, ROW2COL*/ |
46 | #define DIODE_DIRECTION COL2ROW | 46 | #define DIODE_DIRECTION COL2ROW |
47 | 47 | ||
48 | #define LED_SCROLL_LOCK_PIN E6 | ||
49 | #define LED_PIN_ON_STATE 0 | ||
50 | |||
48 | #define BACKLIGHT_PIN B7 | 51 | #define BACKLIGHT_PIN B7 |
49 | // #define BACKLIGHT_BREATHING | 52 | // #define BACKLIGHT_BREATHING |
50 | #define BACKLIGHT_LEVELS 5 | 53 | #define BACKLIGHT_LEVELS 5 |
diff --git a/keyboards/foxlab/key65/universal/universal.c b/keyboards/foxlab/key65/universal/universal.c index 361f3ad7f..5fa9e8f17 100644 --- a/keyboards/foxlab/key65/universal/universal.c +++ b/keyboards/foxlab/key65/universal/universal.c | |||
@@ -15,20 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "universal.h" | 17 | #include "universal.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(E6); | ||
26 | writePinHigh(E6); | ||
27 | } | ||
28 | |||
29 | bool led_update_kb(led_t led_state) { | ||
30 | if (led_update_user(led_state)) { | ||
31 | writePin(E6, !led_state.caps_lock); | ||
32 | } | ||
33 | return true; | ||
34 | } | ||
diff --git a/keyboards/freyr/config.h b/keyboards/freyr/config.h index a4e34ea47..d912b3cc1 100644 --- a/keyboards/freyr/config.h +++ b/keyboards/freyr/config.h | |||
@@ -47,6 +47,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
47 | /* COL2ROW, ROW2COL */ | 47 | /* COL2ROW, ROW2COL */ |
48 | #define DIODE_DIRECTION COL2ROW | 48 | #define DIODE_DIRECTION COL2ROW |
49 | 49 | ||
50 | #define LED_CAPS_LOCK_PIN B3 | ||
51 | #define LED_SCROLL_LOCK_PIN B7 | ||
52 | #define LED_PIN_ON_STATE 0 | ||
53 | |||
50 | #define BACKLIGHT_PIN B6 | 54 | #define BACKLIGHT_PIN B6 |
51 | #define BACKLIGHT_LEVELS 3 | 55 | #define BACKLIGHT_LEVELS 3 |
52 | #define BACKLIGHT_BREATHING | 56 | #define BACKLIGHT_BREATHING |
diff --git a/keyboards/freyr/freyr.c b/keyboards/freyr/freyr.c index 336b32711..a856521e7 100644 --- a/keyboards/freyr/freyr.c +++ b/keyboards/freyr/freyr.c | |||
@@ -15,22 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "freyr.h" | 17 | #include "freyr.h" |
18 | |||
19 | void matrix_init_kb(void) { | ||
20 | matrix_init_user(); | ||
21 | led_init_ports(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(B3); | ||
26 | setPinOutput(B7); | ||
27 | } | ||
28 | |||
29 | bool led_update_kb(led_t led_state) { | ||
30 | if (led_update_user(led_state)) { | ||
31 | writePin(B3, !led_state.caps_lock); | ||
32 | writePin(B7, !led_state.scroll_lock); | ||
33 | } | ||
34 | |||
35 | return true; | ||
36 | } | ||
diff --git a/keyboards/ft/mars80/config.h b/keyboards/ft/mars80/config.h index 3aabc926d..e56d4439b 100644 --- a/keyboards/ft/mars80/config.h +++ b/keyboards/ft/mars80/config.h | |||
@@ -37,6 +37,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
37 | #define DIODE_DIRECTION COL2ROW | 37 | #define DIODE_DIRECTION COL2ROW |
38 | #define DEBOUNCE 5 | 38 | #define DEBOUNCE 5 |
39 | 39 | ||
40 | #define LED_CAPS_LOCK_PIN D1 | ||
41 | #define LED_SCROLL_LOCK_PIN D6 | ||
42 | |||
40 | #define BACKLIGHT_PIN D4 | 43 | #define BACKLIGHT_PIN D4 |
41 | #define BACKLIGHT_LEVELS 3 | 44 | #define BACKLIGHT_LEVELS 3 |
42 | 45 | ||
diff --git a/keyboards/ft/mars80/mars80.c b/keyboards/ft/mars80/mars80.c index 2c628a6a2..5c95d04e3 100644 --- a/keyboards/ft/mars80/mars80.c +++ b/keyboards/ft/mars80/mars80.c | |||
@@ -15,21 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "mars80.h" | 17 | #include "mars80.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(D1); | ||
26 | setPinOutput(D6); | ||
27 | } | ||
28 | |||
29 | bool led_update_kb(led_t led_state) { | ||
30 | if (led_update_user(led_state)) { | ||
31 | writePin(D1, led_state.caps_lock); | ||
32 | writePin(D6, led_state.scroll_lock); | ||
33 | } | ||
34 | return true; | ||
35 | } | ||
diff --git a/keyboards/gray_studio/hb85/config.h b/keyboards/gray_studio/hb85/config.h index 9309012a4..0e1f0aff4 100644 --- a/keyboards/gray_studio/hb85/config.h +++ b/keyboards/gray_studio/hb85/config.h | |||
@@ -34,5 +34,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
34 | #define RGBLED_NUM 5 | 34 | #define RGBLED_NUM 5 |
35 | #define RGBLIGHT_ANIMATIONS | 35 | #define RGBLIGHT_ANIMATIONS |
36 | 36 | ||
37 | #define LED_NUM_LOCK_PIN D0 | ||
38 | #define LED_CAPS_LOCK_PIN D1 | ||
39 | #define LED_SCROLL_LOCK_PIN D6 | ||
40 | |||
37 | #define BACKLIGHT_PIN D4 | 41 | #define BACKLIGHT_PIN D4 |
38 | #define BACKLIGHT_LEVELS 3 | 42 | #define BACKLIGHT_LEVELS 3 |
diff --git a/keyboards/gray_studio/hb85/hb85.c b/keyboards/gray_studio/hb85/hb85.c index 4b3ff64f1..964234d6b 100644 --- a/keyboards/gray_studio/hb85/hb85.c +++ b/keyboards/gray_studio/hb85/hb85.c | |||
@@ -17,23 +17,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include "hb85.h" | 19 | #include "hb85.h" |
20 | |||
21 | void keyboard_pre_init_kb(void) { | ||
22 | led_init_ports(); | ||
23 | keyboard_pre_init_user(); | ||
24 | } | ||
25 | |||
26 | void led_init_ports(void) { | ||
27 | setPinOutput(D0); | ||
28 | setPinOutput(D1); | ||
29 | setPinOutput(D6); | ||
30 | } | ||
31 | |||
32 | bool led_update_kb(led_t led_state) { | ||
33 | if (led_update_user(led_state)) { | ||
34 | writePin(D0, led_state.num_lock); | ||
35 | writePin(D1, led_state.caps_lock); | ||
36 | writePin(D6, led_state.scroll_lock); | ||
37 | } | ||
38 | return true; | ||
39 | } | ||
diff --git a/keyboards/handwired/tritium_numpad/config.h b/keyboards/handwired/tritium_numpad/config.h index a53c27d43..1424c6b49 100644 --- a/keyboards/handwired/tritium_numpad/config.h +++ b/keyboards/handwired/tritium_numpad/config.h | |||
@@ -36,6 +36,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
36 | #define MATRIX_COL_PINS { F4, F6, B1, B2 } | 36 | #define MATRIX_COL_PINS { F4, F6, B1, B2 } |
37 | #define UNUSED_PINS | 37 | #define UNUSED_PINS |
38 | 38 | ||
39 | #define LED_NUM_LOCK_PIN D5 | ||
40 | #define LED_PIN_ON_STATE 0 | ||
41 | |||
39 | #define BACKLIGHT_PIN B6 | 42 | #define BACKLIGHT_PIN B6 |
40 | 43 | ||
41 | /* COL2ROW or ROW2COL */ | 44 | /* COL2ROW or ROW2COL */ |
diff --git a/keyboards/handwired/tritium_numpad/tritium_numpad.c b/keyboards/handwired/tritium_numpad/tritium_numpad.c index 7193a934d..c9f86eda7 100644 --- a/keyboards/handwired/tritium_numpad/tritium_numpad.c +++ b/keyboards/handwired/tritium_numpad/tritium_numpad.c | |||
@@ -1,29 +1 @@ | |||
1 | #include "tritium_numpad.h" | #include "tritium_numpad.h" | |
2 | #include "led.h" | ||
3 | |||
4 | void keyboard_pre_init_kb(void) { | ||
5 | // put your keyboard start-up code here | ||
6 | // runs once when the firmware starts up | ||
7 | keyboard_pre_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 | // Numlock LED | ||
20 | setPinOutput(D5); | ||
21 | } | ||
22 | |||
23 | void led_set_kb(uint8_t usb_led) { | ||
24 | if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { | ||
25 | writePinLow(D5); | ||
26 | } else { | ||
27 | writePinHigh(D5); | ||
28 | } | ||
29 | } | ||
diff --git a/keyboards/hid_liber/config.h b/keyboards/hid_liber/config.h index f35799b1a..e0f92dee8 100755 --- a/keyboards/hid_liber/config.h +++ b/keyboards/hid_liber/config.h | |||
@@ -34,6 +34,10 @@ | |||
34 | // HID Liberation Device uses custom matrix code to accomodate a 74HC238 3 to 8 decoder on pins B1, B2 and B3. | 34 | // HID Liberation Device uses custom matrix code to accomodate a 74HC238 3 to 8 decoder on pins B1, B2 and B3. |
35 | //#define DIODE_DIRECTION | 35 | //#define DIODE_DIRECTION |
36 | 36 | ||
37 | #define LED_CAPS_LOCK_PIN B5 | ||
38 | #define LED_SCROLL_LOCK_PIN B6 | ||
39 | #define LED_PIN_ON_STATE 0 | ||
40 | |||
37 | // #define BACKLIGHT_PIN B7 | 41 | // #define BACKLIGHT_PIN B7 |
38 | // #define BACKLIGHT_BREATHING | 42 | // #define BACKLIGHT_BREATHING |
39 | // #define BACKLIGHT_LEVELS 3 | 43 | // #define BACKLIGHT_LEVELS 3 |
diff --git a/keyboards/hid_liber/hid_liber.c b/keyboards/hid_liber/hid_liber.c index 2d2130743..2e4ddb329 100755 --- a/keyboards/hid_liber/hid_liber.c +++ b/keyboards/hid_liber/hid_liber.c | |||
@@ -16,24 +16,3 @@ | |||
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | */ | 17 | */ |
18 | #include "hid_liber.h" | 18 | #include "hid_liber.h" |
19 | |||
20 | void matrix_init_kb(void) { | ||
21 | // put your keyboard start-up code here | ||
22 | // runs once when the firmware starts up | ||
23 | led_init_ports(); | ||
24 | matrix_init_user(); | ||
25 | } | ||
26 | |||
27 | void led_init_ports(void) { | ||
28 | setPinOutput(B5); | ||
29 | setPinOutput(B6); | ||
30 | } | ||
31 | |||
32 | bool led_update_kb(led_t led_state) { | ||
33 | bool res = led_update_user(led_state); | ||
34 | if(res) { | ||
35 | writePin(B5, !led_state.caps_lock); | ||
36 | writePin(B6, !led_state.scroll_lock); | ||
37 | } | ||
38 | return res; | ||
39 | } | ||
diff --git a/keyboards/j80/config.h b/keyboards/j80/config.h index c4276431c..fb17a7fd1 100644 --- a/keyboards/j80/config.h +++ b/keyboards/j80/config.h | |||
@@ -35,6 +35,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
35 | #define DIODE_DIRECTION COL2ROW | 35 | #define DIODE_DIRECTION COL2ROW |
36 | #define DEBOUNCE 5 | 36 | #define DEBOUNCE 5 |
37 | 37 | ||
38 | #define LED_NUM_LOCK_PIN D0 | ||
39 | #define LED_CAPS_LOCK_PIN D1 | ||
40 | #define LED_SCROLL_LOCK_PIN D6 | ||
41 | |||
38 | #define BACKLIGHT_LEVELS 3 | 42 | #define BACKLIGHT_LEVELS 3 |
39 | #define BACKLIGHT_PIN D4 | 43 | #define BACKLIGHT_PIN D4 |
40 | 44 | ||
diff --git a/keyboards/j80/j80.c b/keyboards/j80/j80.c index bed30cdec..fd49e913e 100644 --- a/keyboards/j80/j80.c +++ b/keyboards/j80/j80.c | |||
@@ -15,23 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "j80.h" | 17 | #include "j80.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(D0); | ||
26 | setPinOutput(D1); | ||
27 | setPinOutput(D6); | ||
28 | } | ||
29 | |||
30 | bool led_update_kb(led_t led_state) { | ||
31 | if (led_update_user(led_state)) { | ||
32 | writePin(D0, led_state.num_lock); | ||
33 | writePin(D1, led_state.caps_lock); | ||
34 | writePin(D6, led_state.scroll_lock); | ||
35 | } | ||
36 | return true; | ||
37 | } | ||
diff --git a/keyboards/jc65/v32a/config.h b/keyboards/jc65/v32a/config.h index 6cf71ab3a..d6907c96c 100644 --- a/keyboards/jc65/v32a/config.h +++ b/keyboards/jc65/v32a/config.h | |||
@@ -32,6 +32,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
32 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } | 32 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } |
33 | #define DIODE_DIRECTION COL2ROW | 33 | #define DIODE_DIRECTION COL2ROW |
34 | 34 | ||
35 | #define LED_CAPS_LOCK_PIN D1 | ||
36 | |||
35 | #define BACKLIGHT_PIN D4 | 37 | #define BACKLIGHT_PIN D4 |
36 | #define BACKLIGHT_LEVELS 3 | 38 | #define BACKLIGHT_LEVELS 3 |
37 | 39 | ||
diff --git a/keyboards/jc65/v32a/v32a.c b/keyboards/jc65/v32a/v32a.c index f195e8f61..aa7233ba2 100644 --- a/keyboards/jc65/v32a/v32a.c +++ b/keyboards/jc65/v32a/v32a.c | |||
@@ -16,19 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include "v32a.h" | 18 | #include "v32a.h" |
19 | |||
20 | void keyboard_pre_init_kb(void) { | ||
21 | led_init_ports(); | ||
22 | keyboard_pre_init_user(); | ||
23 | } | ||
24 | |||
25 | void led_init_ports(void) { | ||
26 | setPinOutput(D1); | ||
27 | } | ||
28 | |||
29 | bool led_update_kb(led_t led_state) { | ||
30 | if (led_update_user(led_state)) { | ||
31 | writePin(D1, led_state.caps_lock); | ||
32 | } | ||
33 | return true; | ||
34 | } | ||
diff --git a/keyboards/kb_elmo/aek2_usb/aek2_usb.c b/keyboards/kb_elmo/aek2_usb/aek2_usb.c index b83faf5da..6ce5d21df 100644 --- a/keyboards/kb_elmo/aek2_usb/aek2_usb.c +++ b/keyboards/kb_elmo/aek2_usb/aek2_usb.c | |||
@@ -15,23 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "aek2_usb.h" | 17 | #include "aek2_usb.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(B0); | ||
26 | setPinOutput(B1); | ||
27 | setPinOutput(B2); | ||
28 | } | ||
29 | |||
30 | bool led_update_kb(led_t led_state) { | ||
31 | if (led_update_user(led_state)) { | ||
32 | writePin(B0, led_state.scroll_lock); | ||
33 | writePin(B1, led_state.caps_lock); | ||
34 | writePin(B2, led_state.num_lock); | ||
35 | } | ||
36 | return true; | ||
37 | } \ No newline at end of file | ||
diff --git a/keyboards/kb_elmo/aek2_usb/config.h b/keyboards/kb_elmo/aek2_usb/config.h index e0fc83f17..cf8c9d66f 100644 --- a/keyboards/kb_elmo/aek2_usb/config.h +++ b/keyboards/kb_elmo/aek2_usb/config.h | |||
@@ -40,6 +40,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
40 | /* COL2ROW, ROW2COL*/ | 40 | /* COL2ROW, ROW2COL*/ |
41 | #define DIODE_DIRECTION COL2ROW | 41 | #define DIODE_DIRECTION COL2ROW |
42 | 42 | ||
43 | #define LED_NUM_LOCK_PIN B2 | ||
44 | #define LED_CAPS_LOCK_PIN B1 | ||
45 | #define LED_SCROLL_LOCK_PIN B0 | ||
46 | |||
43 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | 47 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ |
44 | #define DEBOUNCE 5 | 48 | #define DEBOUNCE 5 |
45 | 49 | ||
diff --git a/keyboards/kbdfans/kbdpad/mk1/config.h b/keyboards/kbdfans/kbdpad/mk1/config.h index 1646a1af1..80a1abef5 100644 --- a/keyboards/kbdfans/kbdpad/mk1/config.h +++ b/keyboards/kbdfans/kbdpad/mk1/config.h | |||
@@ -33,6 +33,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
33 | 33 | ||
34 | #define DIODE_DIRECTION COL2ROW | 34 | #define DIODE_DIRECTION COL2ROW |
35 | 35 | ||
36 | #define LED_NUM_LOCK_PIN D0 | ||
37 | |||
36 | #define BACKLIGHT_PIN D4 | 38 | #define BACKLIGHT_PIN D4 |
37 | #define BACKLIGHT_BREATHING | 39 | #define BACKLIGHT_BREATHING |
38 | 40 | ||
diff --git a/keyboards/kbdfans/kbdpad/mk1/mk1.c b/keyboards/kbdfans/kbdpad/mk1/mk1.c index 540ba3589..5635b0a58 100644 --- a/keyboards/kbdfans/kbdpad/mk1/mk1.c +++ b/keyboards/kbdfans/kbdpad/mk1/mk1.c | |||
@@ -15,19 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "mk1.h" | 17 | #include "mk1.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(D0); | ||
26 | } | ||
27 | |||
28 | bool led_update_kb(led_t led_state) { | ||
29 | if (led_update_user(led_state)) { | ||
30 | writePin(D0, led_state.num_lock); | ||
31 | } | ||
32 | return true; | ||
33 | } | ||
diff --git a/keyboards/kinesis/kint2pp/config.h b/keyboards/kinesis/kint2pp/config.h index 2acaf9be6..902c9b24a 100644 --- a/keyboards/kinesis/kint2pp/config.h +++ b/keyboards/kinesis/kint2pp/config.h | |||
@@ -25,7 +25,12 @@ | |||
25 | 25 | ||
26 | /* COL2ROW or ROW2COL */ | 26 | /* COL2ROW or ROW2COL */ |
27 | #define DIODE_DIRECTION COL2ROW | 27 | #define DIODE_DIRECTION COL2ROW |
28 | 28 | ||
29 | #define LED_NUM_LOCK_PIN C5 | ||
30 | #define LED_CAPS_LOCK_PIN C1 | ||
31 | #define LED_SCROLL_LOCK_PIN C4 | ||
32 | #define LED_COMPOSE_PIN C3 | ||
33 | #define LED_PIN_ON_STATE 0 | ||
29 | 34 | ||
30 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | 35 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ |
31 | #define DEBOUNCE 5 | 36 | #define DEBOUNCE 5 |
diff --git a/keyboards/kinesis/kint2pp/kint2pp.c b/keyboards/kinesis/kint2pp/kint2pp.c index 7e2b4348c..856e29c31 100644 --- a/keyboards/kinesis/kint2pp/kint2pp.c +++ b/keyboards/kinesis/kint2pp/kint2pp.c | |||
@@ -1,26 +1 @@ | |||
1 | #include "kint2pp.h" | #include "kint2pp.h" | |
2 | |||
3 | void matrix_init_kb(void) { | ||
4 | led_init_ports(); | ||
5 | |||
6 | |||
7 | matrix_init_user(); | ||
8 | } | ||
9 | void led_init_ports() { | ||
10 | // * Set our LED pins as output | ||
11 | setPinOutput(C3); // Keypad LED | ||
12 | setPinOutput(C4); // ScrLock LED | ||
13 | setPinOutput(C5); // NumLock LED | ||
14 | setPinOutput(C1); // CapsLock LED | ||
15 | } | ||
16 | |||
17 | bool led_update_kb(led_t led_state) { | ||
18 | bool res = led_update_user(led_state); | ||
19 | if(res) { | ||
20 | writePin(C3, !led_state.compose); | ||
21 | writePin(C4, !led_state.scroll_lock); | ||
22 | writePin(C5, !led_state.num_lock); | ||
23 | writePin(C1, !led_state.caps_lock); | ||
24 | } | ||
25 | return res; | ||
26 | } | ||
diff --git a/keyboards/kinesis/nguyenvietyen/config.h b/keyboards/kinesis/nguyenvietyen/config.h index f221acd7e..52f4c8054 100644 --- a/keyboards/kinesis/nguyenvietyen/config.h +++ b/keyboards/kinesis/nguyenvietyen/config.h | |||
@@ -25,3 +25,9 @@ | |||
25 | 25 | ||
26 | /* COL2ROW or ROW2COL */ | 26 | /* COL2ROW or ROW2COL */ |
27 | #define DIODE_DIRECTION COL2ROW | 27 | #define DIODE_DIRECTION COL2ROW |
28 | |||
29 | #define LED_NUM_LOCK_PIN D4 | ||
30 | #define LED_CAPS_LOCK_PIN E6 | ||
31 | #define LED_SCROLL_LOCK_PIN C6 | ||
32 | #define LED_COMPOSE_PIN D7 | ||
33 | #define LED_PIN_ON_STATE 0 | ||
diff --git a/keyboards/kinesis/nguyenvietyen/nguyenvietyen.c b/keyboards/kinesis/nguyenvietyen/nguyenvietyen.c index 1919412e9..3f0147938 100644 --- a/keyboards/kinesis/nguyenvietyen/nguyenvietyen.c +++ b/keyboards/kinesis/nguyenvietyen/nguyenvietyen.c | |||
@@ -1,31 +1 @@ | |||
1 | #include "nguyenvietyen.h" | #include "nguyenvietyen.h" | |
2 | |||
3 | void matrix_init_kb(void) { | ||
4 | led_init_ports(); | ||
5 | matrix_init_user(); | ||
6 | } | ||
7 | |||
8 | void led_init_ports() { | ||
9 | // * Set our LED pins as output | ||
10 | setPinOutput(D7); // Keypad LED | ||
11 | setPinOutput(C6); // ScrLock LED | ||
12 | setPinOutput(D4); // NumLock LED | ||
13 | setPinOutput(E6); // CapsLock LED | ||
14 | |||
15 | // turn all LEDs off by default | ||
16 | writePinHigh(D7); | ||
17 | writePinHigh(C6); | ||
18 | writePinHigh(D4); | ||
19 | writePinHigh(E6); | ||
20 | } | ||
21 | |||
22 | bool led_update_kb(led_t led_state) { | ||
23 | bool res = led_update_user(led_state); | ||
24 | if (res) { | ||
25 | writePin(D7, !led_state.compose); | ||
26 | writePin(C6, !led_state.scroll_lock); | ||
27 | writePin(D4, !led_state.num_lock); | ||
28 | writePin(E6, !led_state.caps_lock); | ||
29 | } | ||
30 | return res; | ||
31 | } | ||
diff --git a/keyboards/kira80/config.h b/keyboards/kira80/config.h index 725b68d6e..d61d23ab6 100644 --- a/keyboards/kira80/config.h +++ b/keyboards/kira80/config.h | |||
@@ -38,6 +38,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
38 | #define DIODE_DIRECTION COL2ROW | 38 | #define DIODE_DIRECTION COL2ROW |
39 | #define DEBOUNCE 5 | 39 | #define DEBOUNCE 5 |
40 | 40 | ||
41 | #define LED_CAPS_LOCK_PIN D1 | ||
42 | #define LED_SCROLL_LOCK_PIN D6 | ||
43 | |||
41 | #define BACKLIGHT_PIN D4 | 44 | #define BACKLIGHT_PIN D4 |
42 | #define BACKLIGHT_BREATHING | 45 | #define BACKLIGHT_BREATHING |
43 | #define BACKLIGHT_LEVELS 3 | 46 | #define BACKLIGHT_LEVELS 3 |
diff --git a/keyboards/kira80/kira80.c b/keyboards/kira80/kira80.c index a76f4001e..b3ebcae29 100644 --- a/keyboards/kira80/kira80.c +++ b/keyboards/kira80/kira80.c | |||
@@ -15,21 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "kira80.h" | 17 | #include "kira80.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(D1); | ||
26 | setPinOutput(D6); | ||
27 | } | ||
28 | |||
29 | bool led_update_kb(led_t led_state) { | ||
30 | if (led_update_user(led_state)) { | ||
31 | writePin(D1, led_state.caps_lock); | ||
32 | writePin(D6, led_state.scroll_lock); | ||
33 | } | ||
34 | return true; | ||
35 | } \ No newline at end of file | ||
diff --git a/keyboards/kona_classic/kona_classic.c b/keyboards/kona_classic/kona_classic.c index 71cee7baa..af4ea06e6 100644 --- a/keyboards/kona_classic/kona_classic.c +++ b/keyboards/kona_classic/kona_classic.c | |||
@@ -14,32 +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 "kona_classic.h" | 16 | #include "kona_classic.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 | 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) { | ||
40 | // DDRB |= (1<<6) | (1<<7); // OUT | ||
41 | } | ||
42 | |||
43 | void led_set_kb(uint8_t usb_led) { | ||
44 | // led_set_user(usb_led); | ||
45 | } | ||
diff --git a/keyboards/mechlovin/adelais/adelais.c b/keyboards/mechlovin/adelais/adelais.c index da5f68f62..b9df471d3 100644 --- a/keyboards/mechlovin/adelais/adelais.c +++ b/keyboards/mechlovin/adelais/adelais.c | |||
@@ -15,30 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "adelais.h" | 17 | #include "adelais.h" |
18 | |||
19 | void matrix_init_kb(void) { | ||
20 | // put your keyboard start-up code here | ||
21 | // runs once when the firmware starts up | ||
22 | |||
23 | matrix_init_user(); | ||
24 | led_init_ports(); | ||
25 | } | ||
26 | |||
27 | void led_init_ports(void) { | ||
28 | setPinOutput(B2); | ||
29 | writePinLow(B2); | ||
30 | setPinOutput(C15); | ||
31 | writePinLow(C15); | ||
32 | setPinOutput(B9); | ||
33 | writePinLow(B9); | ||
34 | } | ||
35 | |||
36 | bool led_update_kb(led_t led_state) { | ||
37 | if(led_update_user(led_state)) { | ||
38 | writePin(B2, led_state.caps_lock); | ||
39 | writePin(B9, led_state.scroll_lock); | ||
40 | writePin(C15, led_state.num_lock); | ||
41 | } | ||
42 | |||
43 | return true; | ||
44 | } | ||
diff --git a/keyboards/mechlovin/adelais/config.h b/keyboards/mechlovin/adelais/config.h index 875eba514..3ec5c4913 100644 --- a/keyboards/mechlovin/adelais/config.h +++ b/keyboards/mechlovin/adelais/config.h | |||
@@ -30,3 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
30 | 30 | ||
31 | /* COL2ROW, ROW2COL*/ | 31 | /* COL2ROW, ROW2COL*/ |
32 | #define DIODE_DIRECTION COL2ROW | 32 | #define DIODE_DIRECTION COL2ROW |
33 | |||
34 | #define LED_NUM_LOCK_PIN C15 | ||
35 | #define LED_CAPS_LOCK_PIN B2 | ||
36 | #define LED_SCROLL_LOCK_PIN B9 | ||
diff --git a/keyboards/mechlovin/delphine/config.h b/keyboards/mechlovin/delphine/config.h index b3a084f67..a642f37f9 100644 --- a/keyboards/mechlovin/delphine/config.h +++ b/keyboards/mechlovin/delphine/config.h | |||
@@ -41,4 +41,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
41 | #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, D3 } | 41 | #define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, D3 } |
42 | #define MATRIX_COL_PINS { F7, D7, D6, D2 } | 42 | #define MATRIX_COL_PINS { F7, D7, D6, D2 } |
43 | 43 | ||
44 | #define DIODE_DIRECTION COL2ROW \ No newline at end of file | 44 | #define DIODE_DIRECTION COL2ROW |
45 | |||
46 | #define LED_NUM_LOCK_PIN B5 | ||
diff --git a/keyboards/mechlovin/delphine/delphine.c b/keyboards/mechlovin/delphine/delphine.c index 52292b3c9..8e33b6603 100644 --- a/keyboards/mechlovin/delphine/delphine.c +++ b/keyboards/mechlovin/delphine/delphine.c | |||
@@ -15,21 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "delphine.h" | 17 | #include "delphine.h" |
18 | |||
19 | void matrix_init_kb(void) { | ||
20 | matrix_init_user(); | ||
21 | led_init_ports(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(B5); | ||
26 | writePinLow(B5); | ||
27 | } | ||
28 | |||
29 | bool led_update_kb(led_t led_state) { | ||
30 | if(led_update_user(led_state)) { | ||
31 | writePin(B5, led_state.num_lock); | ||
32 | } | ||
33 | |||
34 | return true; | ||
35 | } | ||
diff --git a/keyboards/mechlovin/hannah65/config.h b/keyboards/mechlovin/hannah65/config.h index 6801c30a3..8c94fe4b3 100644 --- a/keyboards/mechlovin/hannah65/config.h +++ b/keyboards/mechlovin/hannah65/config.h | |||
@@ -41,6 +41,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
41 | 41 | ||
42 | #define DIODE_DIRECTION COL2ROW | 42 | #define DIODE_DIRECTION COL2ROW |
43 | 43 | ||
44 | #define LED_CAPS_LOCK_PIN B9 | ||
45 | |||
44 | #define BACKLIGHT_PIN B8 | 46 | #define BACKLIGHT_PIN B8 |
45 | #define BACKLIGHT_BREATHING | 47 | #define BACKLIGHT_BREATHING |
46 | #define BACKLIGHT_PWM_DRIVER PWMD3 | 48 | #define BACKLIGHT_PWM_DRIVER PWMD3 |
diff --git a/keyboards/mechlovin/hannah65/hannah65.c b/keyboards/mechlovin/hannah65/hannah65.c index 4f937d8a2..92e0917eb 100644 --- a/keyboards/mechlovin/hannah65/hannah65.c +++ b/keyboards/mechlovin/hannah65/hannah65.c | |||
@@ -15,21 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "hannah65.h" | 17 | #include "hannah65.h" |
18 | |||
19 | void matrix_init_kb(void) { | ||
20 | matrix_init_user(); | ||
21 | led_init_ports(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(B9); | ||
26 | writePinLow(B9); | ||
27 | } | ||
28 | |||
29 | bool led_update_kb(led_t led_state) { | ||
30 | if(led_update_user(led_state)) { | ||
31 | writePin(B9, led_state.caps_lock); | ||
32 | } | ||
33 | |||
34 | return true; | ||
35 | } | ||
diff --git a/keyboards/mechlovin/infinity87/config.h b/keyboards/mechlovin/infinity87/config.h index 703a06f8d..ccb9f6756 100644 --- a/keyboards/mechlovin/infinity87/config.h +++ b/keyboards/mechlovin/infinity87/config.h | |||
@@ -45,6 +45,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
45 | 45 | ||
46 | #define DIODE_DIRECTION COL2ROW | 46 | #define DIODE_DIRECTION COL2ROW |
47 | 47 | ||
48 | #define LED_NUM_LOCK_PIN A3 | ||
49 | #define LED_CAPS_LOCK_PIN A4 | ||
48 | 50 | ||
49 | #define BACKLIGHT_PIN B0 | 51 | #define BACKLIGHT_PIN B0 |
50 | #define BACKLIGHT_BREATHING | 52 | #define BACKLIGHT_BREATHING |
diff --git a/keyboards/mechlovin/infinity87/infinity87.c b/keyboards/mechlovin/infinity87/infinity87.c index 2de528bc3..434e79609 100644 --- a/keyboards/mechlovin/infinity87/infinity87.c +++ b/keyboards/mechlovin/infinity87/infinity87.c | |||
@@ -15,24 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "infinity87.h" | 17 | #include "infinity87.h" |
18 | |||
19 | void matrix_init_kb(void) { | ||
20 | matrix_init_user(); | ||
21 | led_init_ports(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(A3); | ||
26 | writePinLow(A3); | ||
27 | setPinOutput(A4); | ||
28 | writePinLow(A4); | ||
29 | } | ||
30 | |||
31 | bool led_update_kb(led_t led_state) { | ||
32 | if(led_update_user(led_state)) { | ||
33 | writePin(A4, led_state.caps_lock); | ||
34 | writePin(A3, led_state.num_lock); | ||
35 | } | ||
36 | |||
37 | return true; | ||
38 | } | ||
diff --git a/keyboards/mechlovin/infinity88/config.h b/keyboards/mechlovin/infinity88/config.h index df1ea4957..a387b7638 100644 --- a/keyboards/mechlovin/infinity88/config.h +++ b/keyboards/mechlovin/infinity88/config.h | |||
@@ -45,6 +45,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
45 | 45 | ||
46 | #define DIODE_DIRECTION COL2ROW | 46 | #define DIODE_DIRECTION COL2ROW |
47 | 47 | ||
48 | #define LED_NUM_LOCK_PIN A3 | ||
49 | #define LED_CAPS_LOCK_PIN A4 | ||
48 | 50 | ||
49 | #define BACKLIGHT_PIN B0 | 51 | #define BACKLIGHT_PIN B0 |
50 | #define BACKLIGHT_BREATHING | 52 | #define BACKLIGHT_BREATHING |
diff --git a/keyboards/mechlovin/infinity88/infinity88.c b/keyboards/mechlovin/infinity88/infinity88.c index d342ce9ee..4d352358a 100644 --- a/keyboards/mechlovin/infinity88/infinity88.c +++ b/keyboards/mechlovin/infinity88/infinity88.c | |||
@@ -15,25 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "infinity88.h" | 17 | #include "infinity88.h" |
18 | |||
19 | void matrix_init_kb(void) { | ||
20 | matrix_init_user(); | ||
21 | led_init_ports(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(A3); | ||
26 | writePinLow(A3); | ||
27 | setPinOutput(A4); | ||
28 | writePinLow(A4); | ||
29 | } | ||
30 | |||
31 | bool led_update_kb(led_t led_state) { | ||
32 | if(led_update_user(led_state)) { | ||
33 | writePin(A4, led_state.caps_lock); | ||
34 | writePin(A3, led_state.num_lock); | ||
35 | } | ||
36 | |||
37 | return true; | ||
38 | } | ||
39 | |||
diff --git a/keyboards/mechlovin/pisces/config.h b/keyboards/mechlovin/pisces/config.h index 14f6404a7..1debf021c 100644 --- a/keyboards/mechlovin/pisces/config.h +++ b/keyboards/mechlovin/pisces/config.h | |||
@@ -45,6 +45,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
45 | 45 | ||
46 | #define DIODE_DIRECTION COL2ROW | 46 | #define DIODE_DIRECTION COL2ROW |
47 | 47 | ||
48 | #define LED_CAPS_LOCK_PIN B2 | ||
49 | |||
48 | #define BACKLIGHT_PIN B7 | 50 | #define BACKLIGHT_PIN B7 |
49 | // #define BACKLIGHT_BREATHING | 51 | // #define BACKLIGHT_BREATHING |
50 | #define BACKLIGHT_LEVELS 3 | 52 | #define BACKLIGHT_LEVELS 3 |
diff --git a/keyboards/mechlovin/pisces/pisces.c b/keyboards/mechlovin/pisces/pisces.c index 2a0a97f6d..b43bf2aaa 100644 --- a/keyboards/mechlovin/pisces/pisces.c +++ b/keyboards/mechlovin/pisces/pisces.c | |||
@@ -15,28 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "pisces.h" | 17 | #include "pisces.h" |
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 | void matrix_init_kb(void) { | ||
24 | // put your keyboard start-up code here | ||
25 | // runs once when the firmware starts up | ||
26 | |||
27 | matrix_init_user(); | ||
28 | led_init_ports(); | ||
29 | } | ||
30 | |||
31 | void led_init_ports(void) { | ||
32 | setPinOutput(B2); | ||
33 | writePinLow(B2); | ||
34 | } | ||
35 | |||
36 | bool led_update_kb(led_t led_state) { | ||
37 | if(led_update_user(led_state)) { | ||
38 | writePin(B2, led_state.caps_lock); | ||
39 | } | ||
40 | |||
41 | return true; | ||
42 | } | ||
diff --git a/keyboards/mehkee96/config.h b/keyboards/mehkee96/config.h index dc8c593ad..44ded13a5 100644 --- a/keyboards/mehkee96/config.h +++ b/keyboards/mehkee96/config.h | |||
@@ -16,6 +16,10 @@ | |||
16 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } | 16 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } |
17 | #define DIODE_DIRECTION COL2ROW | 17 | #define DIODE_DIRECTION COL2ROW |
18 | 18 | ||
19 | #define LED_NUM_LOCK_PIN D0 | ||
20 | #define LED_CAPS_LOCK_PIN D1 | ||
21 | #define LED_PIN_ON_STATE 0 | ||
22 | |||
19 | #define BACKLIGHT_PIN D4 | 23 | #define BACKLIGHT_PIN D4 |
20 | #define BACKLIGHT_LEVELS 3 | 24 | #define BACKLIGHT_LEVELS 3 |
21 | 25 | ||
diff --git a/keyboards/mehkee96/mehkee96.c b/keyboards/mehkee96/mehkee96.c index ae83a1bb5..d9e2bac7a 100644 --- a/keyboards/mehkee96/mehkee96.c +++ b/keyboards/mehkee96/mehkee96.c | |||
@@ -16,21 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include "mehkee96.h" | 18 | #include "mehkee96.h" |
19 | |||
20 | void keyboard_pre_init_kb(void) { | ||
21 | led_init_ports(); | ||
22 | keyboard_pre_init_user(); | ||
23 | } | ||
24 | |||
25 | void led_init_ports(void) { | ||
26 | setPinOutput(D0); | ||
27 | setPinOutput(D1); | ||
28 | } | ||
29 | |||
30 | bool led_update_kb(led_t led_state) { | ||
31 | if (led_update_user(led_state)) { | ||
32 | writePin(D0, led_state.num_lock); | ||
33 | writePin(D1, led_state.caps_lock); | ||
34 | } | ||
35 | return true; | ||
36 | } | ||
diff --git a/keyboards/nightly_boards/alter/rev1/config.h b/keyboards/nightly_boards/alter/rev1/config.h index 30fe4b521..4f9bade71 100644 --- a/keyboards/nightly_boards/alter/rev1/config.h +++ b/keyboards/nightly_boards/alter/rev1/config.h | |||
@@ -44,6 +44,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
44 | /* COL2ROW, ROW2COL*/ | 44 | /* COL2ROW, ROW2COL*/ |
45 | #define DIODE_DIRECTION COL2ROW | 45 | #define DIODE_DIRECTION COL2ROW |
46 | 46 | ||
47 | #define LED_NUM_LOCK_PIN D7 | ||
48 | #define LED_CAPS_LOCK_PIN D6 | ||
49 | #define LED_SCROLL_LOCK_PIN B4 | ||
50 | |||
47 | // #define BACKLIGHT_PIN F1 | 51 | // #define BACKLIGHT_PIN F1 |
48 | // #define BACKLIGHT_BREATHING | 52 | // #define BACKLIGHT_BREATHING |
49 | // #define BACKLIGHT_LEVELS 3 | 53 | // #define BACKLIGHT_LEVELS 3 |
diff --git a/keyboards/nightly_boards/alter/rev1/rev1.c b/keyboards/nightly_boards/alter/rev1/rev1.c index df3dd6aed..b250d32d1 100644 --- a/keyboards/nightly_boards/alter/rev1/rev1.c +++ b/keyboards/nightly_boards/alter/rev1/rev1.c | |||
@@ -15,23 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "rev1.h" | 17 | #include "rev1.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(D7); | ||
26 | setPinOutput(D6); | ||
27 | setPinOutput(B4); | ||
28 | } | ||
29 | |||
30 | bool led_update_kb(led_t led_state) { | ||
31 | if (led_update_user(led_state)) { | ||
32 | writePin(D7, led_state.num_lock); | ||
33 | writePin(D6, led_state.caps_lock); | ||
34 | writePin(B4, led_state.scroll_lock); | ||
35 | } | ||
36 | return true; | ||
37 | } | ||
diff --git a/keyboards/panc60/config.h b/keyboards/panc60/config.h index 002ff7cf9..495f5a2d4 100644 --- a/keyboards/panc60/config.h +++ b/keyboards/panc60/config.h | |||
@@ -37,6 +37,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
37 | #define DIODE_DIRECTION COL2ROW | 37 | #define DIODE_DIRECTION COL2ROW |
38 | #define DEBOUNCE 5 | 38 | #define DEBOUNCE 5 |
39 | 39 | ||
40 | #define LED_CAPS_LOCK_PIN D1 | ||
41 | |||
40 | #define BACKLIGHT_PIN D4 | 42 | #define BACKLIGHT_PIN D4 |
41 | #define BACKLIGHT_LEVELS 3 | 43 | #define BACKLIGHT_LEVELS 3 |
42 | 44 | ||
diff --git a/keyboards/panc60/panc60.c b/keyboards/panc60/panc60.c index d7ff52963..16f298eb8 100644 --- a/keyboards/panc60/panc60.c +++ b/keyboards/panc60/panc60.c | |||
@@ -15,19 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "panc60.h" | 17 | #include "panc60.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(D1); | ||
26 | } | ||
27 | |||
28 | bool led_update_kb(led_t led_state) { | ||
29 | if (led_update_user(led_state)) { | ||
30 | writePin(D1, led_state.caps_lock); | ||
31 | } | ||
32 | return true; | ||
33 | } | ||
diff --git a/keyboards/pandora/config.h b/keyboards/pandora/config.h index 873f6dd15..3a44129c4 100644 --- a/keyboards/pandora/config.h +++ b/keyboards/pandora/config.h | |||
@@ -47,6 +47,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
47 | /* COL2ROW, ROW2COL*/ | 47 | /* COL2ROW, ROW2COL*/ |
48 | #define DIODE_DIRECTION COL2ROW | 48 | #define DIODE_DIRECTION COL2ROW |
49 | 49 | ||
50 | #define LED_CAPS_LOCK_PIN E6 | ||
51 | #define LED_PIN_ON_STATE 0 | ||
52 | |||
50 | /* Encoder Function */ | 53 | /* Encoder Function */ |
51 | #define ENCODERS_PAD_A { F6 } | 54 | #define ENCODERS_PAD_A { F6 } |
52 | #define ENCODERS_PAD_B { F5 } | 55 | #define ENCODERS_PAD_B { F5 } |
diff --git a/keyboards/pandora/pandora.c b/keyboards/pandora/pandora.c index 6c5d8a166..3d166646b 100644 --- a/keyboards/pandora/pandora.c +++ b/keyboards/pandora/pandora.c | |||
@@ -15,21 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "pandora.h" | 17 | #include "pandora.h" |
18 | |||
19 | void matrix_init_kb(void) { | ||
20 | matrix_init_user(); | ||
21 | led_init_ports(); | ||
22 | }; | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(E6); | ||
26 | writePinHigh(E6); | ||
27 | } | ||
28 | |||
29 | bool led_update_kb(led_t led_state) { | ||
30 | bool res = led_update_user(led_state); | ||
31 | if(res) { | ||
32 | writePin(E6, !led_state.caps_lock); | ||
33 | } | ||
34 | return res; | ||
35 | } | ||
diff --git a/keyboards/pearl/config.h b/keyboards/pearl/config.h index a42b0a5fa..09e0c8e1e 100644 --- a/keyboards/pearl/config.h +++ b/keyboards/pearl/config.h | |||
@@ -25,6 +25,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
25 | #define MANUFACTURER Pearl Boards | 25 | #define MANUFACTURER Pearl Boards |
26 | #define PRODUCT Pearl | 26 | #define PRODUCT Pearl |
27 | 27 | ||
28 | #define LED_NUM_LOCK_PIN D0 | ||
29 | #define LED_CAPS_LOCK_PIN D1 | ||
30 | #define LED_SCROLL_LOCK_PIN D6 | ||
31 | |||
28 | #define RGBLIGHT_ANIMATIONS | 32 | #define RGBLIGHT_ANIMATIONS |
29 | #define RGBLED_NUM 12 | 33 | #define RGBLED_NUM 12 |
30 | 34 | ||
diff --git a/keyboards/pearl/pearl.c b/keyboards/pearl/pearl.c index b08ee6f88..18ed9835d 100644 --- a/keyboards/pearl/pearl.c +++ b/keyboards/pearl/pearl.c | |||
@@ -16,23 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include "pearl.h" | 18 | #include "pearl.h" |
19 | |||
20 | void keyboard_pre_init_kb(void) { | ||
21 | led_init_ports(); | ||
22 | keyboard_pre_init_user(); | ||
23 | } | ||
24 | |||
25 | void led_init_ports(void) { | ||
26 | setPinOutput(D0); | ||
27 | setPinOutput(D1); | ||
28 | setPinOutput(D6); | ||
29 | } | ||
30 | |||
31 | bool led_update_kb(led_t led_state) { | ||
32 | if (led_update_user(led_state)) { | ||
33 | writePin(D0, led_state.num_lock); | ||
34 | writePin(D1, led_state.caps_lock); | ||
35 | writePin(D6, led_state.scroll_lock); | ||
36 | } | ||
37 | return true; | ||
38 | } | ||
diff --git a/keyboards/percent/canoe/canoe.c b/keyboards/percent/canoe/canoe.c index dd31640e6..572ff50b0 100644 --- a/keyboards/percent/canoe/canoe.c +++ b/keyboards/percent/canoe/canoe.c | |||
@@ -16,19 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include "canoe.h" | 18 | #include "canoe.h" |
19 | |||
20 | void keyboard_pre_init_kb(void) { | ||
21 | led_init_ports(); | ||
22 | keyboard_pre_init_user(); | ||
23 | } | ||
24 | |||
25 | void led_init_ports(void) { | ||
26 | setPinOutput(D1); | ||
27 | } | ||
28 | |||
29 | bool led_update_kb(led_t led_state) { | ||
30 | if (led_update_user(led_state)) { | ||
31 | writePin(D1, led_state.caps_lock); | ||
32 | } | ||
33 | return true; | ||
34 | } | ||
diff --git a/keyboards/percent/canoe/config.h b/keyboards/percent/canoe/config.h index b8a306b7e..c349c1106 100644 --- a/keyboards/percent/canoe/config.h +++ b/keyboards/percent/canoe/config.h | |||
@@ -38,6 +38,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
38 | #define DIODE_DIRECTION COL2ROW | 38 | #define DIODE_DIRECTION COL2ROW |
39 | #define DEBOUNCE 5 | 39 | #define DEBOUNCE 5 |
40 | 40 | ||
41 | #define LED_CAPS_LOCK_PIN D1 | ||
42 | |||
41 | #define BACKLIGHT_PIN D4 | 43 | #define BACKLIGHT_PIN D4 |
42 | #define BACKLIGHT_LEVELS 3 | 44 | #define BACKLIGHT_LEVELS 3 |
43 | 45 | ||
diff --git a/keyboards/percent/skog/config.h b/keyboards/percent/skog/config.h index 047bac02e..524fdc5cc 100644 --- a/keyboards/percent/skog/config.h +++ b/keyboards/percent/skog/config.h | |||
@@ -32,6 +32,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
32 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2 } | 32 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2 } |
33 | #define DIODE_DIRECTION COL2ROW | 33 | #define DIODE_DIRECTION COL2ROW |
34 | 34 | ||
35 | #define LED_CAPS_LOCK_PIN D1 | ||
36 | #define LED_SCROLL_LOCK_PIN D6 | ||
37 | |||
35 | #define RGBLED_NUM 2 | 38 | #define RGBLED_NUM 2 |
36 | #define RGBLIGHT_ANIMATIONS | 39 | #define RGBLIGHT_ANIMATIONS |
37 | 40 | ||
diff --git a/keyboards/percent/skog/skog.c b/keyboards/percent/skog/skog.c index 152fc5684..c44f0373f 100644 --- a/keyboards/percent/skog/skog.c +++ b/keyboards/percent/skog/skog.c | |||
@@ -18,21 +18,3 @@ ps2avrGB support code by Kenneth A. (bminiex/.[ch]) | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include "skog.h" | 20 | #include "skog.h" |
21 | |||
22 | void keyboard_pre_init_kb(void) { | ||
23 | led_init_ports(); | ||
24 | keyboard_pre_init_user(); | ||
25 | } | ||
26 | |||
27 | void led_init_ports(void) { | ||
28 | setPinOutput(D1); | ||
29 | setPinOutput(D6); | ||
30 | } | ||
31 | |||
32 | bool led_update_kb(led_t led_state) { | ||
33 | if (led_update_user(led_state)) { | ||
34 | writePin(D1, led_state.caps_lock); | ||
35 | writePin(D6, led_state.scroll_lock); | ||
36 | } | ||
37 | return true; | ||
38 | } | ||
diff --git a/keyboards/percent/skog_lite/config.h b/keyboards/percent/skog_lite/config.h index e28dcfcd2..15de9bbb8 100644 --- a/keyboards/percent/skog_lite/config.h +++ b/keyboards/percent/skog_lite/config.h | |||
@@ -38,6 +38,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
38 | #define DIODE_DIRECTION COL2ROW | 38 | #define DIODE_DIRECTION COL2ROW |
39 | #define DEBOUNCE 5 | 39 | #define DEBOUNCE 5 |
40 | 40 | ||
41 | #define LED_CAPS_LOCK_PIN D1 | ||
42 | #define LED_SCROLL_LOCK_PIN D6 | ||
43 | |||
41 | #define BACKLIGHT_PIN D4 | 44 | #define BACKLIGHT_PIN D4 |
42 | #define BACKLIGHT_LEVELS 3 | 45 | #define BACKLIGHT_LEVELS 3 |
43 | 46 | ||
diff --git a/keyboards/percent/skog_lite/skog_lite.c b/keyboards/percent/skog_lite/skog_lite.c index 95d398211..c69843e61 100644 --- a/keyboards/percent/skog_lite/skog_lite.c +++ b/keyboards/percent/skog_lite/skog_lite.c | |||
@@ -15,21 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "skog_lite.h" | 17 | #include "skog_lite.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(D1); | ||
26 | setPinOutput(D6); | ||
27 | } | ||
28 | |||
29 | bool led_update_kb(led_t led_state) { | ||
30 | if (led_update_user(led_state)) { | ||
31 | writePin(D1, led_state.caps_lock); | ||
32 | writePin(D6, led_state.scroll_lock); | ||
33 | } | ||
34 | return true; | ||
35 | } | ||
diff --git a/keyboards/phantom/config.h b/keyboards/phantom/config.h index a5d135a4b..a948987d1 100644 --- a/keyboards/phantom/config.h +++ b/keyboards/phantom/config.h | |||
@@ -47,6 +47,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
47 | /* COL2ROW, ROW2COL */ | 47 | /* COL2ROW, ROW2COL */ |
48 | #define DIODE_DIRECTION ROW2COL | 48 | #define DIODE_DIRECTION ROW2COL |
49 | 49 | ||
50 | #define LED_CAPS_LOCK_PIN B6 | ||
51 | #define LED_SCROLL_LOCK_PIN B7 | ||
52 | |||
50 | // #define BACKLIGHT_PIN B7 | 53 | // #define BACKLIGHT_PIN B7 |
51 | // #define BACKLIGHT_LEVELS 3 | 54 | // #define BACKLIGHT_LEVELS 3 |
52 | // #define BACKLIGHT_BREATHING | 55 | // #define BACKLIGHT_BREATHING |
diff --git a/keyboards/phantom/phantom.c b/keyboards/phantom/phantom.c index 1017de009..5c478f82a 100644 --- a/keyboards/phantom/phantom.c +++ b/keyboards/phantom/phantom.c | |||
@@ -15,23 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "phantom.h" | 17 | #include "phantom.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | |||
22 | keyboard_pre_init_user(); | ||
23 | } | ||
24 | |||
25 | void led_init_ports(void) { | ||
26 | setPinOutput(B6); | ||
27 | setPinOutput(B7); | ||
28 | } | ||
29 | |||
30 | bool led_update_kb(led_t led_state) { | ||
31 | if (led_update_user(led_state)) { | ||
32 | writePin(B6, led_state.caps_lock); | ||
33 | writePin(B7, led_state.scroll_lock); | ||
34 | } | ||
35 | |||
36 | return true; | ||
37 | } | ||
diff --git a/keyboards/rart/rartlice/config.h b/keyboards/rart/rartlice/config.h index 26f9324bd..fc6fbaa11 100644 --- a/keyboards/rart/rartlice/config.h +++ b/keyboards/rart/rartlice/config.h | |||
@@ -43,6 +43,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
43 | /* Locking resynchronize hack */ | 43 | /* Locking resynchronize hack */ |
44 | #define LOCKING_RESYNC_ENABLE | 44 | #define LOCKING_RESYNC_ENABLE |
45 | 45 | ||
46 | #define LED_NUM_LOCK_PIN A8 | ||
47 | #define LED_CAPS_LOCK_PIN B14 | ||
48 | #define LED_SCROLL_LOCK_PIN A9 | ||
49 | #define LED_PIN_ON_STATE 0 | ||
50 | |||
46 | #define RGBLIGHT_ANIMATIONS | 51 | #define RGBLIGHT_ANIMATIONS |
47 | #define RGB_DI_PIN B15 | 52 | #define RGB_DI_PIN B15 |
48 | #define RGBLED_NUM 11 | 53 | #define RGBLED_NUM 11 |
diff --git a/keyboards/rart/rartlice/rartlice.c b/keyboards/rart/rartlice/rartlice.c index be805da33..a970e9686 100644 --- a/keyboards/rart/rartlice/rartlice.c +++ b/keyboards/rart/rartlice/rartlice.c | |||
@@ -14,23 +14,3 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include "rartlice.h" | 16 | #include "rartlice.h" |
17 | |||
18 | void keyboard_pre_init_kb(void) { | ||
19 | led_init_ports(); | ||
20 | keyboard_pre_init_user(); | ||
21 | } | ||
22 | |||
23 | void led_init_ports(void) { | ||
24 | setPinOutput(A8); | ||
25 | setPinOutput(B14); | ||
26 | setPinOutput(A9); | ||
27 | } | ||
28 | |||
29 | bool led_update_kb(led_t led_state) { | ||
30 | if (led_update_user(led_state)) { | ||
31 | writePin(A8, !led_state.num_lock); | ||
32 | writePin(B14, !led_state.caps_lock); | ||
33 | writePin(A9, !led_state.scroll_lock); | ||
34 | } | ||
35 | return true; | ||
36 | } | ||
diff --git a/keyboards/redscarf_iiplus/verd/config.h b/keyboards/redscarf_iiplus/verd/config.h index 06d606f55..abc3ae378 100644 --- a/keyboards/redscarf_iiplus/verd/config.h +++ b/keyboards/redscarf_iiplus/verd/config.h | |||
@@ -52,6 +52,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
52 | */ | 52 | */ |
53 | //#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 | 53 | //#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 |
54 | 54 | ||
55 | #define LED_NUM_LOCK_PIN E6 | ||
56 | #define LED_CAPS_LOCK_PIN C6 | ||
57 | #define LED_PIN_ON_STATE 0 | ||
58 | |||
55 | #define BACKLIGHT_PIN B7 | 59 | #define BACKLIGHT_PIN B7 |
56 | // #define BACKLIGHT_BREATHING | 60 | // #define BACKLIGHT_BREATHING |
57 | #define BACKLIGHT_LEVELS 3 | 61 | #define BACKLIGHT_LEVELS 3 |
diff --git a/keyboards/redscarf_iiplus/verd/verd.c b/keyboards/redscarf_iiplus/verd/verd.c index c16a5a974..fa5ef6bd2 100644 --- a/keyboards/redscarf_iiplus/verd/verd.c +++ b/keyboards/redscarf_iiplus/verd/verd.c | |||
@@ -13,30 +13,3 @@ | |||
13 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 13 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
14 | */ | 14 | */ |
15 | #include "verd.h" | 15 | #include "verd.h" |
16 | |||
17 | // Optional override functions below. | ||
18 | // You can leave any or all of these undefined. | ||
19 | // These are only required if you want to perform custom actions. | ||
20 | |||
21 | void matrix_init_kb(void) { | ||
22 | // put your keyboard start-up code here | ||
23 | // runs once when the firmware starts up | ||
24 | |||
25 | matrix_init_user(); | ||
26 | led_init_ports(); | ||
27 | } | ||
28 | |||
29 | void led_init_ports(void) { | ||
30 | setPinOutput(C7); | ||
31 | writePinHigh(C7); | ||
32 | setPinOutput(E6); | ||
33 | writePinHigh(E6); | ||
34 | } | ||
35 | |||
36 | bool led_update_kb(led_t led_state) { | ||
37 | if (led_update_user(led_state)) { | ||
38 | writePin(C7, !led_state.caps_lock); | ||
39 | writePin(E6, !led_state.num_lock); | ||
40 | } | ||
41 | return true; | ||
42 | } | ||
diff --git a/keyboards/reversestudio/decadepad/config.h b/keyboards/reversestudio/decadepad/config.h index 78fd40c40..383a539d7 100644 --- a/keyboards/reversestudio/decadepad/config.h +++ b/keyboards/reversestudio/decadepad/config.h | |||
@@ -42,6 +42,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
42 | /* define if matrix has ghost */ | 42 | /* define if matrix has ghost */ |
43 | //#define MATRIX_HAS_GHOST | 43 | //#define MATRIX_HAS_GHOST |
44 | 44 | ||
45 | #define LED_NUM_LOCK_PIN D4 | ||
46 | #define LED_PIN_ON_STATE 0 | ||
47 | |||
45 | /* number of backlight levels */ | 48 | /* number of backlight levels */ |
46 | /* Set 0 if debouncing isn't needed */ | 49 | /* Set 0 if debouncing isn't needed */ |
47 | #define DEBOUNCE 5 | 50 | #define DEBOUNCE 5 |
diff --git a/keyboards/reversestudio/decadepad/decadepad.c b/keyboards/reversestudio/decadepad/decadepad.c index 32a66e295..699a4476b 100644 --- a/keyboards/reversestudio/decadepad/decadepad.c +++ b/keyboards/reversestudio/decadepad/decadepad.c | |||
@@ -1,16 +1 @@ | |||
1 | #include "decadepad.h" | #include "decadepad.h" | |
2 | void matrix_init_kb(void) { | ||
3 | led_init_ports(); | ||
4 | matrix_init_user(); | ||
5 | }; | ||
6 | |||
7 | void led_init_ports(void) { | ||
8 | setPinOutput(D4); | ||
9 | } | ||
10 | |||
11 | bool led_update_kb(led_t led_state) { | ||
12 | if (led_update_user(led_state)){ | ||
13 | writePin(D4, !led_state.num_lock); | ||
14 | } | ||
15 | return true; | ||
16 | } \ No newline at end of file | ||
diff --git a/keyboards/singa/config.h b/keyboards/singa/config.h index 408f88b2a..1d3ed105e 100644 --- a/keyboards/singa/config.h +++ b/keyboards/singa/config.h | |||
@@ -37,6 +37,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
37 | #define DIODE_DIRECTION COL2ROW | 37 | #define DIODE_DIRECTION COL2ROW |
38 | #define DEBOUNCE 5 | 38 | #define DEBOUNCE 5 |
39 | 39 | ||
40 | #define LED_CAPS_LOCK_PIN D1 | ||
41 | |||
40 | #define BACKLIGHT_PIN D4 | 42 | #define BACKLIGHT_PIN D4 |
41 | #define BACKLIGHT_LEVELS 3 | 43 | #define BACKLIGHT_LEVELS 3 |
42 | 44 | ||
diff --git a/keyboards/singa/singa.c b/keyboards/singa/singa.c index 360b214a3..8605d6f47 100644 --- a/keyboards/singa/singa.c +++ b/keyboards/singa/singa.c | |||
@@ -15,19 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "singa.h" | 17 | #include "singa.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(D1); | ||
26 | } | ||
27 | |||
28 | bool led_update_kb(led_t led_state) { | ||
29 | if (led_update_user(led_state)) { | ||
30 | writePin(D1, led_state.caps_lock); | ||
31 | } | ||
32 | return true; | ||
33 | } | ||
diff --git a/keyboards/stella/config.h b/keyboards/stella/config.h index 04ba08239..512b7571d 100644 --- a/keyboards/stella/config.h +++ b/keyboards/stella/config.h | |||
@@ -47,6 +47,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
47 | /* COL2ROW, ROW2COL */ | 47 | /* COL2ROW, ROW2COL */ |
48 | #define DIODE_DIRECTION COL2ROW | 48 | #define DIODE_DIRECTION COL2ROW |
49 | 49 | ||
50 | #define LED_CAPS_LOCK_PIN B3 | ||
51 | #define LED_SCROLL_LOCK_PIN B7 | ||
52 | #define LED_PIN_ON_STATE 0 | ||
53 | |||
50 | #define BACKLIGHT_PIN B6 | 54 | #define BACKLIGHT_PIN B6 |
51 | #define BACKLIGHT_LEVELS 3 | 55 | #define BACKLIGHT_LEVELS 3 |
52 | #define BACKLIGHT_BREATHING | 56 | #define BACKLIGHT_BREATHING |
diff --git a/keyboards/stella/stella.c b/keyboards/stella/stella.c index 363c327d6..5eb55b366 100644 --- a/keyboards/stella/stella.c +++ b/keyboards/stella/stella.c | |||
@@ -15,22 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "stella.h" | 17 | #include "stella.h" |
18 | |||
19 | void matrix_init_kb(void) { | ||
20 | matrix_init_user(); | ||
21 | led_init_ports(); | ||
22 | }; | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(B3); | ||
26 | setPinOutput(B7); | ||
27 | } | ||
28 | |||
29 | bool led_update_kb(led_t led_state) { | ||
30 | if (led_update_user(led_state)) { | ||
31 | writePin(B3, !led_state.caps_lock); | ||
32 | writePin(B7, !led_state.scroll_lock); | ||
33 | } | ||
34 | |||
35 | return true; | ||
36 | } | ||
diff --git a/keyboards/tgr/910/910.c b/keyboards/tgr/910/910.c index 63b4a13f7..8e0c78538 100644 --- a/keyboards/tgr/910/910.c +++ b/keyboards/tgr/910/910.c | |||
@@ -15,23 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "910.h" | 17 | #include "910.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(D0); | ||
26 | setPinOutput(D1); | ||
27 | setPinOutput(D6); | ||
28 | } | ||
29 | |||
30 | bool led_update_kb(led_t led_state) { | ||
31 | if (led_update_user(led_state)) { | ||
32 | writePin(D0, led_state.num_lock); | ||
33 | writePin(D1, led_state.caps_lock); | ||
34 | writePin(D6, led_state.scroll_lock); | ||
35 | } | ||
36 | return true; | ||
37 | } | ||
diff --git a/keyboards/tgr/910/config.h b/keyboards/tgr/910/config.h index 8cd46a413..7ba412be3 100644 --- a/keyboards/tgr/910/config.h +++ b/keyboards/tgr/910/config.h | |||
@@ -38,6 +38,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
38 | #define DIODE_DIRECTION COL2ROW | 38 | #define DIODE_DIRECTION COL2ROW |
39 | #define DEBOUNCE 5 | 39 | #define DEBOUNCE 5 |
40 | 40 | ||
41 | #define LED_NUM_LOCK_PIN D0 | ||
42 | #define LED_CAPS_LOCK_PIN D1 | ||
43 | #define LED_SCROLL_LOCK_PIN D6 | ||
44 | |||
41 | #define BACKLIGHT_PIN D4 | 45 | #define BACKLIGHT_PIN D4 |
42 | #define BACKLIGHT_LEVELS 3 | 46 | #define BACKLIGHT_LEVELS 3 |
43 | 47 | ||
diff --git a/keyboards/tgr/910ce/910ce.c b/keyboards/tgr/910ce/910ce.c index 4b3913179..7538158c8 100644 --- a/keyboards/tgr/910ce/910ce.c +++ b/keyboards/tgr/910ce/910ce.c | |||
@@ -15,19 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "910ce.h" | 17 | #include "910ce.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(D1); | ||
26 | } | ||
27 | |||
28 | bool led_update_kb(led_t led_state) { | ||
29 | if (led_update_user(led_state)) { | ||
30 | writePin(D1, led_state.caps_lock); | ||
31 | } | ||
32 | return true; | ||
33 | } \ No newline at end of file | ||
diff --git a/keyboards/tgr/910ce/config.h b/keyboards/tgr/910ce/config.h index 6d3fe7a49..fd21a2de7 100644 --- a/keyboards/tgr/910ce/config.h +++ b/keyboards/tgr/910ce/config.h | |||
@@ -38,6 +38,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
38 | #define DIODE_DIRECTION COL2ROW | 38 | #define DIODE_DIRECTION COL2ROW |
39 | #define DEBOUNCE 5 | 39 | #define DEBOUNCE 5 |
40 | 40 | ||
41 | #define LED_CAPS_LOCK_PIN D1 | ||
42 | |||
41 | #define BACKLIGHT_PIN D4 | 43 | #define BACKLIGHT_PIN D4 |
42 | #define BACKLIGHT_LEVELS 3 | 44 | #define BACKLIGHT_LEVELS 3 |
43 | #define RGBLIGHT_ANIMATIONS | 45 | #define RGBLIGHT_ANIMATIONS |
diff --git a/keyboards/tgr/alice/alice.c b/keyboards/tgr/alice/alice.c index a4a5c787c..39aed2cf5 100644 --- a/keyboards/tgr/alice/alice.c +++ b/keyboards/tgr/alice/alice.c | |||
@@ -16,23 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include "alice.h" | 18 | #include "alice.h" |
19 | |||
20 | void keyboard_pre_init_kb(void) { | ||
21 | led_init_ports(); | ||
22 | keyboard_pre_init_user(); | ||
23 | } | ||
24 | |||
25 | void led_init_ports(void) { | ||
26 | setPinOutput(D0); | ||
27 | setPinOutput(D1); | ||
28 | setPinOutput(D6); | ||
29 | } | ||
30 | |||
31 | bool led_update_kb(led_t led_state) { | ||
32 | if (led_update_user(led_state)) { | ||
33 | writePin(D0, led_state.num_lock); | ||
34 | writePin(D1, led_state.caps_lock); | ||
35 | writePin(D6, led_state.scroll_lock); | ||
36 | } | ||
37 | return true; | ||
38 | } | ||
diff --git a/keyboards/tgr/alice/config.h b/keyboards/tgr/alice/config.h index 20f4c5970..26ed2e797 100644 --- a/keyboards/tgr/alice/config.h +++ b/keyboards/tgr/alice/config.h | |||
@@ -31,6 +31,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
31 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } | 31 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } |
32 | #define DIODE_DIRECTION COL2ROW | 32 | #define DIODE_DIRECTION COL2ROW |
33 | 33 | ||
34 | #define LED_NUM_LOCK_PIN D0 | ||
35 | #define LED_CAPS_LOCK_PIN D1 | ||
36 | #define LED_SCROLL_LOCK_PIN D6 | ||
37 | |||
34 | #define BACKLIGHT_PIN D4 | 38 | #define BACKLIGHT_PIN D4 |
35 | #define BACKLIGHT_LEVELS 3 | 39 | #define BACKLIGHT_LEVELS 3 |
36 | 40 | ||
diff --git a/keyboards/tgr/jane/config.h b/keyboards/tgr/jane/config.h index ed8b39c38..0132a716d 100644 --- a/keyboards/tgr/jane/config.h +++ b/keyboards/tgr/jane/config.h | |||
@@ -36,5 +36,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
36 | #define DIODE_DIRECTION COL2ROW | 36 | #define DIODE_DIRECTION COL2ROW |
37 | #define DEBOUNCE 5 | 37 | #define DEBOUNCE 5 |
38 | 38 | ||
39 | #define LED_CAPS_LOCK_PIN D1 | ||
40 | #define LED_SCROLL_LOCK_PIN D6 | ||
41 | |||
39 | #define BACKLIGHT_PIN D4 | 42 | #define BACKLIGHT_PIN D4 |
40 | #define BACKLIGHT_LEVELS 3 | 43 | #define BACKLIGHT_LEVELS 3 |
diff --git a/keyboards/tgr/jane/jane.c b/keyboards/tgr/jane/jane.c index fabdc0e90..d4cdebaa2 100644 --- a/keyboards/tgr/jane/jane.c +++ b/keyboards/tgr/jane/jane.c | |||
@@ -15,21 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "jane.h" | 17 | #include "jane.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(D1); | ||
26 | setPinOutput(D6); | ||
27 | } | ||
28 | |||
29 | bool led_update_kb(led_t led_state) { | ||
30 | if (led_update_user(led_state)) { | ||
31 | writePin(D1, led_state.caps_lock); | ||
32 | writePin(D6, led_state.scroll_lock); | ||
33 | } | ||
34 | return true; | ||
35 | } | ||
diff --git a/keyboards/tgr/tris/config.h b/keyboards/tgr/tris/config.h index 4ae3b967c..16e862a22 100644 --- a/keyboards/tgr/tris/config.h +++ b/keyboards/tgr/tris/config.h | |||
@@ -34,6 +34,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
34 | #define DIODE_DIRECTION COL2ROW | 34 | #define DIODE_DIRECTION COL2ROW |
35 | #define DEBOUNCE 5 | 35 | #define DEBOUNCE 5 |
36 | 36 | ||
37 | #define LED_NUM_LOCK_PIN D0 | ||
38 | |||
37 | #define BACKLIGHT_PIN D4 | 39 | #define BACKLIGHT_PIN D4 |
38 | #define BACKLIGHT_LEVELS 3 | 40 | #define BACKLIGHT_LEVELS 3 |
39 | 41 | ||
diff --git a/keyboards/tgr/tris/tris.c b/keyboards/tgr/tris/tris.c index f354d7a39..c2147b29c 100644 --- a/keyboards/tgr/tris/tris.c +++ b/keyboards/tgr/tris/tris.c | |||
@@ -15,19 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "tris.h" | 17 | #include "tris.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(D0); | ||
26 | } | ||
27 | |||
28 | bool led_update_kb(led_t led_state) { | ||
29 | if (led_update_user(led_state)) { | ||
30 | writePin(D0, led_state.num_lock); | ||
31 | } | ||
32 | return true; | ||
33 | } | ||
diff --git a/keyboards/unikorn/config.h b/keyboards/unikorn/config.h index c68a857d5..1029a777b 100644 --- a/keyboards/unikorn/config.h +++ b/keyboards/unikorn/config.h | |||
@@ -36,6 +36,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
36 | #define DIODE_DIRECTION COL2ROW | 36 | #define DIODE_DIRECTION COL2ROW |
37 | #define DEBOUNCE 5 | 37 | #define DEBOUNCE 5 |
38 | 38 | ||
39 | #define LED_CAPS_LOCK_PIN D1 | ||
40 | |||
39 | #define BACKLIGHT_PIN D4 | 41 | #define BACKLIGHT_PIN D4 |
40 | #define BACKLIGHT_LEVELS 3 | 42 | #define BACKLIGHT_LEVELS 3 |
41 | 43 | ||
diff --git a/keyboards/unikorn/unikorn.c b/keyboards/unikorn/unikorn.c index c2c85eb98..d803ebf9d 100644 --- a/keyboards/unikorn/unikorn.c +++ b/keyboards/unikorn/unikorn.c | |||
@@ -15,19 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "unikorn.h" | 17 | #include "unikorn.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(D1); | ||
26 | } | ||
27 | |||
28 | bool led_update_kb(led_t led_state) { | ||
29 | if (led_update_user(led_state)) { | ||
30 | writePin(D1, led_state.caps_lock); | ||
31 | } | ||
32 | return true; | ||
33 | } | ||
diff --git a/keyboards/vn66/config.h b/keyboards/vn66/config.h index e30c1b19d..d80954184 100644 --- a/keyboards/vn66/config.h +++ b/keyboards/vn66/config.h | |||
@@ -47,6 +47,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
47 | /* COL2ROW, ROW2COL */ | 47 | /* COL2ROW, ROW2COL */ |
48 | #define DIODE_DIRECTION COL2ROW | 48 | #define DIODE_DIRECTION COL2ROW |
49 | 49 | ||
50 | #define LED_CAPS_LOCK_PIN E6 | ||
51 | #define LED_PIN_ON_STATE 0 | ||
52 | |||
50 | #define BACKLIGHT_PIN B6 | 53 | #define BACKLIGHT_PIN B6 |
51 | #define BACKLIGHT_LEVELS 4 | 54 | #define BACKLIGHT_LEVELS 4 |
52 | #define BACKLIGHT_BREATHING | 55 | #define BACKLIGHT_BREATHING |
diff --git a/keyboards/vn66/vn66.c b/keyboards/vn66/vn66.c index 77fe23aef..563135904 100644 --- a/keyboards/vn66/vn66.c +++ b/keyboards/vn66/vn66.c | |||
@@ -15,20 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "vn66.h" | 17 | #include "vn66.h" |
18 | |||
19 | void matrix_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | matrix_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(E6); | ||
26 | } | ||
27 | |||
28 | bool led_update_kb(led_t led_state) { | ||
29 | if (led_update_user(led_state)) { | ||
30 | writePin(E6, !led_state.caps_lock); | ||
31 | } | ||
32 | |||
33 | return true; | ||
34 | } | ||
diff --git a/keyboards/winkeyless/bface/bface.c b/keyboards/winkeyless/bface/bface.c index 7d27096ba..c1fcbe53b 100644 --- a/keyboards/winkeyless/bface/bface.c +++ b/keyboards/winkeyless/bface/bface.c | |||
@@ -15,23 +15,3 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "bface.h" | 17 | #include "bface.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(D0); | ||
26 | setPinOutput(D1); | ||
27 | setPinOutput(D6); | ||
28 | } | ||
29 | |||
30 | bool led_update_kb(led_t led_state) { | ||
31 | if (led_update_user(led_state)) { | ||
32 | writePin(D0, led_state.num_lock); | ||
33 | writePin(D1, led_state.caps_lock); | ||
34 | writePin(D6, led_state.scroll_lock); | ||
35 | } | ||
36 | return true; | ||
37 | } | ||
diff --git a/keyboards/winkeyless/bface/config.h b/keyboards/winkeyless/bface/config.h index 27ee761e9..83fcfa027 100644 --- a/keyboards/winkeyless/bface/config.h +++ b/keyboards/winkeyless/bface/config.h | |||
@@ -35,6 +35,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
35 | 35 | ||
36 | #define DIODE_DIRECTION COL2ROW | 36 | #define DIODE_DIRECTION COL2ROW |
37 | 37 | ||
38 | #define LED_NUM_LOCK_PIN D0 | ||
39 | #define LED_CAPS_LOCK_PIN D1 | ||
40 | #define LED_SCROLL_LOCK_PIN D6 | ||
41 | |||
38 | #define RGBLED_NUM 16 | 42 | #define RGBLED_NUM 16 |
39 | #define RGBLIGHT_ANIMATIONS | 43 | #define RGBLIGHT_ANIMATIONS |
40 | 44 | ||
diff --git a/keyboards/winkeyless/bmini/bmini.c b/keyboards/winkeyless/bmini/bmini.c index 6529d4403..f44fd36a8 100644 --- a/keyboards/winkeyless/bmini/bmini.c +++ b/keyboards/winkeyless/bmini/bmini.c | |||
@@ -16,23 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include "bmini.h" | 18 | #include "bmini.h" |
19 | |||
20 | void keyboard_pre_init_kb(void) { | ||
21 | led_init_ports(); | ||
22 | keyboard_pre_init_user(); | ||
23 | } | ||
24 | |||
25 | void led_init_ports(void) { | ||
26 | setPinOutput(D0); | ||
27 | setPinOutput(D1); | ||
28 | setPinOutput(D6); | ||
29 | } | ||
30 | |||
31 | bool led_update_kb(led_t led_state) { | ||
32 | if (led_update_user(led_state)) { | ||
33 | writePin(D0, led_state.num_lock); | ||
34 | writePin(D1, led_state.caps_lock); | ||
35 | writePin(D6, led_state.scroll_lock); | ||
36 | } | ||
37 | return true; | ||
38 | } | ||
diff --git a/keyboards/winkeyless/bmini/config.h b/keyboards/winkeyless/bmini/config.h index 6e91241af..1f7759faf 100644 --- a/keyboards/winkeyless/bmini/config.h +++ b/keyboards/winkeyless/bmini/config.h | |||
@@ -34,6 +34,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
34 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } | 34 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } |
35 | #define DIODE_DIRECTION COL2ROW | 35 | #define DIODE_DIRECTION COL2ROW |
36 | 36 | ||
37 | #define LED_NUM_LOCK_PIN D0 | ||
38 | #define LED_CAPS_LOCK_PIN D1 | ||
39 | #define LED_SCROLL_LOCK_PIN D6 | ||
40 | |||
37 | #define RGBLIGHT_ANIMATIONS | 41 | #define RGBLIGHT_ANIMATIONS |
38 | 42 | ||
39 | #define BACKLIGHT_PIN D4 | 43 | #define BACKLIGHT_PIN D4 |
diff --git a/keyboards/winkeyless/bminiex/bminiex.c b/keyboards/winkeyless/bminiex/bminiex.c index 676f88ebf..db127e030 100644 --- a/keyboards/winkeyless/bminiex/bminiex.c +++ b/keyboards/winkeyless/bminiex/bminiex.c | |||
@@ -16,23 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include "bminiex.h" | 18 | #include "bminiex.h" |
19 | |||
20 | void keyboard_pre_init_kb(void) { | ||
21 | led_init_ports(); | ||
22 | keyboard_pre_init_user(); | ||
23 | } | ||
24 | |||
25 | void led_init_ports(void) { | ||
26 | setPinOutput(D0); | ||
27 | setPinOutput(D1); | ||
28 | setPinOutput(D6); | ||
29 | } | ||
30 | |||
31 | bool led_update_kb(led_t led_state) { | ||
32 | if (led_update_user(led_state)) { | ||
33 | writePin(D0, led_state.num_lock); | ||
34 | writePin(D1, led_state.caps_lock); | ||
35 | writePin(D6, led_state.scroll_lock); | ||
36 | } | ||
37 | return true; | ||
38 | } | ||
diff --git a/keyboards/winkeyless/bminiex/config.h b/keyboards/winkeyless/bminiex/config.h index 7c9c11c11..412d10a2a 100644 --- a/keyboards/winkeyless/bminiex/config.h +++ b/keyboards/winkeyless/bminiex/config.h | |||
@@ -34,6 +34,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
34 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } | 34 | #define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } |
35 | #define DIODE_DIRECTION COL2ROW | 35 | #define DIODE_DIRECTION COL2ROW |
36 | 36 | ||
37 | #define LED_NUM_LOCK_PIN D0 | ||
38 | #define LED_CAPS_LOCK_PIN D1 | ||
39 | #define LED_SCROLL_LOCK_PIN D6 | ||
40 | |||
37 | #define RGBLIGHT_ANIMATIONS | 41 | #define RGBLIGHT_ANIMATIONS |
38 | 42 | ||
39 | #define BACKLIGHT_PIN D4 | 43 | #define BACKLIGHT_PIN D4 |
diff --git a/keyboards/xbows/knight/config.h b/keyboards/xbows/knight/config.h index a6d0d8066..fbe150439 100644 --- a/keyboards/xbows/knight/config.h +++ b/keyboards/xbows/knight/config.h | |||
@@ -20,6 +20,10 @@ | |||
20 | /* define if matrix has ghost */ | 20 | /* define if matrix has ghost */ |
21 | //#define MATRIX_HAS_GHOST | 21 | //#define MATRIX_HAS_GHOST |
22 | 22 | ||
23 | #define LED_NUM_LOCK_PIN D1 | ||
24 | #define LED_CAPS_LOCK_PIN C7 | ||
25 | #define LED_PIN_ON_STATE 0 | ||
26 | |||
23 | /* number of backlight levels */ | 27 | /* number of backlight levels */ |
24 | // #define BACKLIGHT_LEVELS 3 | 28 | // #define BACKLIGHT_LEVELS 3 |
25 | #define BACKLIGHT_PIN B7 | 29 | #define BACKLIGHT_PIN B7 |
diff --git a/keyboards/xbows/knight/knight.c b/keyboards/xbows/knight/knight.c index dcc5035d5..cb79d9d58 100644 --- a/keyboards/xbows/knight/knight.c +++ b/keyboards/xbows/knight/knight.c | |||
@@ -1,23 +1 @@ | |||
1 | #include "knight.h" | #include "knight.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 | led_init_ports(); | ||
9 | } | ||
10 | |||
11 | void led_init_ports(void) { | ||
12 | setPinOutput(D1); | ||
13 | writePinHigh(D1); | ||
14 | setPinOutput(C7); | ||
15 | writePinHigh(C7); | ||
16 | } | ||
17 | bool led_update_kb(led_t led_state) { | ||
18 | if(led_update_user(led_state)) { | ||
19 | writePin(C7, !led_state.caps_lock); | ||
20 | writePin(D1, !led_state.num_lock); | ||
21 | } | ||
22 | return true; | ||
23 | } | ||
diff --git a/keyboards/xd68/config.h b/keyboards/xd68/config.h index 5c450c68a..4fbb66b81 100644 --- a/keyboards/xd68/config.h +++ b/keyboards/xd68/config.h | |||
@@ -47,6 +47,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
47 | /* COL2ROW, ROW2COL*/ | 47 | /* COL2ROW, ROW2COL*/ |
48 | #define DIODE_DIRECTION COL2ROW | 48 | #define DIODE_DIRECTION COL2ROW |
49 | 49 | ||
50 | #define LED_CAPS_LOCK_PIN B2 | ||
51 | #define LED_PIN_ON_STATE 0 | ||
52 | |||
50 | #define BACKLIGHT_PIN F5 | 53 | #define BACKLIGHT_PIN F5 |
51 | #define BACKLIGHT_LEVELS 6 | 54 | #define BACKLIGHT_LEVELS 6 |
52 | #define BACKLIGHT_BREATHING | 55 | #define BACKLIGHT_BREATHING |
diff --git a/keyboards/xd68/xd68.c b/keyboards/xd68/xd68.c index 2a5a52bda..45e8a2b95 100755 --- a/keyboards/xd68/xd68.c +++ b/keyboards/xd68/xd68.c | |||
@@ -1,22 +1 @@ | |||
1 | #include "xd68.h" | #include "xd68.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 | matrix_init_user(); | ||
7 | led_init_ports(); | ||
8 | } | ||
9 | |||
10 | void led_init_ports(void) { | ||
11 | // * Set our LED pins as output | ||
12 | setPinOutput(B2); | ||
13 | writePinHigh(B2); | ||
14 | } | ||
15 | |||
16 | bool led_update_kb(led_t led_state) { | ||
17 | if(led_update_user(led_state)) { | ||
18 | writePin(B2, !led_state.caps_lock); | ||
19 | } | ||
20 | return true; | ||
21 | } | ||
22 | |||
diff --git a/keyboards/xd87/config.h b/keyboards/xd87/config.h index 7ed104c23..aa07e3225 100644 --- a/keyboards/xd87/config.h +++ b/keyboards/xd87/config.h | |||
@@ -49,6 +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 | #define LED_CAPS_LOCK_PIN E2 | ||
53 | #define LED_PIN_ON_STATE 0 | ||
54 | |||
52 | #define BACKLIGHT_PIN D0 | 55 | #define BACKLIGHT_PIN D0 |
53 | // #define BACKLIGHT_BREATHING | 56 | // #define BACKLIGHT_BREATHING |
54 | #define BACKLIGHT_LEVELS 3 | 57 | #define BACKLIGHT_LEVELS 3 |
diff --git a/keyboards/xd87/xd87.c b/keyboards/xd87/xd87.c index a41b4f2db..1d21357e6 100644 --- a/keyboards/xd87/xd87.c +++ b/keyboards/xd87/xd87.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 "xd87.h" | 16 | #include "xd87.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 | 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 | bool led_update_kb(led_t led_state) { | ||
40 | bool res = led_update_user(led_state); | ||
41 | |||
42 | if (res) { | ||
43 | writePin(E2, !led_state.caps_lock); | ||
44 | } | ||
45 | |||
46 | return res; | ||
47 | } | ||
48 | |||
49 | void led_init_ports(void) { | ||
50 | setPinOutput(E2); | ||
51 | } | ||
diff --git a/keyboards/ymd75/config.h b/keyboards/ymd75/config.h index 79dcdc6c4..a828c4d64 100644 --- a/keyboards/ymd75/config.h +++ b/keyboards/ymd75/config.h | |||
@@ -29,6 +29,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
29 | 29 | ||
30 | #define BACKLIGHT_LEVELS 12 | 30 | #define BACKLIGHT_LEVELS 12 |
31 | 31 | ||
32 | #define LED_CAPS_LOCK_PIN D1 | ||
33 | |||
32 | #define RGB_DI_PIN E2 | 34 | #define RGB_DI_PIN E2 |
33 | #define RGBLED_NUM 16 | 35 | #define RGBLED_NUM 16 |
34 | #define RGBLIGHT_ANIMATIONS | 36 | #define RGBLIGHT_ANIMATIONS |
diff --git a/keyboards/ymd75/rev1/rev1.c b/keyboards/ymd75/rev1/rev1.c index 0870a6cc0..c1ad021b1 100644 --- a/keyboards/ymd75/rev1/rev1.c +++ b/keyboards/ymd75/rev1/rev1.c | |||
@@ -16,19 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include "ymd75.h" | 18 | #include "ymd75.h" |
19 | |||
20 | void keyboard_pre_init_kb(void) { | ||
21 | led_init_ports(); | ||
22 | keyboard_pre_init_user(); | ||
23 | } | ||
24 | |||
25 | void led_init_ports(void) { | ||
26 | setPinOutput(D1); | ||
27 | } | ||
28 | |||
29 | bool led_update_kb(led_t led_state) { | ||
30 | if (led_update_user(led_state)) { | ||
31 | writePin(D1, led_state.caps_lock); | ||
32 | } | ||
33 | return true; | ||
34 | } | ||
diff --git a/keyboards/ymd75/rev2/rev2.c b/keyboards/ymd75/rev2/rev2.c index 0870a6cc0..c1ad021b1 100644 --- a/keyboards/ymd75/rev2/rev2.c +++ b/keyboards/ymd75/rev2/rev2.c | |||
@@ -16,19 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include "ymd75.h" | 18 | #include "ymd75.h" |
19 | |||
20 | void keyboard_pre_init_kb(void) { | ||
21 | led_init_ports(); | ||
22 | keyboard_pre_init_user(); | ||
23 | } | ||
24 | |||
25 | void led_init_ports(void) { | ||
26 | setPinOutput(D1); | ||
27 | } | ||
28 | |||
29 | bool led_update_kb(led_t led_state) { | ||
30 | if (led_update_user(led_state)) { | ||
31 | writePin(D1, led_state.caps_lock); | ||
32 | } | ||
33 | return true; | ||
34 | } | ||
diff --git a/keyboards/ymd75/rev3/rev3.c b/keyboards/ymd75/rev3/rev3.c index 96e1a4754..c1ad021b1 100644 --- a/keyboards/ymd75/rev3/rev3.c +++ b/keyboards/ymd75/rev3/rev3.c | |||
@@ -16,17 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include "ymd75.h" | 18 | #include "ymd75.h" |
19 | |||
20 | void keyboard_pre_init_kb(void) { | ||
21 | led_init_ports(); | ||
22 | keyboard_pre_init_user(); | ||
23 | } | ||
24 | |||
25 | void led_init_ports(void) { setPinOutput(D1); } | ||
26 | |||
27 | bool led_update_kb(led_t led_state) { | ||
28 | if (led_update_user(led_state)) { | ||
29 | writePin(D1, led_state.caps_lock); | ||
30 | } | ||
31 | return true; | ||
32 | } | ||
diff --git a/keyboards/ymd96/config.h b/keyboards/ymd96/config.h index 6f50c7324..55c5beaf3 100644 --- a/keyboards/ymd96/config.h +++ b/keyboards/ymd96/config.h | |||
@@ -35,6 +35,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
35 | /* COL2ROW or ROW2COL */ | 35 | /* COL2ROW or ROW2COL */ |
36 | #define DIODE_DIRECTION COL2ROW | 36 | #define DIODE_DIRECTION COL2ROW |
37 | 37 | ||
38 | #define LED_NUM_LOCK_PIN D0 | ||
39 | #define LED_CAPS_LOCK_PIN D1 | ||
40 | #define LED_PIN_ON_STATE 0 | ||
41 | |||
38 | #define BACKLIGHT_PIN D4 | 42 | #define BACKLIGHT_PIN D4 |
39 | #define BACKLIGHT_LEVELS 12 | 43 | #define BACKLIGHT_LEVELS 12 |
40 | #define BACKLIGHT_BREATHING | 44 | #define BACKLIGHT_BREATHING |
diff --git a/keyboards/ymd96/ymd96.c b/keyboards/ymd96/ymd96.c index 5841decda..0c212f4ab 100644 --- a/keyboards/ymd96/ymd96.c +++ b/keyboards/ymd96/ymd96.c | |||
@@ -17,21 +17,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include "ymd96.h" | 19 | #include "ymd96.h" |
20 | |||
21 | void keyboard_pre_init_kb(void) { | ||
22 | led_init_ports(); | ||
23 | keyboard_pre_init_user(); | ||
24 | } | ||
25 | |||
26 | void led_init_ports(void) { | ||
27 | setPinOutput(D0); | ||
28 | setPinOutput(D1); | ||
29 | } | ||
30 | |||
31 | bool led_update_kb(led_t led_state) { | ||
32 | if (led_update_user(led_state)) { | ||
33 | writePin(D0, led_state.num_lock); | ||
34 | writePin(D1, led_state.caps_lock); | ||
35 | } | ||
36 | return true; | ||
37 | } | ||
diff --git a/keyboards/ymdk/bface/bface.c b/keyboards/ymdk/bface/bface.c index b35b33376..fabc10498 100644 --- a/keyboards/ymdk/bface/bface.c +++ b/keyboards/ymdk/bface/bface.c | |||
@@ -15,19 +15,3 @@ | |||
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 "quantum.h" | 17 | #include "quantum.h" |
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(D1); | ||
26 | } | ||
27 | |||
28 | bool led_update_kb(led_t led_state) { | ||
29 | if (led_update_user(led_state)) { | ||
30 | writePin(D1, led_state.caps_lock); | ||
31 | } | ||
32 | return true; | ||
33 | } | ||
diff --git a/keyboards/ymdk/bface/config.h b/keyboards/ymdk/bface/config.h index 3d9605b75..6be1c8662 100644 --- a/keyboards/ymdk/bface/config.h +++ b/keyboards/ymdk/bface/config.h | |||
@@ -34,6 +34,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
34 | 34 | ||
35 | #define DIODE_DIRECTION COL2ROW | 35 | #define DIODE_DIRECTION COL2ROW |
36 | 36 | ||
37 | #define LED_CAPS_LOCK_PIN D1 | ||
38 | |||
37 | #define BACKLIGHT_PIN D4 | 39 | #define BACKLIGHT_PIN D4 |
38 | #define BACKLIGHT_LEVELS 6 | 40 | #define BACKLIGHT_LEVELS 6 |
39 | 41 | ||
diff --git a/keyboards/ymdk_np21/config.h b/keyboards/ymdk_np21/config.h index 1ea6fb0ce..83423792b 100644 --- a/keyboards/ymdk_np21/config.h +++ b/keyboards/ymdk_np21/config.h | |||
@@ -46,6 +46,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
46 | /* COL2ROW, ROW2COL */ | 46 | /* COL2ROW, ROW2COL */ |
47 | #define DIODE_DIRECTION COL2ROW | 47 | #define DIODE_DIRECTION COL2ROW |
48 | 48 | ||
49 | #define LED_NUM_LOCK_PIN D0 | ||
50 | |||
49 | #define BACKLIGHT_PIN D4 | 51 | #define BACKLIGHT_PIN D4 |
50 | #define BACKLIGHT_LEVELS 12 | 52 | #define BACKLIGHT_LEVELS 12 |
51 | #define BACKLIGHT_BREATHING | 53 | #define BACKLIGHT_BREATHING |
diff --git a/keyboards/ymdk_np21/ymdk_np21.c b/keyboards/ymdk_np21/ymdk_np21.c index 63812c936..3ca0e8baa 100644 --- a/keyboards/ymdk_np21/ymdk_np21.c +++ b/keyboards/ymdk_np21/ymdk_np21.c | |||
@@ -17,19 +17,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include "ymdk_np21.h" | 19 | #include "ymdk_np21.h" |
20 | |||
21 | void keyboard_pre_init_kb(void) { | ||
22 | led_init_ports(); | ||
23 | keyboard_pre_init_user(); | ||
24 | } | ||
25 | |||
26 | void led_init_ports(void) { | ||
27 | setPinOutput(D0); | ||
28 | } | ||
29 | |||
30 | bool led_update_kb(led_t led_state) { | ||
31 | if (led_update_user(led_state)) { | ||
32 | writePin(D0, led_state.num_lock); | ||
33 | } | ||
34 | return true; | ||
35 | } | ||