summaryrefslogtreecommitdiff
path: root/test/test_config.h
diff options
context:
space:
mode:
authorPhilip Chen <philipchen@google.com>2017-09-13 15:04:37 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-09-26 18:24:07 -0700
commit72ea08f9db07160177afdf92ba8a7f7e1230331a (patch)
treef30c50edd992f6105db3140e2dd530c8edcfd05e /test/test_config.h
parentbe96cd65ed78a15c843e513cebd4345a29e6b2fa (diff)
downloadchrome-ec-72ea08f9db07160177afdf92ba8a7f7e1230331a.tar.gz
rtc: Add functions and tests for time conversion
To implement rtc driver for some ec chips, we need to convert between calandar date and seconds (since epoch time, 01-01-1970 00:00:00). Sicne these functions are HW-independent, let's add common/rtc.c, include/rtc.h, and unit test for this. BUG=b:63908519 BRANCH=none TEST=make buildall test -j Change-Id: Icb1e768d2b3674d5225b83e09475e984eb104d06 Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/666985 Commit-Ready: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org> Reviewed-by: Brian Norris <briannorris@chromium.org>
Diffstat (limited to 'test/test_config.h')
-rw-r--r--test/test_config.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test_config.h b/test/test_config.h
index 31d5679d05..23d836ffd9 100644
--- a/test/test_config.h
+++ b/test/test_config.h
@@ -230,6 +230,10 @@ enum nvmem_vars {
#define CONFIG_FLASH_NVMEM_VARS_USER_SIZE 600
#endif /* TEST_NVMEM_VARS */
+#ifdef TEST_RTC
+#define CONFIG_HOSTCMD_RTC
+#endif
+
#ifdef TEST_VBOOT
#define CONFIG_RWSIG
#define CONFIG_SHA256