summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2022-06-14 22:02:28 +0800
committersakumisu <[email protected]>2022-06-14 22:02:28 +0800
commitf761392ed1680afb3b6a5088138a72b0c29162b8 (patch)
treeb628989aafb8d257155ea412cd7514aa0fca6b34
parentb756c1263c27f1bc38827067f07238db09f97eb3 (diff)
add config for workq
-rw-r--r--osal/usb_workq.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/osal/usb_workq.c b/osal/usb_workq.c
index 7ec34ffc..3d615e50 100644
--- a/osal/usb_workq.c
+++ b/osal/usb_workq.c
@@ -92,6 +92,7 @@ static void usbh_lpwork_thread(void *argument)
int usbh_workq_initialize(void)
{
+#ifdef CONFIG_USBHOST_HIGH_WORKQ
g_hpworkq.sem = usb_osal_sem_create(0);
if (g_hpworkq.sem == NULL) {
return -1;
@@ -100,7 +101,8 @@ int usbh_workq_initialize(void)
if (g_hpworkq.thread == NULL) {
return -1;
}
-
+#endif
+#ifdef CONFIG_USBHOST_LOW_WORKQ
g_lpworkq.sem = usb_osal_sem_create(0);
if (g_lpworkq.sem == NULL) {
return -1;
@@ -110,5 +112,6 @@ int usbh_workq_initialize(void)
if (g_lpworkq.thread == NULL) {
return -1;
}
+#endif
return 0;
}