diff options
| author | uestczyh222 <[email protected]> | 2017-12-06 02:55:23 +0800 |
|---|---|---|
| committer | Bernard Xiong <[email protected]> | 2017-12-07 07:24:37 +0800 |
| commit | 049ed5047f49c8662933c51c12e9281daf24f836 (patch) | |
| tree | 848628d176bc12bbc08f15e0e91c926fffbf0c96 /components | |
| parent | 9c731baf2a215f67ee20e193043c26497d6fd46e (diff) | |
[Components][USB][DFS][usb minimize stack size dfs fix build error
without finsh]
Diffstat (limited to 'components')
| -rw-r--r-- | components/dfs/src/dfs.c | 4 | ||||
| -rw-r--r-- | components/drivers/include/drivers/usb_common.h | 2 | ||||
| -rw-r--r-- | components/drivers/usb/usbdevice/class/hid.c | 6 |
3 files changed, 6 insertions, 6 deletions
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 <finsh.h> 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); } |
