summaryrefslogtreecommitdiff
path: root/include/peripheral_charger.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/peripheral_charger.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/peripheral_charger.h')
-rw-r--r--include/peripheral_charger.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/peripheral_charger.h b/include/peripheral_charger.h
index 26b7b98a2e..b3d19edc52 100644
--- a/include/peripheral_charger.h
+++ b/include/peripheral_charger.h
@@ -89,6 +89,9 @@ enum pchg_event {
PCHG_EVENT_INITIALIZE,
PCHG_EVENT_ENABLE,
PCHG_EVENT_DISABLE,
+
+ /* Counter. Add new entry above. */
+ PCHG_EVENT_COUNT,
};
enum pchg_error {