diff options
author | Zick Wei <zick.wei@quanta.corp-partner.google.com> | 2020-11-06 12:11:56 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-11-18 02:24:21 +0000 |
commit | 9dc95ac4be74d4ad900955f4857a42ce7bf74613 (patch) | |
tree | 7959e76fb68a61c41f9f60fbb6c47a482aef07e0 | |
parent | 7f46efd099ef8c4b7695658ee5bd0136e3d25b74 (diff) | |
download | chrome-ec-9dc95ac4be74d4ad900955f4857a42ce7bf74613.tar.gz |
berknip: update led pulsing duration
This path update suspend led pulsing duration :
1s on, 6s off for saving power.
BUG=b:173072337
BRANCH=zork
TEST=verify suspend led behavior as intended.
Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com>
Change-Id: I7e4f937dee00e0e572c64bf6a6d7286f0be15a95
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2539711
Tested-by: Zick Wei <zick.wei@quanta.corp-partner.google.com>
Reviewed-by: Edward Hill <ecgh@chromium.org>
Commit-Queue: Edward Hill <ecgh@chromium.org>
-rw-r--r-- | board/berknip/led.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/board/berknip/led.c b/board/berknip/led.c index 2042186623..79d691ffac 100644 --- a/board/berknip/led.c +++ b/board/berknip/led.c @@ -20,7 +20,9 @@ #define POWER_LED_OFF 1 #define LED_TICKS_PER_CYCLE 10 +#define LED_TICKS_PER_CYCLE_S3 35 #define LED_ON_TICKS 5 +#define POWER_LED_ON_S3_TICKS 5 const enum ec_led_id supported_led_ids[] = { EC_LED_ID_LEFT_LED, @@ -145,10 +147,12 @@ static void led_set_battery(void) power_ticks++; - led_set_color_battery(RIGHT_PORT, power_ticks & 0x4 ? - LED_WHITE : LED_OFF); - led_set_color_battery(LEFT_PORT, power_ticks & 0x4 ? - LED_WHITE : LED_OFF); + led_set_color_battery(RIGHT_PORT, power_ticks + % LED_TICKS_PER_CYCLE_S3 < POWER_LED_ON_S3_TICKS + ? LED_WHITE : LED_OFF); + led_set_color_battery(LEFT_PORT, power_ticks + % LED_TICKS_PER_CYCLE_S3 < POWER_LED_ON_S3_TICKS + ? LED_WHITE : LED_OFF); return; } |