summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorhathach <[email protected]>2020-04-11 12:55:45 +0700
committerhathach <[email protected]>2020-04-11 12:55:45 +0700
commitae1314f1c77bb043789d54bf8a7fa30ff7efd1e2 (patch)
tree867abbe03c81b2787d24a6fe67bdb04fa4fd1fb8 /examples
parent2ff3f765db7e62201d0491093111b0d649446046 (diff)
fix incorrect setup packet
also increase usbd stack in example when debug is enabled
Diffstat (limited to 'examples')
-rw-r--r--examples/device/cdc_msc_freertos/src/main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/device/cdc_msc_freertos/src/main.c b/examples/device/cdc_msc_freertos/src/main.c
index f093d8ea0..77184ff58 100644
--- a/examples/device/cdc_msc_freertos/src/main.c
+++ b/examples/device/cdc_msc_freertos/src/main.c
@@ -56,7 +56,13 @@ StaticTimer_t blinky_tmdef;
TimerHandle_t blinky_tm;
// static task for usbd
-#define USBD_STACK_SIZE (3*configMINIMAL_STACK_SIZE/2)
+// Increase stack size when debug log is enabled
+#if CFG_TUSB_DEBUG
+ #define USBD_STACK_SIZE (3*configMINIMAL_STACK_SIZE)
+#else
+ #define USBD_STACK_SIZE (3*configMINIMAL_STACK_SIZE/2)
+#endif
+
StackType_t usb_device_stack[USBD_STACK_SIZE];
StaticTask_t usb_device_taskdef;