diff --git a/components/dfs/src/dfs.c b/components/dfs/src/dfs.c index c83aad3e2d..97e9ae5b22 100644 --- a/components/dfs/src/dfs.c +++ b/components/dfs/src/dfs.c @@ -406,7 +406,7 @@ up_one: return fullpath; } RTM_EXPORT(dfs_normalize_path); - +#ifdef RT_USING_FINSH #include int list_fd(void) { @@ -438,6 +438,6 @@ int list_fd(void) return 0; } MSH_CMD_EXPORT(list_fd, list file descriptor); - +#endif /*@}*/ diff --git a/components/drivers/include/drivers/usb_common.h b/components/drivers/include/drivers/usb_common.h index 91afb252d9..26c1d9aac4 100644 --- a/components/drivers/include/drivers/usb_common.h +++ b/components/drivers/include/drivers/usb_common.h @@ -577,7 +577,7 @@ typedef struct ustorage_csw* ustorage_csw_t; */ /* the stack size of USB thread */ #ifndef RT_USBD_THREAD_STACK_SZ -#define RT_USBD_THREAD_STACK_SZ 2048 +#define RT_USBD_THREAD_STACK_SZ 512 #endif /* the priority of USB thread */ diff --git a/components/drivers/usb/usbdevice/class/hid.c b/components/drivers/usb/usbdevice/class/hid.c index 05d4a1878d..11a8e39bfe 100644 --- a/components/drivers/usb/usbdevice/class/hid.c +++ b/components/drivers/usb/usbdevice/class/hid.c @@ -571,7 +571,7 @@ RT_WEAK void HID_Report_Received(hid_report_t report) dump_report(report); } ALIGN(RT_ALIGN_SIZE) -static rt_uint8_t hid_thread_stack[RT_USBD_THREAD_STACK_SZ]; +static rt_uint8_t hid_thread_stack[512]; static struct rt_thread hid_thread; static void hid_thread_entry(void* parameter) @@ -586,7 +586,7 @@ static void hid_thread_entry(void* parameter) HID_Report_Received(&report); } } -static rt_uint8_t hid_mq_pool[(sizeof(struct hid_report)+sizeof(void*))*32]; +static rt_uint8_t hid_mq_pool[(sizeof(struct hid_report)+sizeof(void*))*8]; static void rt_usb_hid_init(struct ufunction *func) { struct hid_s *hiddev; @@ -599,7 +599,7 @@ static void rt_usb_hid_init(struct ufunction *func) sizeof(hid_mq_pool), RT_IPC_FLAG_FIFO); rt_thread_init(&hid_thread, "hidd", hid_thread_entry, hiddev, - hid_thread_stack, RT_USBD_THREAD_STACK_SZ, RT_USBD_THREAD_PRIO, 20); + hid_thread_stack, sizeof(hid_thread_stack), RT_USBD_THREAD_PRIO, 20); rt_thread_startup(&hid_thread); }