diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2022-06-27 14:02:31 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-07-01 16:17:35 +0000 |
commit | 604456c88999694eb15119c74047090413310a87 (patch) | |
tree | 0146257daaf931ab96941021f1002015ba7c79b1 /board/reef/led.c | |
parent | 15822379106462ec410d890fbe0463c0c51a0ab6 (diff) | |
download | chrome-ec-604456c88999694eb15119c74047090413310a87.tar.gz |
board/reef/led.c: Format with clang-format
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: I4f5e91d9b0bbb65b6a5cf0f0172e8bbf0f05b0e1
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728883
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'board/reef/led.c')
-rw-r--r-- | board/reef/led.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/board/reef/led.c b/board/reef/led.c index 807b1c109c..c4b8e53e36 100644 --- a/board/reef/led.c +++ b/board/reef/led.c @@ -27,8 +27,7 @@ #define LED_ON_1SEC_TICKS 1 #define LED_ON_2SECS_TICKS 2 -const enum ec_led_id supported_led_ids[] = { - EC_LED_ID_BATTERY_LED}; +const enum ec_led_id supported_led_ids[] = { EC_LED_ID_BATTERY_LED }; const int supported_led_ids_count = ARRAY_SIZE(supported_led_ids); @@ -36,7 +35,7 @@ enum led_color { LED_OFF = 0, LED_BLUE, LED_AMBER, - LED_COLOR_COUNT /* Number of colors, not a color itself */ + LED_COLOR_COUNT /* Number of colors, not a color itself */ }; static int led_set_color_battery(enum led_color color) @@ -112,16 +111,19 @@ static void led_set_battery(void) } else if (chipset_in_state(CHIPSET_STATE_ANY_SUSPEND)) { /* Blink once every four seconds. */ led_set_color_battery( - (suspend_ticks % LED_TOTAL_4SECS_TICKS) - < LED_ON_1SEC_TICKS ? LED_AMBER : LED_OFF); + (suspend_ticks % LED_TOTAL_4SECS_TICKS) < + LED_ON_1SEC_TICKS ? + LED_AMBER : + LED_OFF); } else { led_set_color_battery(LED_OFF); } break; case PWR_STATE_ERROR: - led_set_color_battery( - (battery_ticks % LED_TOTAL_2SECS_TICKS < - LED_ON_1SEC_TICKS) ? LED_AMBER : LED_OFF); + led_set_color_battery((battery_ticks % LED_TOTAL_2SECS_TICKS < + LED_ON_1SEC_TICKS) ? + LED_AMBER : + LED_OFF); break; case PWR_STATE_CHARGE_NEAR_FULL: led_set_color_battery(LED_BLUE); @@ -130,7 +132,9 @@ static void led_set_battery(void) if (charge_get_flags() & CHARGE_FLAG_FORCE_IDLE) led_set_color_battery( (battery_ticks % LED_TOTAL_4SECS_TICKS < - LED_ON_2SECS_TICKS) ? LED_AMBER : LED_BLUE); + LED_ON_2SECS_TICKS) ? + LED_AMBER : + LED_BLUE); else led_set_color_battery(LED_BLUE); break; |