@@ -499,7 +499,7 @@ TEST_CASE("Resume by transfer submit", "[uvc]")
499499
500500 // Create frame processing task
501501 TaskHandle_t frame_handling_task_hdl = NULL ;
502- xTaskCreate (test_fame_handling_task , "frame_handing" , 4096 , (void * )xTaskGetCurrentTaskHandle (), 4 , & frame_handling_task_hdl );
502+ TEST_ASSERT_EQUAL ( pdPASS , xTaskCreate (test_fame_handling_task , "frame_handing" , 4096 , (void * )xTaskGetCurrentTaskHandle (), 4 , & frame_handling_task_hdl ) );
503503 TEST_ASSERT_NOT_NULL (frame_handling_task_hdl );
504504
505505 // Start the stream
@@ -719,8 +719,8 @@ TEST_CASE("Multiple tasks access suspend/disconnect", "[uvc]")
719719}
720720
721721
722- #define TEST_UVC_PM_TIMER_INTERVAL_MS 1000
723- #define TEST_UVC_PM_TIMER_MARGIN_MS 50
722+ #define TEST_UVC_SUSPEND_TIMER_INTERVAL_MS 1000
723+ #define TEST_UVC_SUSPEND_TIMER_MARGIN_MS 50
724724
725725/**
726726 * @brief Automatic suspend timer
@@ -742,9 +742,9 @@ TEST_CASE("Automatic suspend timer", "[uvc]")
742742 TEST_ASSERT_NOT_NULL (stream );
743743
744744 // Set one-shot suspend timer and expect suspend event within the suspend timer interval
745- TEST_ASSERT_EQUAL (ESP_OK , usb_host_lib_set_auto_pm ( USB_HOST_LIB_PM_SUSPEND_ONE_SHOT , TEST_UVC_PM_TIMER_INTERVAL_MS ));
745+ TEST_ASSERT_EQUAL (ESP_OK , usb_host_lib_set_auto_suspend ( USB_HOST_LIB_AUTO_SUSPEND_ONE_SHOT , TEST_UVC_SUSPEND_TIMER_INTERVAL_MS ));
746746 test_uvc_event_t expected_event = {.event_type = UVC_HOST_DEVICE_EVENT , .device_event = UVC_HOST_DEVICE_SUSPENDED };
747- expect_client_event (& expected_event , pdMS_TO_TICKS (TEST_UVC_PM_TIMER_INTERVAL_MS + TEST_UVC_PM_TIMER_MARGIN_MS ));
747+ expect_client_event (& expected_event , pdMS_TO_TICKS (TEST_UVC_SUSPEND_TIMER_INTERVAL_MS + TEST_UVC_SUSPEND_TIMER_MARGIN_MS ));
748748
749749 // Manually resume the root port and wait for the resume event
750750 TEST_ASSERT_EQUAL (ESP_OK , usb_host_lib_root_port_resume ());
@@ -753,15 +753,15 @@ TEST_CASE("Automatic suspend timer", "[uvc]")
753753
754754 // Make sure no other event is delivered,
755755 // since the timer is a One-Shot timer and it shall not automatically suspend the root port again
756- expect_client_event (NULL , pdMS_TO_TICKS (TEST_UVC_PM_TIMER_INTERVAL_MS * 2 ));
756+ expect_client_event (NULL , pdMS_TO_TICKS (TEST_UVC_SUSPEND_TIMER_INTERVAL_MS * 2 ));
757757
758- // Set Periodic PM suspend timer
759- TEST_ASSERT_EQUAL (ESP_OK , usb_host_lib_set_auto_pm ( USB_HOST_LIB_PM_SUSPEND_PERIODIC , TEST_UVC_PM_TIMER_INTERVAL_MS ));
758+ // Set Periodic auto suspend timer
759+ TEST_ASSERT_EQUAL (ESP_OK , usb_host_lib_set_auto_suspend ( USB_HOST_LIB_AUTO_SUSPEND_PERIODIC , TEST_UVC_SUSPEND_TIMER_INTERVAL_MS ));
760760
761761 for (int i = 0 ; i < 3 ; i ++ ) {
762762 // Expect suspended event from auto suspend timer
763763 expected_event .device_event = UVC_HOST_DEVICE_SUSPENDED ;
764- expect_client_event (& expected_event , pdMS_TO_TICKS (TEST_UVC_PM_TIMER_INTERVAL_MS + TEST_UVC_PM_TIMER_MARGIN_MS ));
764+ expect_client_event (& expected_event , pdMS_TO_TICKS (TEST_UVC_SUSPEND_TIMER_INTERVAL_MS + TEST_UVC_SUSPEND_TIMER_MARGIN_MS ));
765765
766766 // Resume the root port manually and expect the resume event
767767 TEST_ASSERT_EQUAL (ESP_OK , usb_host_lib_root_port_resume ());
@@ -779,10 +779,10 @@ TEST_CASE("Automatic suspend timer", "[uvc]")
779779 TEST_ASSERT_EQUAL (ESP_OK , uvc_host_stream_format_select (stream , & format2 ));
780780 }
781781
782- // Disable the Periodic PM timer
783- TEST_ASSERT_EQUAL (ESP_OK , usb_host_lib_set_auto_pm ( USB_HOST_LIB_PM_SUSPEND_PERIODIC , 0 ));
782+ // Disable the Periodic auto suspend timer
783+ TEST_ASSERT_EQUAL (ESP_OK , usb_host_lib_set_auto_suspend ( USB_HOST_LIB_AUTO_SUSPEND_PERIODIC , 0 ));
784784 // Make sure no other event is delivered
785- expect_client_event (NULL , pdMS_TO_TICKS (TEST_UVC_PM_TIMER_INTERVAL_MS * 2 ));
785+ expect_client_event (NULL , pdMS_TO_TICKS (TEST_UVC_SUSPEND_TIMER_INTERVAL_MS * 2 ));
786786
787787 // Close the device, cleanup
788788 TEST_ASSERT_EQUAL (ESP_OK , uvc_host_stream_close (stream ));
0 commit comments