aboutsummaryrefslogtreecommitdiff
path: root/keyboards/cospad
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2020-11-08 22:31:16 +0000
committerGitHub <noreply@github.com>2020-11-08 22:31:16 +0000
commit1ff5ee255fadcd6bfc4defb68ef097d67ebd40ad (patch)
tree559d771e6c2490ea7816b095b0e6e9a196462ec0 /keyboards/cospad
parent9cd3ffa5ba1187c0bc11b613078d89b503dcf419 (diff)
downloadqmk_firmware-1ff5ee255fadcd6bfc4defb68ef097d67ebd40ad.tar.gz
qmk_firmware-1ff5ee255fadcd6bfc4defb68ef097d67ebd40ad.zip
Indicator LEDs as config (#10816)
* First pass * Add config options to docs * Update some wording * Slight tidy up of backlight caps logic * Init pin to correct state * Move init location * Reverse default state
Diffstat (limited to 'keyboards/cospad')
-rw-r--r--keyboards/cospad/config.h3
-rw-r--r--keyboards/cospad/cospad.c16
2 files changed, 3 insertions, 16 deletions
diff --git a/keyboards/cospad/config.h b/keyboards/cospad/config.h
index 8d2994b7b..648fa29a6 100644
--- a/keyboards/cospad/config.h
+++ b/keyboards/cospad/config.h
@@ -53,6 +53,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
53 */ 53 */
54#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 54#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
55 55
56#define LED_NUM_LOCK_PIN B2
57#define LED_PIN_ON_STATE 0
58
56#define BACKLIGHT_PIN F7 59#define BACKLIGHT_PIN F7
57// #define BACKLIGHT_BREATHING 60// #define BACKLIGHT_BREATHING
58#define BACKLIGHT_LEVELS 3 61#define BACKLIGHT_LEVELS 3
diff --git a/keyboards/cospad/cospad.c b/keyboards/cospad/cospad.c
index c1f3a7047..e7772f290 100644
--- a/keyboards/cospad/cospad.c
+++ b/keyboards/cospad/cospad.c
@@ -14,19 +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 "cospad.h" 16#include "cospad.h"
17
18void keyboard_pre_init_kb(void) {
19 led_init_ports();
20 keyboard_pre_init_user();
21}
22
23void led_init_ports(void) {
24 setPinOutput(B2);
25}
26
27bool led_update_kb(led_t led_state) {
28 if (led_update_user(led_state)) {
29 writePin(B2, !led_state.num_lock);
30 }
31 return true;
32}