summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2022-02-13 15:06:58 +0800
committersakumisu <[email protected]>2022-02-13 15:06:58 +0800
commitf31d94c7f9f575b23d74c0d09f93be82097c07da (patch)
treed803af5038d1f468e7685b9fb081c07431682b7e
parent0ec3c5e4ef8ad9a8fc0dcf95b7cccca5f9b9b5d4 (diff)
update sconscript and osal for rtthread
-rw-r--r--SConscript8
-rw-r--r--osal/usb_osal_rtthread.c10
2 files changed, 15 insertions, 3 deletions
diff --git a/SConscript b/SConscript
index e53b79e6..1621e269 100644
--- a/SConscript
+++ b/SConscript
@@ -1,7 +1,8 @@
from building import *
cwd = GetCurrentDir()
-path = [cwd + '/common']
+path = [cwd]
+path += [cwd + '/common']
path += [cwd + '/core']
CPPDEFINES = []
@@ -55,8 +56,9 @@ if GetDepend(['PKG_CHERRYUSB_USING_HOST']):
path += [cwd + '/class/msc']
src += Glob('class/msc/usbh_msc.c')
path += [cwd + '/class/hub']
- src += Glob('class/hub/usbdh_hub.c')
-
+ src += Glob('class/hub/usbh_hub.c')
+
+ CPPDEFINES += ['CONFIG_USBHOST_HUB']
if GetDepend(['SOC_FAMILY_STM32']):
src += Glob('port/synopsys/usb_hc_synopsys.c')
diff --git a/osal/usb_osal_rtthread.c b/osal/usb_osal_rtthread.c
index c71774e8..aa6bce22 100644
--- a/osal/usb_osal_rtthread.c
+++ b/osal/usb_osal_rtthread.c
@@ -31,6 +31,16 @@ usb_osal_thread_t usb_osal_thread_create(const char *name, uint32_t stack_size,
return (usb_osal_thread_t)htask;
}
+void usb_osal_thread_suspend(usb_osal_thread_t thread)
+{
+ rt_thread_suspend(thread);
+}
+
+void usb_osal_thread_resume(usb_osal_thread_t thread)
+{
+ rt_thread_resume(thread);
+}
+
usb_osal_sem_t usb_osal_sem_create(uint32_t initial_count)
{
return (usb_osal_sem_t)rt_sem_create("usbh_sem", initial_count, RT_IPC_FLAG_FIFO);