diff options
author | Nicolas Boichat <drinkcat@chromium.org> | 2017-09-22 15:59:53 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-09-22 08:08:55 -0700 |
commit | 877842889c678b8340abe9cac74566529d8bc3f4 (patch) | |
tree | 15eda219b02efc6490b22e863d334d59280c7452 | |
parent | c124d5aeed2cfcfc0f6ed5dd03576bfec524eb4d (diff) | |
download | chrome-ec-877842889c678b8340abe9cac74566529d8bc3f4.tar.gz |
charge_state_v2: dump_charge_state: Add cflush
The dump_charge_state (chgstate console command) is quite large,
and may get truncated, let's add 2 cflush at approximately
each third of the output.
BRANCH=none
BUG=b:66575472
TEST=On wand, type chgstate in EC console
Change-Id: Iaa87a6a77b9b6edb0bd8235a87297f8d63fe3085
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/678755
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r-- | common/charge_state_v2.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/charge_state_v2.c b/common/charge_state_v2.c index d577022a15..ae039c61d2 100644 --- a/common/charge_state_v2.c +++ b/common/charge_state_v2.c @@ -297,6 +297,7 @@ static void dump_charge_state(void) DUMP_CHG(status, "0x%x"); DUMP_CHG(option, "0x%x"); DUMP_CHG(flags, "0x%x"); + cflush(); ccprintf("batt.*:\n"); ccprintf("\ttemperature = %dC\n", DECI_KELVIN_TO_CELSIUS(curr.batt.temperature)); @@ -309,6 +310,7 @@ static void dump_charge_state(void) DUMP_BATT(remaining_capacity, "%dmAh"); DUMP_BATT(full_capacity, "%dmAh"); ccprintf("\tis_present = %s\n", batt_pres[curr.batt.is_present]); + cflush(); DUMP(requested_voltage, "%dmV"); DUMP(requested_current, "%dmA"); ccprintf("chg_ctl_mode = %d\n", chg_ctl_mode); |