From cfa35dcb2d332977e80a5811b6d42e9949bd4814 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sat, 5 Aug 2023 23:30:58 +0200 Subject: Use a macro to wrap code in tags --- src/srp/fw-ec/fn-lock-2.diff.html | 72 +++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'src/srp/fw-ec/fn-lock-2.diff.html') diff --git a/src/srp/fw-ec/fn-lock-2.diff.html b/src/srp/fw-ec/fn-lock-2.diff.html index b3880e0..f1a7a39 100644 --- a/src/srp/fw-ec/fn-lock-2.diff.html +++ b/src/srp/fw-ec/fn-lock-2.diff.html @@ -1,36 +1,36 @@ -diff --git a/board/hx20/keyboard_customization.c b/board/hx20/keyboard_customization.c -index 2b91f2e0c..9a5050a0f 100644 ---- a/board/hx20/keyboard_customization.c -+++ b/board/hx20/keyboard_customization.c -@@ -249,6 +249,23 @@ int fn_table_set(int8_t pressed, uint32_t fn_bit) - return false; - } - -+static void hx20_update_fnkey_led(void) { -+ /* Turn the capslock light into a fn-lock light */ -+ gpio_set_level(GPIO_CAP_LED_L, (Fn_key & FN_LOCKED) ? 1 : 0); -+} -+ -+/* Set the fn-lock light to the correct setting when the system resumes */ -+void hx20_fnkey_resume(void) { -+ hx20_update_fnkey_led(); -+} -+DECLARE_HOOK(HOOK_CHIPSET_RESUME, hx20_fnkey_resume, HOOK_PRIO_DEFAULT); -+ -+/* Disable the fn-lock light on suspend */ -+void hx20_fnkey_suspend(void) { -+ gpio_set_level(GPIO_CAP_LED_L, 0); -+} -+DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, hx20_fnkey_suspend, HOOK_PRIO_DEFAULT); -+ - void fnkey_shutdown(void) { - uint8_t current_kb = 0; - -@@ -420,6 +437,7 @@ int functional_hotkey(uint16_t *key_code, int8_t pressed) - Fn_key &= ~FN_LOCKED; - else - Fn_key |= FN_LOCKED; -+ hx20_update_fnkey_led(); - } - return EC_ERROR_UNIMPLEMENTED; - } +diff --git a/board/hx20/keyboard_customization.c b/board/hx20/keyboard_customization.c +index 2b91f2e0c..9a5050a0f 100644 +--- a/board/hx20/keyboard_customization.c ++++ b/board/hx20/keyboard_customization.c +@@ -249,6 +249,23 @@ int fn_table_set(int8_t pressed, uint32_t fn_bit) + return false; + } + ++static void hx20_update_fnkey_led(void) { ++ /* Turn the capslock light into a fn-lock light */ ++ gpio_set_level(GPIO_CAP_LED_L, (Fn_key & FN_LOCKED) ? 1 : 0); ++} ++ ++/* Set the fn-lock light to the correct setting when the system resumes */ ++void hx20_fnkey_resume(void) { ++ hx20_update_fnkey_led(); ++} ++DECLARE_HOOK(HOOK_CHIPSET_RESUME, hx20_fnkey_resume, HOOK_PRIO_DEFAULT); ++ ++/* Disable the fn-lock light on suspend */ ++void hx20_fnkey_suspend(void) { ++ gpio_set_level(GPIO_CAP_LED_L, 0); ++} ++DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, hx20_fnkey_suspend, HOOK_PRIO_DEFAULT); ++ + void fnkey_shutdown(void) { + uint8_t current_kb = 0; + +@@ -420,6 +437,7 @@ int functional_hotkey(uint16_t *key_code, int8_t pressed) + Fn_key &= ~FN_LOCKED; + else + Fn_key |= FN_LOCKED; ++ hx20_update_fnkey_led(); + } + return EC_ERROR_UNIMPLEMENTED; + } -- cgit v1.2.3