summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2024-03-14 19:37:15 +0800
committersakumisu <[email protected]>2024-03-14 19:37:15 +0800
commitb4c455e5e6a047f7d3bff97f8659d3ab2951d6ae (patch)
tree24dd2850c4b26cc0fb70e5fbe12e7bedae994666
parent2660af5d87275e08d6b535908a64d17ea63682f3 (diff)
must enable RT_USING_TIMER_SOFT when use timer
-rw-r--r--demo/usb_host.c4
-rw-r--r--osal/usb_osal_rtthread.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/demo/usb_host.c b/demo/usb_host.c
index 81c9769c..f809453e 100644
--- a/demo/usb_host.c
+++ b/demo/usb_host.c
@@ -357,10 +357,6 @@ void usbh_videostreaming_parse_yuyv2(struct usbh_urb *urb, struct usbh_videostre
#ifdef __RTTHREAD__
-#ifndef RT_USING_TIMER_SOFT
-#error must enable RT_USING_TIMER_SOFT to support timer callback in thread
-#endif
-
#include <rtthread.h>
#include <rtdevice.h>
#include <netif/ethernetif.h>
diff --git a/osal/usb_osal_rtthread.c b/osal/usb_osal_rtthread.c
index 18b66a49..830159d7 100644
--- a/osal/usb_osal_rtthread.c
+++ b/osal/usb_osal_rtthread.c
@@ -8,6 +8,10 @@
#include <rtthread.h>
#include <rthw.h>
+#ifndef RT_USING_TIMER_SOFT
+#error must enable RT_USING_TIMER_SOFT to support timer callback in thread
+#endif
+
usb_osal_thread_t usb_osal_thread_create(const char *name, uint32_t stack_size, uint32_t prio, usb_thread_entry_t entry, void *args)
{
rt_thread_t htask;