summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenis Brockus <dbrockus@chromium.org>2019-10-14 14:06:05 -0600
committerCommit Bot <commit-bot@chromium.org>2019-10-16 08:42:19 +0000
commit7a4e700b6488a138d0c5c55aaa47e626d90a5299 (patch)
tree7df9a085eed09ffbcff37b4c8a09c71b5e9af0ca /include
parent2dd2eecaa743a65d8369c7799bbc1450b0d91d0e (diff)
downloadchrome-ec-7a4e700b6488a138d0c5c55aaa47e626d90a5299.tar.gz
pd: Add PE FRS unit test for new stack
BUG=none BRANCH=none TEST=make buildall -j Change-Id: I55453ddf1d1da0fdee902a33e14357716fb12c4a Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1859826 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/config.h6
-rw-r--r--include/usb_prl_sm.h7
2 files changed, 13 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h
index 0c738e8a3c..9ecd19abbb 100644
--- a/include/config.h
+++ b/include/config.h
@@ -925,6 +925,12 @@
#define CONFIG_USB_PE_SM
/*
+ * Define to enable Policy Engine State Machine. This is an override
+ * that is used to just pull in PE for unit testing.
+ */
+#undef CONFIG_TEST_USB_PE_SM
+
+/*
* Board specific maximum input current limit, in mA.
*/
#undef CONFIG_CHARGER_MAX_INPUT_CURRENT
diff --git a/include/usb_prl_sm.h b/include/usb_prl_sm.h
index 694d4fd923..7f580741e5 100644
--- a/include/usb_prl_sm.h
+++ b/include/usb_prl_sm.h
@@ -121,5 +121,12 @@ void prl_start_ams(int port);
*/
void prl_end_ams(int port);
+#ifdef TEST_BUILD
+/**
+ * Fake to track the last sent control message
+ */
+enum pd_ctrl_msg_type fake_prl_get_last_sent_ctrl_msg(int port);
+#endif
+
#endif /* __CROS_EC_USB_PRL_H */