diff options
author | Devin Lu <Devin.Lu@quantatw.com> | 2021-12-08 11:09:04 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-12-08 11:25:58 +0000 |
commit | 1bb6819da8bebc1cfd592dca362c2024671a2402 (patch) | |
tree | 84affeb845189d72b937c0335079f3e54b60b6b1 | |
parent | 4f7cd7509d7a02b1d5f3f0fd3885202350b576f1 (diff) | |
download | chrome-ec-1bb6819da8bebc1cfd592dca362c2024671a2402.tar.gz |
redrix: Blinking with each side LED while battery error.
This patch fixes the battery error LED should be blinking on each side.
BUG=b:208912133
BRANCH=none
TEST=Verify LED blink quickly while battery error on each side.
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Change-Id: Ifaa2c5a09b32bdd1329839e6031d127fda2e66f8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3322216
Reviewed-by: Boris Mittelberg <bmbm@google.com>
-rw-r--r-- | board/redrix/led.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/board/redrix/led.c b/board/redrix/led.c index ca98daaf63..96ccae2689 100644 --- a/board/redrix/led.c +++ b/board/redrix/led.c @@ -189,8 +189,15 @@ static void led_set_battery(void) } break; case PWR_STATE_ERROR: - set_active_port_color((battery_ticks & 0x1) ? - LED_AMBER : LED_OFF); + if (led_auto_control_is_enabled(EC_LED_ID_RIGHT_LED)) { + led_set_color_battery(RIGHT_PORT, (battery_ticks & 0x1) + ? LED_AMBER : LED_OFF); + } + + if (led_auto_control_is_enabled(EC_LED_ID_LEFT_LED)) { + led_set_color_battery(LEFT_PORT, (battery_ticks & 0x1) + ? LED_AMBER : LED_OFF); + } break; case PWR_STATE_CHARGE_NEAR_FULL: set_active_port_color(LED_WHITE); |