aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/al1/al1.c24
-rw-r--r--keyboards/al1/al1.h5
-rw-r--r--keyboards/al1/config.h5
-rwxr-xr-xkeyboards/amj40/amj40.c29
-rwxr-xr-xkeyboards/amj40/config.h3
-rw-r--r--keyboards/doro67/multi/config.h3
-rw-r--r--keyboards/doro67/multi/multi.c34
-rw-r--r--keyboards/doro67/regular/config.h3
-rw-r--r--keyboards/doro67/regular/regular.c31
-rw-r--r--keyboards/doro67/rgb/config.h3
-rw-r--r--keyboards/doro67/rgb/rgb.c37
-rwxr-xr-xkeyboards/espectro/config.h5
-rwxr-xr-xkeyboards/espectro/espectro.c61
-rw-r--r--keyboards/evil80/config.h9
-rw-r--r--keyboards/evil80/evil80.c46
-rw-r--r--keyboards/fc660c/config.h3
-rw-r--r--keyboards/fc660c/fc660c.c27
-rw-r--r--keyboards/gh60/revc/config.h3
-rw-r--r--keyboards/gh60/revc/revc.c26
-rw-r--r--keyboards/gh60/revc/revc.h20
-rw-r--r--keyboards/gh60/satan/config.h3
-rw-r--r--keyboards/gh60/satan/satan.c23
-rw-r--r--keyboards/kinesis/stapelberg/config.h7
-rw-r--r--keyboards/kinesis/stapelberg/stapelberg.c60
-rw-r--r--keyboards/noxary/260/260.c45
-rw-r--r--keyboards/noxary/260/config.h3
-rw-r--r--keyboards/playkbtw/ca66/ca66.c11
-rw-r--r--keyboards/playkbtw/ca66/config.h2
-rw-r--r--keyboards/playkbtw/pk60/config.h3
-rw-r--r--keyboards/playkbtw/pk60/pk60.c34
-rwxr-xr-xkeyboards/redscarf_iiplus/verc/config.h7
-rwxr-xr-xkeyboards/redscarf_iiplus/verc/verc.c35
-rw-r--r--keyboards/sentraq/s65_plus/config.h3
-rw-r--r--keyboards/sentraq/s65_plus/s65_plus.c23
-rwxr-xr-xkeyboards/tada68/config.h3
-rwxr-xr-xkeyboards/tada68/tada68.c30
-rw-r--r--keyboards/toad/config.h4
-rw-r--r--keyboards/toad/toad.c17
-rw-r--r--keyboards/westfoxtrot/aanzee/aanzee.c38
-rw-r--r--keyboards/westfoxtrot/aanzee/config.h3
-rw-r--r--keyboards/xmmx/config.h4
-rw-r--r--keyboards/xmmx/xmmx.c17
42 files changed, 81 insertions, 671 deletions
diff --git a/keyboards/al1/al1.c b/keyboards/al1/al1.c
index e50a6373b..460a7620c 100644
--- a/keyboards/al1/al1.c
+++ b/keyboards/al1/al1.c
@@ -14,27 +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 "al1.h" 16#include "al1.h"
17
18bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
19 return process_record_user(keycode, record);
20}
21
22void led_set_kb(uint8_t usb_led) {
23 CONFIG_LED_IO;
24 print_dec(usb_led);
25 if (usb_led & (1<<USB_LED_CAPS_LOCK))
26 PORTB &= ~(1<<7);
27 else
28 PORTB |= (1<<7);
29
30 if (usb_led & (1<<USB_LED_NUM_LOCK))
31 PORTD &= ~(1<<0);
32 else
33 PORTD |= (1<<0);
34
35 if (usb_led & (1<<USB_LED_SCROLL_LOCK))
36 PORTD &= ~(1<<1);
37 else
38 PORTD |= (1<<1);
39 led_set_user(usb_led);
40}
diff --git a/keyboards/al1/al1.h b/keyboards/al1/al1.h
index 17a0c9655..c313a898d 100644
--- a/keyboards/al1/al1.h
+++ b/keyboards/al1/al1.h
@@ -18,11 +18,6 @@
18 18
19#include "quantum.h" 19#include "quantum.h"
20 20
21#define CONFIG_LED_IO \
22 DDRB |= (1<<7) | (1<<6); \
23 DDRD |= (1<<0) | (1<<1);
24
25
26#define LAYOUT( \ 21#define LAYOUT( \
27 K500, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K415, K414,\ 22 K500, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K415, K414,\
28 K501, K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K215, K413,\ 23 K501, K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K215, K413,\
diff --git a/keyboards/al1/config.h b/keyboards/al1/config.h
index f4ded4346..6a59afae7 100644
--- a/keyboards/al1/config.h
+++ b/keyboards/al1/config.h
@@ -46,6 +46,11 @@ 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#define LED_CAPS_LOCK_PIN B7
51#define LED_SCROLL_LOCK_PIN D1
52#define LED_PIN_ON_STATE 0
53
49#define BACKLIGHT_PIN B6 54#define BACKLIGHT_PIN B6
50#define BACKLIGHT_BREATHING 55#define BACKLIGHT_BREATHING
51#define BACKLIGHT_LEVELS 3 56#define BACKLIGHT_LEVELS 3
diff --git a/keyboards/amj40/amj40.c b/keyboards/amj40/amj40.c
index 5a2376999..20742c325 100755
--- a/keyboards/amj40/amj40.c
+++ b/keyboards/amj40/amj40.c
@@ -1,30 +1 @@
1#include "amj40.h" #include "amj40.h"
2#include "led.h"
3
4void 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
11void matrix_scan_kb(void) {
12 // put your looping keyboard code here
13 // runs every cycle (a lot)
14 matrix_scan_user();
15};
16
17void led_init_ports(void) {
18 // * Set our LED pins as output
19 DDRB |= (1<<2);
20}
21
22void led_set_kb(uint8_t usb_led) {
23 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
24 // Turn capslock on
25 PORTB &= ~(1<<2);
26 } else {
27 // Turn capslock off
28 PORTB |= (1<<2);
29 }
30}
diff --git a/keyboards/amj40/config.h b/keyboards/amj40/config.h
index f9a3c1ac6..5534dbf10 100755
--- a/keyboards/amj40/config.h
+++ b/keyboards/amj40/config.h
@@ -38,6 +38,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
38#define MATRIX_COL_PINS { F1, F0, E6, C7, C6, B0, D4, B1, B7, B5, B4, D7} 38#define MATRIX_COL_PINS { F1, F0, E6, C7, C6, B0, D4, B1, B7, B5, B4, D7}
39#define UNUSED_PINS 39#define UNUSED_PINS
40 40
41#define LED_CAPS_LOCK_PIN B2
42#define LED_PIN_ON_STATE 0
43
41#define BACKLIGHT_PIN B6 44#define BACKLIGHT_PIN B6
42 45
43/* COL2ROW or ROW2COL */ 46/* COL2ROW or ROW2COL */
diff --git a/keyboards/doro67/multi/config.h b/keyboards/doro67/multi/config.h
index d76e7afff..83a922038 100644
--- a/keyboards/doro67/multi/config.h
+++ b/keyboards/doro67/multi/config.h
@@ -29,5 +29,8 @@
29 29
30#define DIODE_DIRECTION COL2ROW 30#define DIODE_DIRECTION COL2ROW
31 31
32#define LED_CAPS_LOCK_PIN E6
33#define LED_PIN_ON_STATE 0
34
32#define BACKLIGHT_PIN B7 35#define BACKLIGHT_PIN B7
33#define BACKLIGHT_LEVELS 7 36#define BACKLIGHT_LEVELS 7
diff --git a/keyboards/doro67/multi/multi.c b/keyboards/doro67/multi/multi.c
index 14e3359c1..3ab1f5365 100644
--- a/keyboards/doro67/multi/multi.c
+++ b/keyboards/doro67/multi/multi.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 "multi.h" 16#include "multi.h"
17
18void matrix_init_kb(void) {
19 // put your keyboard start-up code here
20 // runs once when the firmware starts up
21
22 setPinOutput(E6);
23 matrix_init_user();
24}
25
26void matrix_scan_kb(void) {
27 // put your looping keyboard code here
28 // runs every cycle (a lot)
29
30 matrix_scan_user();
31}
32
33bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
34 // put your per-action keyboard code here
35 // runs for every action, just before processing by the firmware
36
37 return process_record_user(keycode, record);
38}
39
40void led_set_kb(uint8_t usb_led) {
41 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
42
43 if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
44 writePinLow(E6);
45 } else {
46 writePinHigh(E6);
47 }
48
49 led_set_user(usb_led);
50}
diff --git a/keyboards/doro67/regular/config.h b/keyboards/doro67/regular/config.h
index 4cfe2487d..85a0c5038 100644
--- a/keyboards/doro67/regular/config.h
+++ b/keyboards/doro67/regular/config.h
@@ -28,3 +28,6 @@
28#define MATRIX_COL_PINS { B0, B1, B2, B3, D4, D6, D7, B4, B5, B6, C6, C7, F5, F6, F7 } 28#define MATRIX_COL_PINS { B0, B1, B2, B3, D4, D6, D7, B4, B5, B6, C6, C7, F5, F6, F7 }
29 29
30#define DIODE_DIRECTION COL2ROW 30#define DIODE_DIRECTION COL2ROW
31
32#define LED_CAPS_LOCK_PIN E6
33#define LED_PIN_ON_STATE 0
diff --git a/keyboards/doro67/regular/regular.c b/keyboards/doro67/regular/regular.c
index 719ceea6f..c9b0a25b5 100644
--- a/keyboards/doro67/regular/regular.c
+++ b/keyboards/doro67/regular/regular.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 "regular.h" 16#include "regular.h"
17
18void matrix_init_kb(void) {
19 // put your keyboard start-up code here
20 // runs once when the firmware starts up
21 setPinOutput(E6);
22 matrix_init_user();
23}
24
25void matrix_scan_kb(void) {
26 // put your looping keyboard code here
27 // runs every cycle (a lot)
28
29 matrix_scan_user();
30}
31
32bool 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
39void led_set_kb(uint8_t usb_led) {
40 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
41 if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
42 writePinLow(E6);
43 } else {
44 writePinHigh(E6);
45 }
46 led_set_user(usb_led);
47}
diff --git a/keyboards/doro67/rgb/config.h b/keyboards/doro67/rgb/config.h
index 90fefa123..349b9f5cd 100644
--- a/keyboards/doro67/rgb/config.h
+++ b/keyboards/doro67/rgb/config.h
@@ -48,6 +48,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
48/* COL2ROW, ROW2COL*/ 48/* COL2ROW, ROW2COL*/
49#define DIODE_DIRECTION COL2ROW 49#define DIODE_DIRECTION COL2ROW
50 50
51#define LED_CAPS_LOCK_PIN E6
52#define LED_PIN_ON_STATE 0
53
51// The pin connected to the data pin of the LEDs 54// The pin connected to the data pin of the LEDs
52#define RGB_DI_PIN B7 55#define RGB_DI_PIN B7
53// The number of LEDs connected 56// The number of LEDs connected
diff --git a/keyboards/doro67/rgb/rgb.c b/keyboards/doro67/rgb/rgb.c
index e8c9ac632..794c037dd 100644
--- a/keyboards/doro67/rgb/rgb.c
+++ b/keyboards/doro67/rgb/rgb.c
@@ -16,43 +16,6 @@
16#include "rgb.h" 16#include "rgb.h"
17#include "rgb_matrix_types.h" 17#include "rgb_matrix_types.h"
18 18
19// Optional override functions below.
20// You can leave any or all of these undefined.
21// These are only required if you want to perform custom actions.
22
23
24
25void matrix_init_kb(void) {
26 // put your keyboard start-up code here
27 // runs once when the firmware starts up
28 setPinOutput(E6);
29 matrix_init_user();
30}
31
32void matrix_scan_kb(void) {
33 // put your looping keyboard code here
34 // runs every cycle (a lot)
35
36 matrix_scan_user();
37}
38
39bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
40 // put your per-action keyboard code here
41 // runs for every action, just before processing by the firmware
42
43 return process_record_user(keycode, record);
44}
45
46void led_set_kb(uint8_t usb_led) {
47 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
48 if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
49 writePinLow(E6);
50 } else {
51 writePinHigh(E6);
52 }
53 led_set_user(usb_led);
54}
55
56led_config_t g_led_config = { { 19led_config_t g_led_config = { {
57 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, 20 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 },
58 { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, 21 { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 },
diff --git a/keyboards/espectro/config.h b/keyboards/espectro/config.h
index 2736c1d88..b344c641e 100755
--- a/keyboards/espectro/config.h
+++ b/keyboards/espectro/config.h
@@ -38,6 +38,11 @@
38/* COL2ROW or ROW2COL */ 38/* COL2ROW or ROW2COL */
39#define DIODE_DIRECTION COL2ROW 39#define DIODE_DIRECTION COL2ROW
40 40
41#define LED_NUM_LOCK_PIN B0
42#define LED_CAPS_LOCK_PIN B2
43#define LED_SCROLL_LOCK_PIN B1
44#define LED_PIN_ON_STATE 0
45
41/* number of backlight levels */ 46/* number of backlight levels */
42#define BACKLIGHT_PIN B6 47#define BACKLIGHT_PIN B6
43#define BACKLIGHT_LEVELS 5 48#define BACKLIGHT_LEVELS 5
diff --git a/keyboards/espectro/espectro.c b/keyboards/espectro/espectro.c
index 13030cdd4..64494c49c 100755
--- a/keyboards/espectro/espectro.c
+++ b/keyboards/espectro/espectro.c
@@ -14,63 +14,4 @@
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 16
17 17#include "espectro.h"
18#include QMK_KEYBOARD_H
19#include "quantum.h"
20
21
22void matrix_scan_kb(void) {
23 // put your looping keyboard code here
24 // runs every cycle (a lot)
25
26 matrix_scan_user();
27}
28
29bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
30 // put your per-action keyboard code here
31 // runs for every action, just before processing by the firmware
32
33 return process_record_user(keycode, record);
34}
35
36void led_set_kb(uint8_t usb_led) {
37 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
38
39 led_set_user(usb_led);
40}
41
42__attribute__ ((weak))
43void led_set_user(uint8_t usb_led) {
44
45 if (usb_led & (1 << USB_LED_NUM_LOCK)) {
46 DDRB |= (1 << 0); PORTB &= ~(1 << 0);
47 } else {
48 DDRB &= ~(1 << 0); PORTB &= ~(1 << 0);
49 }
50
51 if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
52 DDRB |= (1 << 2); PORTB &= ~(1 << 2);
53 } else {
54 DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
55 }
56
57 if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
58 DDRB |= (1 << 1); PORTB &= ~(1 << 1);
59 } else {
60 DDRB &= ~(1 << 1); PORTB &= ~(1 << 1);
61 }
62
63 if (usb_led & (1 << USB_LED_COMPOSE)) {
64
65 } else {
66
67 }
68
69 if (usb_led & (1 << USB_LED_KANA)) {
70
71 } else {
72
73 }
74
75}
76
diff --git a/keyboards/evil80/config.h b/keyboards/evil80/config.h
index ae507c74f..0f0e24529 100644
--- a/keyboards/evil80/config.h
+++ b/keyboards/evil80/config.h
@@ -19,16 +19,17 @@
19#define MATRIX_COL_PINS { B2, D0, D1, D2, D3, D5, D4, D6, D7, B4, B1, C6, C7, E6, F6, F7 } 19#define MATRIX_COL_PINS { B2, D0, D1, D2, D3, D5, D4, D6, D7, B4, B1, C6, C7, E6, F6, F7 }
20#define UNUSED_PINS 20#define UNUSED_PINS
21 21
22#define BACKLIGHT_PIN B5
23#define BACKLIGHT_BREATHING
24
25/* COL2ROW or ROW2COL */ 22/* COL2ROW or ROW2COL */
26#define DIODE_DIRECTION COL2ROW 23#define DIODE_DIRECTION COL2ROW
27 24
28/* define if matrix has ghost */ 25/* define if matrix has ghost */
29//#define MATRIX_HAS_GHOST 26//#define MATRIX_HAS_GHOST
30 27
31/* number of backlight levels */ 28#define LED_CAPS_LOCK_PIN B6
29#define LED_SCROLL_LOCK_PIN B7
30
31#define BACKLIGHT_PIN B5
32#define BACKLIGHT_BREATHING
32#define BACKLIGHT_LEVELS 3 33#define BACKLIGHT_LEVELS 3
33 34
34/* Set 0 if debouncing isn't needed */ 35/* Set 0 if debouncing isn't needed */
diff --git a/keyboards/evil80/evil80.c b/keyboards/evil80/evil80.c
index d4653d049..471580fd8 100644
--- a/keyboards/evil80/evil80.c
+++ b/keyboards/evil80/evil80.c
@@ -1,47 +1 @@
1#include "evil80.h" #include "evil80.h"
2void matrix_init_kb(void) {
3 // put your keyboard start-up code here
4 // runs once when the firmware starts up
5 led_init_ports();
6 matrix_init_user();
7}
8
9void matrix_scan_kb(void) {
10 // put your looping keyboard code here
11 // runs every cycle (a lot)
12
13 matrix_scan_user();
14}
15
16bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
17 // put your per-action keyboard code here
18 // runs for every action, just before processing by the firmware
19
20 return process_record_user(keycode, record);
21}
22
23void led_init_ports(void) {
24 DDRB |= (1<<6) | (1<<7); // OUT
25}
26
27void led_set_kb(uint8_t usb_led) {
28 if (usb_led & (1<<USB_LED_CAPS_LOCK))
29 {
30 PORTB |= (1<<6); // HI
31 }
32 else
33 {
34 PORTB &= ~(1<<6); // LO
35 }
36
37 if (usb_led & (1<<USB_LED_SCROLL_LOCK))
38 {
39 PORTB |= (1<<7); // HI
40 }
41 else
42 {
43 PORTB &= ~(1<<7); // LO
44 }
45
46 led_set_user(usb_led);
47}
diff --git a/keyboards/fc660c/config.h b/keyboards/fc660c/config.h
index bba402ca4..a3f90237f 100644
--- a/keyboards/fc660c/config.h
+++ b/keyboards/fc660c/config.h
@@ -37,6 +37,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
37/* define if matrix has ghost */ 37/* define if matrix has ghost */
38//#define MATRIX_HAS_GHOST 38//#define MATRIX_HAS_GHOST
39 39
40#define LED_CAPS_LOCK_PIN B6
41#define LED_PIN_ON_STATE 0
42
40/* number of backlight levels */ 43/* number of backlight levels */
41// #define BACKLIGHT_LEVELS 1 44// #define BACKLIGHT_LEVELS 1
42 45
diff --git a/keyboards/fc660c/fc660c.c b/keyboards/fc660c/fc660c.c
index da6ba9e74..592697cb8 100644
--- a/keyboards/fc660c/fc660c.c
+++ b/keyboards/fc660c/fc660c.c
@@ -21,36 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
21#endif 21#endif
22 22
23void matrix_init_kb(void) { 23void matrix_init_kb(void) {
24 // put your keyboard start-up code here
25 // runs once when the firmware starts up
26
27#ifdef ACTUATION_DEPTH_ADJUSTMENT 24#ifdef ACTUATION_DEPTH_ADJUSTMENT
28 adjust_actuation_point(ACTUATION_DEPTH_ADJUSTMENT); 25 adjust_actuation_point(ACTUATION_DEPTH_ADJUSTMENT);
29#endif 26#endif
30 27
31 matrix_init_user(); 28 matrix_init_user();
32} 29}
33
34void matrix_scan_kb(void) {
35 // put your looping keyboard code here
36 // runs every cycle (a lot)
37
38 matrix_scan_user();
39}
40
41bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
42 // put your per-action keyboard code here
43 // runs for every action, just before processing by the firmware
44
45 return process_record_user(keycode, record);
46}
47
48void led_set_kb(uint8_t usb_led) {
49 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
50 PORTB &= ~(1<<6);
51 } else {
52 PORTB |= (1<<6);
53 }
54
55 led_set_user(usb_led);
56}
diff --git a/keyboards/gh60/revc/config.h b/keyboards/gh60/revc/config.h
index 8c24b1e7e..ccb95a989 100644
--- a/keyboards/gh60/revc/config.h
+++ b/keyboards/gh60/revc/config.h
@@ -57,6 +57,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
57/* define if matrix has ghost (lacks anti-ghosting diodes) */ 57/* define if matrix has ghost (lacks anti-ghosting diodes) */
58//#define MATRIX_HAS_GHOST 58//#define MATRIX_HAS_GHOST
59 59
60#define LED_CAPS_LOCK_PIN B2
61#define LED_PIN_ON_STATE 0
62
60/* number of backlight levels */ 63/* number of backlight levels */
61#define BACKLIGHT_LEVELS 3 64#define BACKLIGHT_LEVELS 3
62 65
diff --git a/keyboards/gh60/revc/revc.c b/keyboards/gh60/revc/revc.c
index e06739d2b..47dd5410f 100644
--- a/keyboards/gh60/revc/revc.c
+++ b/keyboards/gh60/revc/revc.c
@@ -1,27 +1 @@
1#include "revc.h" #include "revc.h"
2
3
4extern inline void gh60_caps_led_on(void);
5extern inline void gh60_poker_leds_on(void);
6extern inline void gh60_fn_led_on(void);
7extern inline void gh60_esc_led_on(void);
8extern inline void gh60_wasd_leds_on(void);
9
10extern inline void gh60_caps_led_off(void);
11extern inline void gh60_poker_leds_off(void);
12extern inline void gh60_fn_led_off(void);
13extern inline void gh60_esc_led_off(void);
14extern inline void gh60_wasd_leds_off(void);
15
16
17void led_set_kb(uint8_t usb_led) {
18 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
19
20 if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
21 gh60_caps_led_on();
22 } else {
23 gh60_caps_led_off();
24 }
25
26 led_set_user(usb_led);
27}
diff --git a/keyboards/gh60/revc/revc.h b/keyboards/gh60/revc/revc.h
index 450c59020..a94322ad7 100644
--- a/keyboards/gh60/revc/revc.h
+++ b/keyboards/gh60/revc/revc.h
@@ -12,17 +12,17 @@
12 * B2 Capslock LED 12 * B2 Capslock LED
13 * B0 not connected 13 * B0 not connected
14 */ 14 */
15inline void gh60_caps_led_on(void) { setPinOutput(B2); writePinLow(B2); } 15static inline void gh60_caps_led_on(void) { setPinOutput(B2); writePinLow(B2); }
16inline void gh60_poker_leds_on(void) { setPinOutput(F4); writePinLow(F4); } 16static inline void gh60_poker_leds_on(void) { setPinOutput(F4); writePinLow(F4); }
17inline void gh60_fn_led_on(void) { setPinOutput(F5); writePinLow(F5); } 17static inline void gh60_fn_led_on(void) { setPinOutput(F5); writePinLow(F5); }
18inline void gh60_esc_led_on(void) { setPinOutput(F6); writePinLow(F6); } 18static inline void gh60_esc_led_on(void) { setPinOutput(F6); writePinLow(F6); }
19inline void gh60_wasd_leds_on(void) { setPinOutput(F7); writePinLow(F7); } 19static inline void gh60_wasd_leds_on(void) { setPinOutput(F7); writePinLow(F7); }
20 20
21inline void gh60_caps_led_off(void) { setPinInput(B2); } 21static inline void gh60_caps_led_off(void) { setPinInput(B2); }
22inline void gh60_poker_leds_off(void) { setPinInput(F4); } 22static inline void gh60_poker_leds_off(void) { setPinInput(F4); }
23inline void gh60_fn_led_off(void) { setPinInput(F5); } 23static inline void gh60_fn_led_off(void) { setPinInput(F5); }
24inline void gh60_esc_led_off(void) { setPinInput(F6); } 24static inline void gh60_esc_led_off(void) { setPinInput(F6); }
25inline void gh60_wasd_leds_off(void) { setPinInput(F7); } 25static inline void gh60_wasd_leds_off(void) { setPinInput(F7); }
26 26
27/* GH60 keymap definition macro 27/* GH60 keymap definition macro
28 * K2C, K31 and K3C are extra keys for ISO 28 * K2C, K31 and K3C are extra keys for ISO
diff --git a/keyboards/gh60/satan/config.h b/keyboards/gh60/satan/config.h
index 8c172314a..ac343782e 100644
--- a/keyboards/gh60/satan/config.h
+++ b/keyboards/gh60/satan/config.h
@@ -37,6 +37,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
37#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3 } 37#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3 }
38#define UNUSED_PINS 38#define UNUSED_PINS
39 39
40#define LED_NUM_LOCK_PIN B2
41#define LED_PIN_ON_STATE 0
42
40#define BACKLIGHT_PIN B6 43#define BACKLIGHT_PIN B6
41 44
42/* COL2ROW or ROW2COL */ 45/* COL2ROW or ROW2COL */
diff --git a/keyboards/gh60/satan/satan.c b/keyboards/gh60/satan/satan.c
index 8542a57c4..cd6508445 100644
--- a/keyboards/gh60/satan/satan.c
+++ b/keyboards/gh60/satan/satan.c
@@ -1,24 +1 @@
1#include "satan.h" #include "satan.h"
2
3void matrix_init_kb(void) {
4 matrix_init_user();
5 led_init_ports();
6};
7
8void matrix_scan_kb(void) {
9 matrix_scan_user();
10};
11
12void led_init_ports(void) {
13 setPinOutput(B2);
14}
15
16void led_set_kb(uint8_t usb_led) {
17 if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
18 // Turn Caps Lock LED on
19 writePinLow(B2);
20 } else {
21 // Turn Caps Lock LED off
22 writePinHigh(B2);
23 }
24}
diff --git a/keyboards/kinesis/stapelberg/config.h b/keyboards/kinesis/stapelberg/config.h
index 992480195..5037baebd 100644
--- a/keyboards/kinesis/stapelberg/config.h
+++ b/keyboards/kinesis/stapelberg/config.h
@@ -27,7 +27,12 @@
27 27
28/* COL2ROW or ROW2COL */ 28/* COL2ROW or ROW2COL */
29#define DIODE_DIRECTION COL2ROW 29#define DIODE_DIRECTION COL2ROW
30 30
31#define LED_NUM_LOCK_PIN F2
32#define LED_CAPS_LOCK_PIN F3
33#define LED_SCROLL_LOCK_PIN F1
34#define LED_COMPOSE_PIN F0
35#define LED_PIN_ON_STATE 0
31 36
32/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ 37/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
33#define DEBOUNCE 5 38#define DEBOUNCE 5
diff --git a/keyboards/kinesis/stapelberg/stapelberg.c b/keyboards/kinesis/stapelberg/stapelberg.c
index af407ac4f..a69679eef 100644
--- a/keyboards/kinesis/stapelberg/stapelberg.c
+++ b/keyboards/kinesis/stapelberg/stapelberg.c
@@ -1,61 +1 @@
1#include "stapelberg.h" #include "stapelberg.h"
2
3void matrix_init_kb(void) {
4 // put your keyboard start-up code here
5 // runs once when the firmware starts up
6 // * Set our LED pins as output
7 DDRF |= (1<<0); // Keypad LED
8 DDRF |= (1<<1); // ScrLock LED
9 DDRF |= (1<<2); // NumLock LED
10 DDRF |= (1<<3); // CapsLock LED
11
12 matrix_init_user();
13}
14
15void matrix_scan_kb(void) {
16 // put your looping keyboard code here
17 // runs every cycle (a lot)
18
19 matrix_scan_user();
20}
21
22bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
23 // put your per-action keyboard code here
24 // runs for every action, just before processing by the firmware
25
26 return process_record_user(keycode, record);
27}
28
29void led_init_ports() {
30 // * Set our LED pins as output
31 DDRF |= (1<<0); // Keypad LED
32 DDRF |= (1<<1); // ScrLock LED
33 DDRF |= (1<<2); // NumLock LED
34 DDRF |= (1<<3); // CapsLock LED
35}
36
37void led_set_kb(uint8_t usb_led) {
38 if (usb_led & (1<<USB_LED_COMPOSE)) {
39 PORTF &= ~(1<<0);
40 } else {
41 PORTF |= (1<<0);
42 }
43
44 if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
45 PORTF &= ~(1<<1);
46 } else {
47 PORTF |= (1<<1);
48 }
49
50 if (usb_led & (1<<USB_LED_NUM_LOCK)) {
51 PORTF &= ~(1<<2);
52 } else {
53 PORTF |= (1<<2);
54 }
55
56 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
57 PORTF &= ~(1<<3);
58 } else {
59 PORTF |= (1<<3);
60 }
61}
diff --git a/keyboards/noxary/260/260.c b/keyboards/noxary/260/260.c
index 9f577a2ae..a2f76a38a 100644
--- a/keyboards/noxary/260/260.c
+++ b/keyboards/noxary/260/260.c
@@ -14,48 +14,3 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16#include "260.h" 16#include "260.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
23void matrix_init_kb(void) {
24 // put your keyboard start-up code here
25 // runs once when the firmware starts up
26 setPinOutput(B1);
27 matrix_init_user();
28}
29
30/*
31void matrix_scan_kb(void) {
32 // put your looping keyboard code here
33 // runs every cycle (a lot)
34
35 matrix_scan_user();
36}
37
38bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
39 // put your per-action keyboard code here
40 // runs for every action, just before processing by the firmware
41
42 return process_record_user(keycode, record);
43}
44
45void led_set_kb(uint8_t usb_led) {
46 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
47
48 led_set_user(usb_led);
49}
50
51*/
52
53void led_set_kb(uint8_t usb_led) {
54 if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
55 writePinLow(B1);
56 } else {
57 writePinHigh(B1);
58 }
59
60 led_set_user(usb_led);
61} \ No newline at end of file
diff --git a/keyboards/noxary/260/config.h b/keyboards/noxary/260/config.h
index 379dbbf78..9876d09f4 100644
--- a/keyboards/noxary/260/config.h
+++ b/keyboards/noxary/260/config.h
@@ -48,6 +48,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
48/* COL2ROW, ROW2COL*/ 48/* COL2ROW, ROW2COL*/
49#define DIODE_DIRECTION COL2ROW 49#define DIODE_DIRECTION COL2ROW
50 50
51#define LED_CAPS_LOCK_PIN B1
52#define LED_PIN_ON_STATE 0
53
51/* 54/*
52 * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. 55 * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
53 */ 56 */
diff --git a/keyboards/playkbtw/ca66/ca66.c b/keyboards/playkbtw/ca66/ca66.c
index 43a648eca..91f4826f9 100644
--- a/keyboards/playkbtw/ca66/ca66.c
+++ b/keyboards/playkbtw/ca66/ca66.c
@@ -1,12 +1 @@
1#include "ca66.h" #include "ca66.h"
2
3void led_set_kb(uint8_t usb_led) {
4 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
5 if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
6 writePinHigh(D1);
7 } else {
8 writePinLow(D1);
9 }
10
11 led_set_user(usb_led);
12}
diff --git a/keyboards/playkbtw/ca66/config.h b/keyboards/playkbtw/ca66/config.h
index ff68cdac9..4e2d04072 100644
--- a/keyboards/playkbtw/ca66/config.h
+++ b/keyboards/playkbtw/ca66/config.h
@@ -22,6 +22,8 @@
22/* COL2ROW or ROW2COL */ 22/* COL2ROW or ROW2COL */
23#define DIODE_DIRECTION COL2ROW 23#define DIODE_DIRECTION COL2ROW
24 24
25#define LED_CAPS_LOCK_PIN D1
26
25/* number of backlight levels */ 27/* number of backlight levels */
26 28
27#define BACKLIGHT_PIN F0 29#define BACKLIGHT_PIN F0
diff --git a/keyboards/playkbtw/pk60/config.h b/keyboards/playkbtw/pk60/config.h
index 93e29951e..f4709697c 100644
--- a/keyboards/playkbtw/pk60/config.h
+++ b/keyboards/playkbtw/pk60/config.h
@@ -23,6 +23,9 @@
23/* COL2ROW or ROW2COL */ 23/* COL2ROW or ROW2COL */
24#define DIODE_DIRECTION COL2ROW 24#define DIODE_DIRECTION COL2ROW
25 25
26#define LED_CAPS_LOCK_PIN F4
27#define LED_PIN_ON_STATE 0
28
26/* number of backlight levels */ 29/* number of backlight levels */
27#define BACKLIGHT_PIN B7 30#define BACKLIGHT_PIN B7
28#ifdef BACKLIGHT_PIN 31#ifdef BACKLIGHT_PIN
diff --git a/keyboards/playkbtw/pk60/pk60.c b/keyboards/playkbtw/pk60/pk60.c
index a9da0ff22..909230def 100644
--- a/keyboards/playkbtw/pk60/pk60.c
+++ b/keyboards/playkbtw/pk60/pk60.c
@@ -1,35 +1 @@
1#include "pk60.h" #include "pk60.h"
2#include "led.h"
3
4void matrix_init_kb (void) {
5
6 matrix_init_user();
7 led_init_ports();
8
9}
10
11void matrix_scan_kb(void) {
12
13 matrix_scan_user();
14
15};
16
17void led_init_ports(void) {
18 // Set capslock LED pin as pinout
19 DDRF |= (1 << 4);
20 PORTF |= (1 << 4);
21
22}
23
24void led_set_kb(uint8_t usb_led) {
25
26 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
27 // Turn capslock on
28 PORTF &= ~(1 << 4);
29 } else {
30 // Turn capslock off
31 PORTF |= (1 << 4);
32 }
33 led_set_user(usb_led);
34
35} \ No newline at end of file
diff --git a/keyboards/redscarf_iiplus/verc/config.h b/keyboards/redscarf_iiplus/verc/config.h
index 3fecdcac3..d920596ec 100755
--- a/keyboards/redscarf_iiplus/verc/config.h
+++ b/keyboards/redscarf_iiplus/verc/config.h
@@ -49,10 +49,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
49/* COL2ROW, ROW2COL*/ 49/* COL2ROW, ROW2COL*/
50#define DIODE_DIRECTION COL2ROW 50#define DIODE_DIRECTION COL2ROW
51 51
52/* 52#define LED_NUM_LOCK_PIN E6
53 * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. 53#define LED_CAPS_LOCK_PIN C7
54 */ 54#define LED_PIN_ON_STATE 0
55//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
56 55
57#define BACKLIGHT_PIN B7 56#define BACKLIGHT_PIN B7
58// #define BACKLIGHT_BREATHING 57// #define BACKLIGHT_BREATHING
diff --git a/keyboards/redscarf_iiplus/verc/verc.c b/keyboards/redscarf_iiplus/verc/verc.c
index 9dfc26067..a235cdd53 100755
--- a/keyboards/redscarf_iiplus/verc/verc.c
+++ b/keyboards/redscarf_iiplus/verc/verc.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 "verc.h" 16#include "verc.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
22void 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
30void led_init_ports(void) {
31 setPinOutput(C7);
32 setPinOutput(E6);
33}
34
35void led_set_kb(uint8_t usb_led) {
36 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
37
38 if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
39 writePinLow(C7);
40 } else {
41 writePinHigh(C7);
42 }
43
44 if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
45 writePinLow(E6);
46 } else {
47 writePinHigh(E6);
48 }
49
50 led_set_user(usb_led);
51}
diff --git a/keyboards/sentraq/s65_plus/config.h b/keyboards/sentraq/s65_plus/config.h
index 51aacfc19..f1f3512c6 100644
--- a/keyboards/sentraq/s65_plus/config.h
+++ b/keyboards/sentraq/s65_plus/config.h
@@ -20,6 +20,9 @@
20#define MATRIX_COL_PINS { F6, F5, F4, F1, F0, E6, B0, B1, D5, B2, B3, D0, D1, D2, D4, D6, D7, F7 } 20#define MATRIX_COL_PINS { F6, F5, F4, F1, F0, E6, B0, B1, D5, B2, B3, D0, D1, D2, D4, D6, D7, F7 }
21#define UNUSED_PINS 21#define UNUSED_PINS
22 22
23#define LED_CAPS_LOCK_PIN B7
24#define LED_PIN_ON_STATE 0
25
23/* number of backlight levels */ 26/* number of backlight levels */
24#define BACKLIGHT_PIN B7 27#define BACKLIGHT_PIN B7
25#define BACKLIGHT_LEVELS 3 28#define BACKLIGHT_LEVELS 3
diff --git a/keyboards/sentraq/s65_plus/s65_plus.c b/keyboards/sentraq/s65_plus/s65_plus.c
index 3eaaa3717..7b20ee069 100644
--- a/keyboards/sentraq/s65_plus/s65_plus.c
+++ b/keyboards/sentraq/s65_plus/s65_plus.c
@@ -1,24 +1 @@
1#include "s65_plus.h" #include "s65_plus.h"
2#include "led.h"
3
4void 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};
9
10void matrix_scan_kb(void) {
11 // put your looping keyboard code here
12 // runs every cycle (a lot)
13 matrix_scan_user();
14};
15
16void led_set_kb(uint8_t usb_led) {
17 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
18 // Turn capslock on
19 PORTB &= ~(1<<7);
20 } else {
21 // Turn capslock off
22 PORTB |= (1<<7);
23 }
24}
diff --git a/keyboards/tada68/config.h b/keyboards/tada68/config.h
index 41618e9d2..8c36a78bf 100755
--- a/keyboards/tada68/config.h
+++ b/keyboards/tada68/config.h
@@ -51,6 +51,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
51/* Locking resynchronize hack */ 51/* Locking resynchronize hack */
52#define LOCKING_RESYNC_ENABLE 52#define LOCKING_RESYNC_ENABLE
53 53
54#define LED_CAPS_LOCK_PIN B2
55#define LED_PIN_ON_STATE 0
56
54/* Backlight configuration */ 57/* Backlight configuration */
55#define BACKLIGHT_PIN B6 58#define BACKLIGHT_PIN B6
56#define BACKLIGHT_BREATHING 59#define BACKLIGHT_BREATHING
diff --git a/keyboards/tada68/tada68.c b/keyboards/tada68/tada68.c
index e4fab9810..34534de74 100755
--- a/keyboards/tada68/tada68.c
+++ b/keyboards/tada68/tada68.c
@@ -1,31 +1 @@
1#include "tada68.h" #include "tada68.h"
2#include "led.h"
3
4void 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
11void matrix_scan_kb(void) {
12 // put your looping keyboard code here
13 // runs every cycle (a lot)
14 matrix_scan_user();
15};
16
17void led_init_ports(void) {
18 // * Set our LED pins as output
19 DDRB |= (1<<2);
20}
21
22void led_set_kb(uint8_t usb_led) {
23 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
24 // Turn capslock on
25 PORTB &= ~(1<<2);
26 } else {
27 // Turn capslock off
28 PORTB |= (1<<2);
29 }
30 led_set_user(usb_led);
31}
diff --git a/keyboards/toad/config.h b/keyboards/toad/config.h
index 5f3eb43c2..016bd5413 100644
--- a/keyboards/toad/config.h
+++ b/keyboards/toad/config.h
@@ -23,6 +23,10 @@
23/* COL2ROW or ROW2COL */ 23/* COL2ROW or ROW2COL */
24#define DIODE_DIRECTION COL2ROW 24#define DIODE_DIRECTION COL2ROW
25 25
26#define LED_CAPS_LOCK_PIN B6
27#define LED_SCROLL_LOCK_PIN B5
28#define LED_PIN_ON_STATE 0
29
26/* number of backlight levels */ 30/* number of backlight levels */
27 31
28#ifdef BACKLIGHT_PIN 32#ifdef BACKLIGHT_PIN
diff --git a/keyboards/toad/toad.c b/keyboards/toad/toad.c
index bc4db0339..a58779507 100644
--- a/keyboards/toad/toad.c
+++ b/keyboards/toad/toad.c
@@ -1,18 +1 @@
1#include "toad.h" #include "toad.h"
2
3void led_set_user(uint8_t usb_led) {
4
5 //LED1
6 if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
7 DDRB |= (1 << 6); PORTB &= ~(1 << 6);
8 } else {
9 DDRB &= ~(1 << 6); PORTB &= ~(1 << 6);
10 }
11
12 //LED2
13 if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
14 DDRB |= (1 << 5); PORTB &= ~(1 << 5);
15 } else {
16 DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
17 }
18}
diff --git a/keyboards/westfoxtrot/aanzee/aanzee.c b/keyboards/westfoxtrot/aanzee/aanzee.c
index 17efdbe88..bc90dcf2d 100644
--- a/keyboards/westfoxtrot/aanzee/aanzee.c
+++ b/keyboards/westfoxtrot/aanzee/aanzee.c
@@ -1,55 +1,17 @@
1/* Copyright 2019 westfoxtrot 1/* Copyright 2019 westfoxtrot
2
3* 2*
4
5* This program is free software: you can redistribute it and/or modify 3* This program is free software: you can redistribute it and/or modify
6
7* it under the terms of the GNU General Public License as published by 4* it under the terms of the GNU General Public License as published by
8
9* the Free Software Foundation, either version 2 of the License, or 5* the Free Software Foundation, either version 2 of the License, or
10
11* (at your option) any later version. 6* (at your option) any later version.
12
13* 7*
14
15* This program is distributed in the hope that it will be useful, 8* This program is distributed in the hope that it will be useful,
16
17* but WITHOUT ANY WARRANTY; without even the implied warranty of 9* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
19* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
21* GNU General Public License for more details. 11* GNU General Public License for more details.
22
23* 12*
24
25* You should have received a copy of the GNU General Public License 13* You should have received a copy of the GNU General Public License
26
27* 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/>.
28
29*/ 15*/
30 16
31#include "aanzee.h" 17#include "aanzee.h"
32
33void keyboard_pre_init_kb(void) {
34
35 // Call the keyboard pre init code.
36 // Set our LED pins as output
37 setPinOutput(B2);
38
39 keyboard_pre_init_user();
40}
41
42void led_set_kb(uint8_t usb_led) {
43
44 if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
45
46 // Turn capslock on
47 writePinLow(B2);
48 } else {
49
50 // Turn capslock off
51 writePinHigh(B2);
52 }
53
54 led_set_user(usb_led);
55}
diff --git a/keyboards/westfoxtrot/aanzee/config.h b/keyboards/westfoxtrot/aanzee/config.h
index 69fc61387..73db816f6 100644
--- a/keyboards/westfoxtrot/aanzee/config.h
+++ b/keyboards/westfoxtrot/aanzee/config.h
@@ -40,6 +40,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
40/* COL2ROW or ROW2COL */ 40/* COL2ROW or ROW2COL */
41#define DIODE_DIRECTION COL2ROW 41#define DIODE_DIRECTION COL2ROW
42 42
43#define LED_CAPS_LOCK_PIN B2
44#define LED_PIN_ON_STATE 0
45
43#define BACKLIGHT_PIN B7 46#define BACKLIGHT_PIN B7
44#define BACKLIGHT_BREATHING 47#define BACKLIGHT_BREATHING
45#define BACKLIGHT_LEVELS 5 48#define BACKLIGHT_LEVELS 5
diff --git a/keyboards/xmmx/config.h b/keyboards/xmmx/config.h
index bee047bf0..5f9c305d1 100644
--- a/keyboards/xmmx/config.h
+++ b/keyboards/xmmx/config.h
@@ -23,6 +23,10 @@
23/* COL2ROW or ROW2COL */ 23/* COL2ROW or ROW2COL */
24#define DIODE_DIRECTION COL2ROW 24#define DIODE_DIRECTION COL2ROW
25 25
26#define LED_CAPS_LOCK_PIN B6
27#define LED_SCROLL_LOCK_PIN B5
28#define LED_PIN_ON_STATE 0
29
26/* number of backlight levels */ 30/* number of backlight levels */
27 31
28#ifdef BACKLIGHT_PIN 32#ifdef BACKLIGHT_PIN
diff --git a/keyboards/xmmx/xmmx.c b/keyboards/xmmx/xmmx.c
index 4d410e90a..399ae4eb4 100644
--- a/keyboards/xmmx/xmmx.c
+++ b/keyboards/xmmx/xmmx.c
@@ -1,18 +1 @@
1#include "xmmx.h" #include "xmmx.h"
2
3void led_set_user(uint8_t usb_led) {
4
5 //LED1
6 if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
7 DDRB |= (1 << 6); PORTB &= ~(1 << 6);
8 } else {
9 DDRB &= ~(1 << 6); PORTB &= ~(1 << 6);
10 }
11
12 //LED2
13 if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
14 DDRB |= (1 << 5); PORTB &= ~(1 << 5);
15 } else {
16 DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
17 }
18}