diff options
| author | Joel Challis <git@zvecr.com> | 2021-03-10 22:48:18 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-10 22:48:18 +0000 |
| commit | 790f94533c936409e6be56e8b638969b42350180 (patch) | |
| tree | 9da39389c6565e8755a9075be6c4fee95e6028af /keyboards/foxlab | |
| parent | 9089244db77d724f23ddfc01be370f9c029c8e6c (diff) | |
| download | qmk_firmware-790f94533c936409e6be56e8b638969b42350180.tar.gz qmk_firmware-790f94533c936409e6be56e8b638969b42350180.zip | |
Refactor to use led config - Part 6 (#12115)
* Convert to config
* Convert to config
* Convert to config
* Convert to config
* Convert to config
* Convert to config
* Convert to config
* Convert to config
* revert changes
Diffstat (limited to 'keyboards/foxlab')
| -rw-r--r-- | keyboards/foxlab/key65/hotswap/config.h | 3 | ||||
| -rw-r--r-- | keyboards/foxlab/key65/hotswap/hotswap.c | 17 | ||||
| -rw-r--r-- | keyboards/foxlab/key65/universal/config.h | 3 | ||||
| -rw-r--r-- | keyboards/foxlab/key65/universal/universal.c | 17 |
4 files changed, 6 insertions, 34 deletions
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 | } | ||
