summaryrefslogtreecommitdiff
path: root/board/fleex
diff options
context:
space:
mode:
authormatt_wang <matt_wang@compal.corp-partner.google.com>2018-09-27 09:30:51 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-10-04 00:37:03 -0700
commit58db3a6828425fcd2f1ca961c52d5d7803adafd9 (patch)
tree31329b431db655c13d1331cbc601b2559d913b20 /board/fleex
parent0ab1b5f90f27fc42972adfbb791b9c417a4e4ead (diff)
downloadchrome-ec-58db3a6828425fcd2f1ca961c52d5d7803adafd9.tar.gz
Fleex:Add define OCTOPUS_BATT_FUEL_LOW_LED
Flash amber led when the battery critical low and discharge. BUG=b:109872754 BRANCH=none TEST=Verify on Fleex will flash amber led when the battery critical low and discharge. Change-Id: Ia883ca179e868ef825879c6abe3681f1f7471288 Signed-off-by: matt_wang <matt_wang@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/1247722 Commit-Ready: Raymond Chou <raymond_chou@compal.corp-partner.google.com> Tested-by: Matt Wang <matt_wang@compal.corp-partner.google.com> Reviewed-by: Raymond Chou <raymond_chou@compal.corp-partner.google.com> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'board/fleex')
-rw-r--r--board/fleex/board.h1
-rw-r--r--board/fleex/led.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/board/fleex/board.h b/board/fleex/board.h
index 8ccecb5f25..625be8387c 100644
--- a/board/fleex/board.h
+++ b/board/fleex/board.h
@@ -21,6 +21,7 @@
#define CONFIG_CMD_ACCEL_INFO
#define CONFIG_LED_COMMON
+#define OCTOPUS_BATT_FUEL_LOW_LED 10
/* Sensors */
#define CONFIG_ACCEL_LIS2DE /* Lid accel */
diff --git a/board/fleex/led.c b/board/fleex/led.c
index a58def114a..32a3855bd2 100644
--- a/board/fleex/led.c
+++ b/board/fleex/led.c
@@ -24,6 +24,8 @@ struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = {
[STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} },
[STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_WHITE, LED_INDEFINITE} },
[STATE_DISCHARGE_S0] = {{EC_LED_COLOR_WHITE, LED_INDEFINITE} },
+ [STATE_DISCHARGE_S0_BAT_LOW] = {{EC_LED_COLOR_AMBER, 1 * LED_ONE_SEC},
+ {LED_OFF, 1 * LED_ONE_SEC} },
[STATE_DISCHARGE_S3] = {{EC_LED_COLOR_WHITE, 1 * LED_ONE_SEC},
{LED_OFF, 1 * LED_ONE_SEC} },
[STATE_DISCHARGE_S5] = {{LED_OFF, LED_INDEFINITE} },