diff options
author | fauxpark <[email protected]> | 2020-01-22 13:21:47 +1100 |
---|---|---|
committer | Drashna Jaelre <[email protected]> | 2020-01-21 18:21:47 -0800 |
commit | ba264c69c28dd36ab8bd7eda1ba19ecf51eae6a9 (patch) | |
tree | 17ee56b0444b4bf25d5a6e205dac28e2e8c045d9 /keyboards/cospad/cospad.c | |
parent | 8e500c36709d6b3c1d1906db22d635ea55f74e70 (diff) | |
download | qmk_firmware-ba264c69c28dd36ab8bd7eda1ba19ecf51eae6a9.tar.gz qmk_firmware-ba264c69c28dd36ab8bd7eda1ba19ecf51eae6a9.zip |
[Keyboard] Cospad refactor (#7957)0.7.116
* Cospad refactor
* Add num lock indicator code
* Add led_init_ports()
* Revert change to matrix position blanks
* Define BACKLIGHT_ON_STATE explicitly, in anticipation of PR6749
Diffstat (limited to 'keyboards/cospad/cospad.c')
-rw-r--r-- | keyboards/cospad/cospad.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/keyboards/cospad/cospad.c b/keyboards/cospad/cospad.c index e7ef71f874..c1f3a70479 100644 --- a/keyboards/cospad/cospad.c +++ b/keyboards/cospad/cospad.c @@ -1,5 +1,4 @@ - -/* Copyright 2019 +/* Copyright 2020 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,18 +15,18 @@ */ #include "cospad.h" -#ifdef BACKLIGHT_ENABLE - -void backlight_init_ports(void) { - setPinOutput(F7); +void keyboard_pre_init_kb(void) { + led_init_ports(); + keyboard_pre_init_user(); } -void backlight_set(uint8_t level) { - writePin(F7, !!level); +void led_init_ports(void) { + setPinOutput(B2); } -void backlight_task(void) { - // do nothing - as default implementation of software PWM does not work +bool led_update_kb(led_t led_state) { + if (led_update_user(led_state)) { + writePin(B2, !led_state.num_lock); + } + return true; } - -#endif //BACKLIGHT_ENABLE |