diff options
author | Diana Z <dzigterman@chromium.org> | 2021-04-16 15:06:16 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-04-22 22:30:34 +0000 |
commit | 6ada099de9c62d6cc290be071fee4529ed86566c (patch) | |
tree | 52483243492845b3bb93e444060159a593692a67 /board/hatch/led.c | |
parent | 4746791009b75da679d44d45e8487c57c9191329 (diff) | |
download | chrome-ec-6ada099de9c62d6cc290be071fee4529ed86566c.tar.gz |
LED On/Off: Make battery LED optional
Currently, all boards using the LED On/Off module have battery LEDs.
However, if we'd like to expand support to Chromeboxes then the battery
LED must become optional.
BRANCH=None
BUG=b:185508707
TEST=make -j buildall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ieae098829ebe6c8b103f23d5abdbf70e7bcbdf2d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2832692
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/hatch/led.c')
-rw-r--r-- | board/hatch/led.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/board/hatch/led.c b/board/hatch/led.c index d6da1d098f..1c44d12d89 100644 --- a/board/hatch/led.c +++ b/board/hatch/led.c @@ -14,11 +14,12 @@ #define LED_ON_LVL 0 #define LED_OFF_LVL 1 -const int led_charge_lvl_1 = 5; +__override const int led_charge_lvl_1 = 5; -const int led_charge_lvl_2 = 95; +__override const int led_charge_lvl_2 = 95; -struct led_descriptor led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { +__override struct led_descriptor + led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = { [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} }, [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} }, [STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_WHITE, LED_INDEFINITE} }, @@ -37,7 +38,7 @@ const enum ec_led_id supported_led_ids[] = { const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); -void led_set_color_battery(enum ec_led_colors color) +__override void led_set_color_battery(enum ec_led_colors color) { switch (color) { case EC_LED_COLOR_AMBER: |