From b046bffcb8367b4238273e3ccb7de9b799fbec7c Mon Sep 17 00:00:00 2001 From: Ananya Kirti Date: Sun, 8 Aug 2021 10:11:15 +0530 Subject: [PATCH] [Keyboard] Added CapsLED and ScrollLock LEDs (#13837) Co-authored-by: Drashna Jaelre --- keyboards/hp69/config.h | 4 ++++ keyboards/hp69/keymaps/via/keymap.c | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/keyboards/hp69/config.h b/keyboards/hp69/config.h index 06dd57145..ba6e55f86 100644 --- a/keyboards/hp69/config.h +++ b/keyboards/hp69/config.h @@ -47,7 +47,11 @@ along with this program. If not, see . #define RGB_DI_PIN A3 #define RGBLED_NUM 20 #define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_SLEEP #define AUDIO_PIN A5 #define AUDIO_PIN_ALT A4 #define AUDIO_PIN_ALT_AS_NEGATIVE + +#define LED_CAPS_LOCK_PIN A6 +#define LED_SCROLL_LOCK_PIN A7 \ No newline at end of file diff --git a/keyboards/hp69/keymaps/via/keymap.c b/keyboards/hp69/keymaps/via/keymap.c index d47308c8b..d72bdbf0b 100644 --- a/keyboards/hp69/keymaps/via/keymap.c +++ b/keyboards/hp69/keymaps/via/keymap.c @@ -46,4 +46,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), -}; \ No newline at end of file +}; + + +void matrix_scan_user(void) { + writePin(A7, layer_state_is(1)); +} + +bool led_update_user(led_t led_state) { + writePin(LED_CAPS_LOCK_PIN, !led_state.caps_lock); + return false; +};