Skip to content

Commit

Permalink
fix(uvc): Driver installation from high priority task
Browse files Browse the repository at this point in the history
Related: #94
  • Loading branch information
tore-espressif committed Nov 29, 2024
1 parent 9435cc2 commit 104b5c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions host/class/uvc/usb_host_uvc_2/uvc_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static void usb_event_cb(const usb_host_client_event_msg_t *event_msg, void *arg
*/
static void uvc_client_task(void *arg)
{
vTaskSuspend(NULL); // Task will be resumed from uvc_host_install()
ulTaskNotifyTake(pdTRUE, portMAX_DELAY);
uvc_host_driver_t *uvc_obj = UVC_ATOMIC_LOAD(p_uvc_host_driver); // Make local copy of the driver's handle
assert(uvc_obj->usb_client_hdl);

Expand Down Expand Up @@ -425,7 +425,7 @@ esp_err_t uvc_host_install(const uvc_host_driver_config_t *driver_config)
}

// Everything OK: Start UVC-Driver task and return
vTaskResume(driver_task_h);
xTaskNotifyGive(driver_task_h);
return ESP_OK;

client_err:
Expand Down

0 comments on commit 104b5c1

Please sign in to comment.