summaryrefslogtreecommitdiffhomepage
path: root/src/blog/fw-ec/led.diff.gsp
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-11-14 10:03:19 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-11-14 10:08:19 +0100
commit234a47f69f0957bf3e3d268749b01e112d53bb6c (patch)
treeb6da59bc4d1bc9e93c0b0631042949bfd7ac02bc /src/blog/fw-ec/led.diff.gsp
parent09e860d5a1e30901327aadb6bdfa0ee6afb00277 (diff)
Move /srp to /blog
Diffstat (limited to 'src/blog/fw-ec/led.diff.gsp')
-rw-r--r--src/blog/fw-ec/led.diff.gsp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/blog/fw-ec/led.diff.gsp b/src/blog/fw-ec/led.diff.gsp
new file mode 100644
index 0000000..ac7642f
--- /dev/null
+++ b/src/blog/fw-ec/led.diff.gsp
@@ -0,0 +1,32 @@
+@span .diff-meta {-diff --git a/board/hx20/led.c b/board/hx20/led.c}
+@span .diff-meta {-index a4dc4564e..dacf73fda 100644}
+@span .diff-meta {---- a/board/hx20/led.c}
+@span .diff-meta {-+++ b/board/hx20/led.c}
+@span .diff-loc {-\@\@ -283,22 +283,22 \@\@ static void led_set_power(void)}
+ /* don’t light up when at lid close */
+ if (!lid_is_open()) {
+ set_pwr_led_color(PWM_LED2, -1);
+@span .diff-del {-- enable_pwr_breath(PWM_LED2, EC_LED_COLOR_WHITE, breath_led_length, 0);}
+@span .diff-ins {-+ enable_pwr_breath(PWM_LED2, EC_LED_COLOR_GREEN, breath_led_length, 0);}
+ return;
+ \}
+
+ if (chipset_in_state(CHIPSET_STATE_ANY_SUSPEND))
+@span .diff-del {-- enable_pwr_breath(PWM_LED2, EC_LED_COLOR_WHITE, breath_led_length, 1);}
+@span .diff-ins {-+ enable_pwr_breath(PWM_LED2, EC_LED_COLOR_GREEN, breath_led_length, 1);}
+ else
+@span .diff-del {-- enable_pwr_breath(PWM_LED2, EC_LED_COLOR_WHITE, breath_led_length, 0);}
+@span .diff-ins {-+ enable_pwr_breath(PWM_LED2, EC_LED_COLOR_GREEN, breath_led_length, 0);}
+
+ if (chipset_in_state(CHIPSET_STATE_ON) | power_button_enable) {
+ if (charge_prevent_power_on(0))
+ set_pwr_led_color(PWM_LED2, (power_tick %
+ LED_TICKS_PER_CYCLE < LED_ON_TICKS) ?
+@span .diff-del {-- EC_LED_COLOR_WHITE : -1);}
+@span .diff-ins {-+ EC_LED_COLOR_GREEN : -1);}
+ else
+@span .diff-del {-- set_pwr_led_color(PWM_LED2, EC_LED_COLOR_WHITE);}
+@span .diff-ins {-+ set_pwr_led_color(PWM_LED2, EC_LED_COLOR_GREEN);}
+ \} else
+ set_pwr_led_color(PWM_LED2, -1);
+ \}