summaryrefslogtreecommitdiff
path: root/test/usb_tcpmv2_compliance.h
diff options
context:
space:
mode:
authorDenis Brockus <dbrockus@google.com>2020-12-29 10:29:33 -0700
committerCommit Bot <commit-bot@chromium.org>2020-12-30 20:01:22 +0000
commitfcf4e0908333e98cb2d83e098da15869a148eda0 (patch)
tree27c0b267e4e7a469096dd1013f9c7f5b95f7cc1a /test/usb_tcpmv2_compliance.h
parent4772a209e5b760f95232e72a2be775073ce84966 (diff)
downloadchrome-ec-fcf4e0908333e98cb2d83e098da15869a148eda0.tar.gz
TCPMv2: Compliance Unit Test - PROC.PD.E1 generalization
Allow caller to control the first part of attach and the already attached portion of the code. BUG=none BRANCH=none TEST=make buildall Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I52419f41501c5d828bbc4a14a5a7b9d89e17f17f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2606565 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'test/usb_tcpmv2_compliance.h')
-rw-r--r--test/usb_tcpmv2_compliance.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/usb_tcpmv2_compliance.h b/test/usb_tcpmv2_compliance.h
index f477d9f575..20a3c1ed66 100644
--- a/test/usb_tcpmv2_compliance.h
+++ b/test/usb_tcpmv2_compliance.h
@@ -64,9 +64,12 @@ void partner_send_msg(enum pd_msg_type sop,
int handle_attach_expected_msgs(enum pd_data_role data_role);
-#define INITIAL_ATTACH true
-#define ALREADY_ATTACHED false
-int proc_pd_e1(enum pd_data_role data_role, bool initial_attach);
+enum proc_pd_e1_attach {
+ INITIAL_ATTACH = BIT(0),
+ ALREADY_ATTACHED = BIT(1),
+ INITIAL_AND_ALREADY_ATTACHED = INITIAL_ATTACH | ALREADY_ATTACHED
+};
+int proc_pd_e1(enum pd_data_role data_role, enum proc_pd_e1_attach attach);
int proc_pd_e3(void);
int test_td_pd_ll_e3_dfp(void);