From fd0cea92e4efb0bb295f8cf85c1d291511860696 Mon Sep 17 00:00:00 2001 From: Ananya Kirti Date: Sun, 1 Aug 2021 17:22:03 +0530 Subject: [PATCH 1/2] Added CapsLED and ScrollLock LEDs Added CapsLED and ScrollLock LEDs --- keyboards/hp69/config.h | 4 ++++ keyboards/hp69/keymaps/via/keymap.c | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/keyboards/hp69/config.h b/keyboards/hp69/config.h index 06dd57145ca8..ba6e55f86d43 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 d47308c8ba22..9cc4694a1ab9 100644 --- a/keyboards/hp69/keymaps/via/keymap.c +++ b/keyboards/hp69/keymaps/via/keymap.c @@ -46,4 +46,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), +}; + + +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + switch (layer) { + case 0: + writePinLow(A7); + break; + case 1: + writePinHigh(A7); + break; + } }; \ No newline at end of file From e4a98cfd11af48fe5b3f6624545400884951a07b Mon Sep 17 00:00:00 2001 From: Ananya Kirti Date: Mon, 2 Aug 2021 12:05:45 +0530 Subject: [PATCH 2/2] Update keyboards/hp69/keymaps/via/keymap.c following darshan's advice Co-authored-by: Drashna Jaelre --- keyboards/hp69/keymaps/via/keymap.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/keyboards/hp69/keymaps/via/keymap.c b/keyboards/hp69/keymaps/via/keymap.c index 9cc4694a1ab9..d72bdbf0b131 100644 --- a/keyboards/hp69/keymaps/via/keymap.c +++ b/keyboards/hp69/keymaps/via/keymap.c @@ -50,13 +50,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); - switch (layer) { - case 0: - writePinLow(A7); - break; - case 1: - writePinHigh(A7); - break; - } -}; \ No newline at end of file + 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; +};