diff options
author | Thomas Voss <mail@thomasvoss.com> | 2023-08-05 23:30:58 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2023-08-05 23:30:58 +0200 |
commit | cfa35dcb2d332977e80a5811b6d42e9949bd4814 (patch) | |
tree | 370274078ded58e2a3bded288feaccfa01b2c1a6 /src/srp/fw-ec/fn-lock-2.diff.html | |
parent | 87dc34ab660fe91d3e77bde7548a9c6d05d28f03 (diff) |
Use a macro to wrap code in <code> tags
Diffstat (limited to 'src/srp/fw-ec/fn-lock-2.diff.html')
-rw-r--r-- | src/srp/fw-ec/fn-lock-2.diff.html | 72 |
1 files changed, 36 insertions, 36 deletions
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 @@ -<code><span class="diff-meta">diff --git a/board/hx20/keyboard_customization.c b/board/hx20/keyboard_customization.c</span></code> -<code><span class="diff-meta">index 2b91f2e0c..9a5050a0f 100644</span></code> -<code><span class="diff-meta">--- a/board/hx20/keyboard_customization.c</span></code> -<code><span class="diff-meta">+++ b/board/hx20/keyboard_customization.c</span></code> -<code><span class="diff-loc">@@ -249,6 +249,23 @@ int fn_table_set(int8_t pressed, uint32_t fn_bit)</span></code> -<code> return false;</code> -<code> }</code> -<code></code> -<code><span class="diff-ins">+static void hx20_update_fnkey_led(void) {</span></code> -<code><span class="diff-ins">+ /* Turn the capslock light into a fn-lock light */</span></code> -<code><span class="diff-ins">+ gpio_set_level(GPIO_CAP_LED_L, (Fn_key & FN_LOCKED) ? 1 : 0);</span></code> -<code><span class="diff-ins">+}</span></code> -<code><span class="diff-ins">+</span></code> -<code><span class="diff-ins">+/* Set the fn-lock light to the correct setting when the system resumes */</span></code> -<code><span class="diff-ins">+void hx20_fnkey_resume(void) {</span></code> -<code><span class="diff-ins">+ hx20_update_fnkey_led();</span></code> -<code><span class="diff-ins">+}</span></code> -<code><span class="diff-ins">+DECLARE_HOOK(HOOK_CHIPSET_RESUME, hx20_fnkey_resume, HOOK_PRIO_DEFAULT);</span></code> -<code><span class="diff-ins">+</span></code> -<code><span class="diff-ins">+/* Disable the fn-lock light on suspend */</span></code> -<code><span class="diff-ins">+void hx20_fnkey_suspend(void) {</span></code> -<code><span class="diff-ins">+ gpio_set_level(GPIO_CAP_LED_L, 0);</span></code> -<code><span class="diff-ins">+}</span></code> -<code><span class="diff-ins">+DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, hx20_fnkey_suspend, HOOK_PRIO_DEFAULT);</span></code> -<code><span class="diff-ins">+</span></code> -<code> void fnkey_shutdown(void) {</code> -<code> uint8_t current_kb = 0;</code> -<code></code> -<code><span class="diff-loc">@@ -420,6 +437,7 @@ int functional_hotkey(uint16_t *key_code, int8_t pressed)</span></code> -<code> Fn_key &= ~FN_LOCKED;</code> -<code> else</code> -<code> Fn_key |= FN_LOCKED;</code> -<code><span class="diff-ins">+ hx20_update_fnkey_led();</span></code> -<code> }</code> -<code> return EC_ERROR_UNIMPLEMENTED;</code> -<code> }</code> +<span class="diff-meta">diff --git a/board/hx20/keyboard_customization.c b/board/hx20/keyboard_customization.c</span> +<span class="diff-meta">index 2b91f2e0c..9a5050a0f 100644</span> +<span class="diff-meta">--- a/board/hx20/keyboard_customization.c</span> +<span class="diff-meta">+++ b/board/hx20/keyboard_customization.c</span> +<span class="diff-loc">@@ -249,6 +249,23 @@ int fn_table_set(int8_t pressed, uint32_t fn_bit)</span> + return false; + } + +<span class="diff-ins">+static void hx20_update_fnkey_led(void) {</span> +<span class="diff-ins">+ /* Turn the capslock light into a fn-lock light */</span> +<span class="diff-ins">+ gpio_set_level(GPIO_CAP_LED_L, (Fn_key & FN_LOCKED) ? 1 : 0);</span> +<span class="diff-ins">+}</span> +<span class="diff-ins">+</span> +<span class="diff-ins">+/* Set the fn-lock light to the correct setting when the system resumes */</span> +<span class="diff-ins">+void hx20_fnkey_resume(void) {</span> +<span class="diff-ins">+ hx20_update_fnkey_led();</span> +<span class="diff-ins">+}</span> +<span class="diff-ins">+DECLARE_HOOK(HOOK_CHIPSET_RESUME, hx20_fnkey_resume, HOOK_PRIO_DEFAULT);</span> +<span class="diff-ins">+</span> +<span class="diff-ins">+/* Disable the fn-lock light on suspend */</span> +<span class="diff-ins">+void hx20_fnkey_suspend(void) {</span> +<span class="diff-ins">+ gpio_set_level(GPIO_CAP_LED_L, 0);</span> +<span class="diff-ins">+}</span> +<span class="diff-ins">+DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, hx20_fnkey_suspend, HOOK_PRIO_DEFAULT);</span> +<span class="diff-ins">+</span> + void fnkey_shutdown(void) { + uint8_t current_kb = 0; + +<span class="diff-loc">@@ -420,6 +437,7 @@ int functional_hotkey(uint16_t *key_code, int8_t pressed)</span> + Fn_key &= ~FN_LOCKED; + else + Fn_key |= FN_LOCKED; +<span class="diff-ins">+ hx20_update_fnkey_led();</span> + } + return EC_ERROR_UNIMPLEMENTED; + } |