From 79d7c2331569816aa8d8cd64d2969382120345bd Mon Sep 17 00:00:00 2001 From: Roman Leonov Date: Wed, 9 Oct 2024 18:40:50 +0800 Subject: [PATCH] fix(usb_host_lib): Returned task suspend --- .../peripherals/usb/host/usb_host_lib/main/class_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/peripherals/usb/host/usb_host_lib/main/class_driver.c b/examples/peripherals/usb/host/usb_host_lib/main/class_driver.c index 3b7077986f..5a89e40dea 100644 --- a/examples/peripherals/usb/host/usb_host_lib/main/class_driver.c +++ b/examples/peripherals/usb/host/usb_host_lib/main/class_driver.c @@ -206,7 +206,7 @@ void class_driver_task(void *arg) SemaphoreHandle_t mux_lock = xSemaphoreCreateMutex(); if (mux_lock == NULL) { ESP_LOGE(TAG, "Unable to create class driver mutex"); - vTaskDelete(NULL); + vTaskSuspend(NULL); return; } @@ -256,7 +256,7 @@ void class_driver_task(void *arg) if (mux_lock != NULL) { vSemaphoreDelete(mux_lock); } - vTaskDelete(NULL); + vTaskSuspend(NULL); } void class_driver_client_deregister(void)