瀏覽代碼

must enable RT_USING_TIMER_SOFT when use timer

sakumisu 1 年之前
父節點
當前提交
b4c455e5e6
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 0 4
      demo/usb_host.c
  2. 4 0
      osal/usb_osal_rtthread.c

+ 0 - 4
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>

+ 4 - 0
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;