提交 049ed504 编写于 作者: lymzzyh's avatar lymzzyh 提交者: Bernard Xiong

[Components][USB][DFS][usb minimize stack size dfs fix build error

without finsh]
上级 9c731baf
...@@ -406,7 +406,7 @@ up_one: ...@@ -406,7 +406,7 @@ up_one:
return fullpath; return fullpath;
} }
RTM_EXPORT(dfs_normalize_path); RTM_EXPORT(dfs_normalize_path);
#ifdef RT_USING_FINSH
#include <finsh.h> #include <finsh.h>
int list_fd(void) int list_fd(void)
{ {
...@@ -438,6 +438,6 @@ int list_fd(void) ...@@ -438,6 +438,6 @@ int list_fd(void)
return 0; return 0;
} }
MSH_CMD_EXPORT(list_fd, list file descriptor); MSH_CMD_EXPORT(list_fd, list file descriptor);
#endif
/*@}*/ /*@}*/
...@@ -577,7 +577,7 @@ typedef struct ustorage_csw* ustorage_csw_t; ...@@ -577,7 +577,7 @@ typedef struct ustorage_csw* ustorage_csw_t;
*/ */
/* the stack size of USB thread */ /* the stack size of USB thread */
#ifndef RT_USBD_THREAD_STACK_SZ #ifndef RT_USBD_THREAD_STACK_SZ
#define RT_USBD_THREAD_STACK_SZ 2048 #define RT_USBD_THREAD_STACK_SZ 512
#endif #endif
/* the priority of USB thread */ /* the priority of USB thread */
......
...@@ -571,7 +571,7 @@ RT_WEAK void HID_Report_Received(hid_report_t report) ...@@ -571,7 +571,7 @@ RT_WEAK void HID_Report_Received(hid_report_t report)
dump_report(report); dump_report(report);
} }
ALIGN(RT_ALIGN_SIZE) 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 struct rt_thread hid_thread;
static void hid_thread_entry(void* parameter) static void hid_thread_entry(void* parameter)
...@@ -586,7 +586,7 @@ static void hid_thread_entry(void* parameter) ...@@ -586,7 +586,7 @@ static void hid_thread_entry(void* parameter)
HID_Report_Received(&report); 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) static void rt_usb_hid_init(struct ufunction *func)
{ {
struct hid_s *hiddev; struct hid_s *hiddev;
...@@ -599,7 +599,7 @@ static void rt_usb_hid_init(struct ufunction *func) ...@@ -599,7 +599,7 @@ static void rt_usb_hid_init(struct ufunction *func)
sizeof(hid_mq_pool), RT_IPC_FLAG_FIFO); sizeof(hid_mq_pool), RT_IPC_FLAG_FIFO);
rt_thread_init(&hid_thread, "hidd", hid_thread_entry, hiddev, 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); rt_thread_startup(&hid_thread);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册