diff options
| author | fauxpark <fauxpark@gmail.com> | 2020-01-19 18:00:32 +1100 |
|---|---|---|
| committer | James Young <18669334+noroadsleft@users.noreply.github.com> | 2020-01-18 23:00:32 -0800 |
| commit | f5209aa4e941c7f3a942ef4a7e256ab432ec98ce (patch) | |
| tree | 29c2a0d197050ff2accb920731ddb1d022cb2a90 /keyboards/facew | |
| parent | eb5d267e637db4c2c639932b8c8176bf47dff78f (diff) | |
| download | qmk_firmware-f5209aa4e941c7f3a942ef4a7e256ab432ec98ce.tar.gz qmk_firmware-f5209aa4e941c7f3a942ef4a7e256ab432ec98ce.zip | |
Remove custom backlight code for PS2AVRGB boards (#7775)
* Remove custom backlight code for PS2AVRGB boards
* Remove custom driver setting
* BACKLIGHT_BREATHING goes in config.h, not here
* Don't need to include backlight.c again here either
* Turn on backlight for Canoe
* Disable console on a few boards due to oversize
Diffstat (limited to 'keyboards/facew')
| -rw-r--r-- | keyboards/facew/config.h | 3 | ||||
| -rw-r--r-- | keyboards/facew/facew.c | 37 | ||||
| -rw-r--r-- | keyboards/facew/rules.mk | 2 |
3 files changed, 17 insertions, 25 deletions
diff --git a/keyboards/facew/config.h b/keyboards/facew/config.h index 9a31f9278..0dc35e625 100644 --- a/keyboards/facew/config.h +++ b/keyboards/facew/config.h | |||
| @@ -37,5 +37,6 @@ 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 BACKLIGHT_LEVELS 1 | 40 | #define BACKLIGHT_PIN D4 |
| 41 | #define BACKLIGHT_LEVELS 3 | ||
| 41 | #define RGBLIGHT_ANIMATIONS | 42 | #define RGBLIGHT_ANIMATIONS |
diff --git a/keyboards/facew/facew.c b/keyboards/facew/facew.c index fa58f0cf7..fc176466f 100644 --- a/keyboards/facew/facew.c +++ b/keyboards/facew/facew.c | |||
| @@ -17,30 +17,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 17 | 17 | ||
| 18 | #include "facew.h" | 18 | #include "facew.h" |
| 19 | 19 | ||
| 20 | void backlight_init_ports(void) { | 20 | void keyboard_pre_init_kb(void) { |
| 21 | setPinOutput(D0); | 21 | led_init_ports(); |
| 22 | setPinOutput(D1); | 22 | keyboard_pre_init_user(); |
| 23 | setPinOutput(D4); | 23 | } |
| 24 | setPinOutput(D6); | ||
| 25 | 24 | ||
| 26 | writePinLow(D0); | 25 | void led_init_ports(void) { |
| 27 | writePinLow(D1); | 26 | setPinOutput(D0); |
| 28 | writePinLow(D4); | 27 | setPinOutput(D1); |
| 29 | writePinLow(D6); | 28 | writePinHigh(D0); |
| 29 | writePinHigh(D1); | ||
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | void backlight_set(uint8_t level) { | 32 | bool led_update_kb(led_t led_state) { |
| 33 | if (level == 0) { | 33 | if (led_update_user(led_state)) { |
| 34 | // Turn out the lights | 34 | writePin(D1, !led_state.caps_lock); |
| 35 | writePinLow(D0); | 35 | } |
| 36 | writePinLow(D1); | 36 | return true; |
| 37 | writePinLow(D4); | ||
| 38 | writePinLow(D6); | ||
| 39 | } else { | ||
| 40 | // Turn on the lights | ||
| 41 | writePinHigh(D0); | ||
| 42 | writePinHigh(D1); | ||
| 43 | writePinHigh(D4); | ||
| 44 | writePinHigh(D6); | ||
| 45 | } | ||
| 46 | } | 37 | } |
diff --git a/keyboards/facew/rules.mk b/keyboards/facew/rules.mk index c4117d15d..81cfb758c 100644 --- a/keyboards/facew/rules.mk +++ b/keyboards/facew/rules.mk | |||
| @@ -15,7 +15,7 @@ BOOTLOADER = bootloadHID | |||
| 15 | BOOTMAGIC_ENABLE = no | 15 | BOOTMAGIC_ENABLE = no |
| 16 | MOUSEKEY_ENABLE = yes | 16 | MOUSEKEY_ENABLE = yes |
| 17 | EXTRAKEY_ENABLE = yes | 17 | EXTRAKEY_ENABLE = yes |
| 18 | CONSOLE_ENABLE = yes | 18 | CONSOLE_ENABLE = no |
| 19 | COMMAND_ENABLE = yes | 19 | COMMAND_ENABLE = yes |
| 20 | BACKLIGHT_ENABLE = yes | 20 | BACKLIGHT_ENABLE = yes |
| 21 | RGBLIGHT_ENABLE = yes | 21 | RGBLIGHT_ENABLE = yes |
