From c02666c4cbdae772698f2cb252a2a791225f81a9 Mon Sep 17 00:00:00 2001 From: Ramon Imbao Date: Fri, 14 Aug 2020 21:56:27 +0800 Subject: [PATCH] Add indicator LEDs for GHS.RAR (#10028) * Add indicator LEDs for GHS.RAR * Update keyboards/ghs/rar/rar.c Co-authored-by: Joel Challis Co-authored-by: Joel Challis --- keyboards/ghs/rar/rar.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/keyboards/ghs/rar/rar.c b/keyboards/ghs/rar/rar.c index 72f0654fc..8f7ae3ba6 100644 --- a/keyboards/ghs/rar/rar.c +++ b/keyboards/ghs/rar/rar.c @@ -15,3 +15,22 @@ */ #include "rar.h" + +void keyboard_pre_init_kb(void) { + // Set our LED pins as output. + setPinOutput(B1); + setPinOutput(B3); + + keyboard_pre_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + + if (res) { + writePin(B1, led_state.caps_lock); + writePin(B3, led_state.scroll_lock); + } + + return res; +}