summaryrefslogtreecommitdiff
path: root/include/ec_commands.h
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2021-03-15 19:58:15 -0700
committerCommit Bot <commit-bot@chromium.org>2021-03-18 16:00:10 +0000
commit2913c2f6c5afa41f086a6f0242165cbdf9dad730 (patch)
treef7b8774ee99840fe8b4adf5339427381eb631411 /include/ec_commands.h
parent9fbcb24c53e5322044e5d71456d1fc0256b2e225 (diff)
downloadchrome-ec-2913c2f6c5afa41f086a6f0242165cbdf9dad730.tar.gz
PCHG: Check array sizes for state and event texts
This patch makes a compiler check array sizes used to stringify PCHG states and events. BUG=b:173235954 BRANCH=trogdor TEST=make Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I13dc399dc973d8a661492236668c22b323e7c1c4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2765423 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'include/ec_commands.h')
-rw-r--r--include/ec_commands.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index 96f7fbc547..6a73621cdd 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -6814,6 +6814,8 @@ enum pchg_state {
PCHG_STATE_CHARGING,
/* Device is fully charged. It implies DETECTED (& not charging). */
PCHG_STATE_FULL,
+ /* Put no more entry below */
+ PCHG_STATE_COUNT,
};
#define EC_PCHG_STATE_TEXT { \