summaryrefslogtreecommitdiff
path: root/test/usb_typec_ctvpd.c
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2019-10-17 09:33:31 -0600
committerCommit Bot <commit-bot@chromium.org>2019-10-24 18:01:17 +0000
commite248f208ab8a55667bfe60ce48a188fc1a4620cc (patch)
tree2b3955afb2a53432c09467998e930407a47f02c1 /test/usb_typec_ctvpd.c
parent39f7d5d0e5c3ae72b9837a676fac401dfe51e745 (diff)
downloadchrome-ec-e248f208ab8a55667bfe60ce48a188fc1a4620cc.tar.gz
cleanup: clean up reference to power role vs cable plug
The PD header specifies the power role for SOP packets and cable plug for SOP' and SOP" packets. Refactor code to make this more obvious. BRANCH=none BUG=none TEST=builds and new stack runs on hatch Change-Id: I6cdb1561082d2142214ac65703ff42586b16d70b Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1865986 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'test/usb_typec_ctvpd.c')
-rw-r--r--test/usb_typec_ctvpd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/usb_typec_ctvpd.c b/test/usb_typec_ctvpd.c
index b16ac37b25..75d620fd85 100644
--- a/test/usb_typec_ctvpd.c
+++ b/test/usb_typec_ctvpd.c
@@ -615,7 +615,7 @@ static int test_vpd_host_src_detection_message_reception(void)
/* Test Discover Identity Ack */
TEST_ASSERT(pd_test_tx_msg_verify_sop_prime(port));
TEST_ASSERT(pd_test_tx_msg_verify_short(port,
- PD_HEADER(PD_DATA_VENDOR_DEF, PD_PLUG_CABLE_VPD, 0,
+ PD_HEADER(PD_DATA_VENDOR_DEF, PD_PLUG_FROM_CABLE, 0,
pd_port[port].msg_tx_id, 5, pd_port[port].rev, 0)));
TEST_ASSERT(pd_test_tx_msg_verify_word(port, expected_vdm_header));
TEST_ASSERT(pd_test_tx_msg_verify_word(port, expected_vdo_id_header));
@@ -1113,7 +1113,7 @@ static int test_ctvpd_behavior_case4(void)
/* Test Discover Identity Ack */
TEST_ASSERT(pd_test_tx_msg_verify_sop_prime(port));
TEST_ASSERT(pd_test_tx_msg_verify_short(port,
- PD_HEADER(PD_DATA_VENDOR_DEF, PD_PLUG_CABLE_VPD, 0,
+ PD_HEADER(PD_DATA_VENDOR_DEF, PD_PLUG_FROM_CABLE, 0,
pd_port[port].msg_tx_id, 5, pd_port[port].rev, 0)));
TEST_ASSERT(pd_test_tx_msg_verify_word(port, expected_vdm_header));
TEST_ASSERT(pd_test_tx_msg_verify_word(port, expected_vdo_id_header));