summaryrefslogtreecommitdiff
path: root/zephyr/test/drivers/usbc_alt_mode/src/usbc_alt_mode.c
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/test/drivers/usbc_alt_mode/src/usbc_alt_mode.c')
-rw-r--r--zephyr/test/drivers/usbc_alt_mode/src/usbc_alt_mode.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/zephyr/test/drivers/usbc_alt_mode/src/usbc_alt_mode.c b/zephyr/test/drivers/usbc_alt_mode/src/usbc_alt_mode.c
index 4e9911ea5b..ff2a372a7f 100644
--- a/zephyr/test/drivers/usbc_alt_mode/src/usbc_alt_mode.c
+++ b/zephyr/test/drivers/usbc_alt_mode/src/usbc_alt_mode.c
@@ -243,8 +243,7 @@ ZTEST_F(usbc_alt_mode, verify_displayport_mode_entry)
/* TODO(b/237553647): Test EC-driven mode entry (requires a separate
* config).
*/
- host_cmd_typec_control(TEST_PORT, TYPEC_CONTROL_COMMAND_ENTER_MODE,
- TYPEC_MODE_DP);
+ host_cmd_typec_control_enter_mode(TEST_PORT, TYPEC_MODE_DP);
k_sleep(K_SECONDS(1));
/* Verify host command when VDOs are present. */
@@ -266,20 +265,18 @@ ZTEST_F(usbc_alt_mode, verify_displayport_mode_entry)
ZTEST_F(usbc_alt_mode, verify_displayport_mode_reentry)
{
- host_cmd_typec_control(TEST_PORT, TYPEC_CONTROL_COMMAND_ENTER_MODE,
- TYPEC_MODE_DP);
+ host_cmd_typec_control_enter_mode(TEST_PORT, TYPEC_MODE_DP);
k_sleep(K_SECONDS(1));
/* DPM configures the partner on DP mode entry */
/* Verify port partner thinks its configured for DisplayPort */
zassert_true(fixture->partner.displayport_configured, NULL);
- host_cmd_typec_control(TEST_PORT, TYPEC_CONTROL_COMMAND_EXIT_MODES, 0);
+ host_cmd_typec_control_exit_modes(TEST_PORT);
k_sleep(K_SECONDS(1));
zassert_false(fixture->partner.displayport_configured, NULL);
- host_cmd_typec_control(TEST_PORT, TYPEC_CONTROL_COMMAND_ENTER_MODE,
- TYPEC_MODE_DP);
+ host_cmd_typec_control_enter_mode(TEST_PORT, TYPEC_MODE_DP);
k_sleep(K_SECONDS(1));
zassert_true(fixture->partner.displayport_configured, NULL);
@@ -305,8 +302,7 @@ ZTEST_SUITE(usbc_alt_mode, drivers_predicate_post_main, usbc_alt_mode_setup,
*/
ZTEST_F(usbc_alt_mode_dp_unsupported, verify_discovery)
{
- host_cmd_typec_control(TEST_PORT, TYPEC_CONTROL_COMMAND_ENTER_MODE,
- TYPEC_MODE_DP);
+ host_cmd_typec_control_enter_mode(TEST_PORT, TYPEC_MODE_DP);
k_sleep(K_SECONDS(1));
uint8_t response_buffer[EC_LPC_HOST_PACKET_SIZE];
@@ -344,8 +340,7 @@ ZTEST_F(usbc_alt_mode_dp_unsupported, verify_discovery)
*/
ZTEST_F(usbc_alt_mode_dp_unsupported, verify_displayport_mode_nonentry)
{
- host_cmd_typec_control(TEST_PORT, TYPEC_CONTROL_COMMAND_ENTER_MODE,
- TYPEC_MODE_DP);
+ host_cmd_typec_control_enter_mode(TEST_PORT, TYPEC_MODE_DP);
k_sleep(K_SECONDS(1));
zassert_false(fixture->partner.displayport_configured, NULL);