summaryrefslogtreecommitdiff
path: root/include/usb_pe_sm.h
diff options
context:
space:
mode:
authorSam Hurst <shurst@google.com>2020-06-24 13:21:40 -0700
committerCommit Bot <commit-bot@chromium.org>2020-06-27 05:58:29 +0000
commit9fe816a1c3a1286a6510b92503857ded5ae4b5fe (patch)
treeec12b19e331bc5a389b8b0a9df32a8259700cb67 /include/usb_pe_sm.h
parent48a55c8b351bc10e5637e90814293a4b7869ac84 (diff)
downloadchrome-ec-9fe816a1c3a1286a6510b92503857ded5ae4b5fe.tar.gz
TCPMv2: Add PE State name to pd state console command
Some faft_pd tests need to query which state the pe state machine is in. BRANCH=none BUG=b:159682253 TEST=make -j buildall Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I1782761328212f45bd690fd7285f016cf9285538 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2264484
Diffstat (limited to 'include/usb_pe_sm.h')
-rw-r--r--include/usb_pe_sm.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/usb_pe_sm.h b/include/usb_pe_sm.h
index 949df6d516..2ad41991a2 100644
--- a/include/usb_pe_sm.h
+++ b/include/usb_pe_sm.h
@@ -197,5 +197,22 @@ void pe_invalidate_explicit_contract(int port);
* @param port USB-C port number
*/
bool pe_in_local_ams(int port);
+
+/**
+ * Returns the name of the current PE state
+ *
+ * @param port USB-C port number
+ * @return name of current pe state
+ */
+const char *pe_get_current_state(int port);
+
+/**
+ * Returns the flag mask of the PE state machine
+ *
+ * @param port USB-C port number
+ * @return flag mask of the pe state machine
+ */
+uint32_t pe_get_flags(int port);
+
#endif /* __CROS_EC_USB_PE_H */