diff options
author | Joel Challis <git@zvecr.com> | 2020-11-21 19:11:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-21 19:11:24 +0000 |
commit | 23222625c201cd960a5b4a99ee52e74d4c13bba9 (patch) | |
tree | 0fc0f24d2a60fb9e327debaca0b9fac72716487a /keyboards/westfoxtrot/aanzee | |
parent | 4368611bfd87a544689ed10bb4450a39314bf1a1 (diff) | |
download | qmk_firmware-23222625c201cd960a5b4a99ee52e74d4c13bba9.tar.gz qmk_firmware-23222625c201cd960a5b4a99ee52e74d4c13bba9.zip |
Refactor to use led config - Part 5 (#10975)
* Refactor to use led config
* Refactor to use led config
* Refactor to use led config
Diffstat (limited to 'keyboards/westfoxtrot/aanzee')
-rw-r--r-- | keyboards/westfoxtrot/aanzee/aanzee.c | 38 | ||||
-rw-r--r-- | keyboards/westfoxtrot/aanzee/config.h | 3 |
2 files changed, 3 insertions, 38 deletions
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 | |||
33 | void 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 | |||
42 | void 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 |