diff options
author | Tristan Honscheid <honscheid@google.com> | 2023-04-12 15:00:13 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-04-21 07:25:40 +0000 |
commit | b5e2ea8b0dfa7a190783978153bcafb1ae87a3d0 (patch) | |
tree | fc686f17ba43c1cb4e48cb499dc19e011630adb3 /include | |
parent | 7380b56e8cdbcb8516e767d65eb05330bedbaf60 (diff) | |
download | chrome-ec-b5e2ea8b0dfa7a190783978153bcafb1ae87a3d0.tar.gz |
zephyr: test: Set up OCPC test project and check console commands
Add a new test binary that has a Nissa-style Kconfig and devicetree,
complete with chargers. Use this configuration to run OCPC
(common/ocpc.c) and test this module, which has never previously been
used in our tests.
This CL contains tests for ocpc.c's console commands.
BRANCH=None
BUG=b:276805061
TEST=./twister -T zephyr/test/ocpc
Change-Id: I34dbe1abcae98d8ca9aa9613dddf3b4ba2838792
Signed-off-by: Tristan Honscheid <honscheid@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4438529
Commit-Queue: Peter Marheine <pmarheine@chromium.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/ocpc.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/ocpc.h b/include/ocpc.h index 20ec35c797..3b95556fc1 100644 --- a/include/ocpc.h +++ b/include/ocpc.h @@ -86,4 +86,26 @@ void ocpc_reset(struct ocpc_data *ocpc); * @param ocpc: Pointer to OCPC data */ __override_proto void board_ocpc_init(struct ocpc_data *ocpc); + +#ifdef TEST_BUILD +/** + * @brief Force a reload of PID constants by calling ocpc_get_pid_constants(). + */ +void ocpc_set_pid_constants(void); + +/** + * @brief Return the value of viz_output + * + * @return int + */ +int test_ocpc_get_viz_output(void); + +/** + * @brief Return the value of debug_output + * + * @return int + */ +int test_ocpc_get_debug_output(void); +#endif + #endif /* __CROS_EC_OCPC_H */ |