We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b8fdb0 commit 3fa93d7Copy full SHA for 3fa93d7
cores/arduino/stm32/usb/usbd_conf.c
@@ -465,7 +465,14 @@ USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev)
465
USBD_reenumerate();
466
/* Set common LL Driver parameters */
467
g_hpcd.Init.dev_endpoints = DEV_NUM_EP;
468
+#ifdef DEP0CTL_MPS_64
469
g_hpcd.Init.ep0_mps = DEP0CTL_MPS_64;
470
+#else
471
+#ifdef EP_MPS_64
472
+ g_hpcd.Init.ep0_mps = EP_MPS_64;
473
474
+#error "Missing EP0 MPS definition: DEP0CTL_MPS_64 or EP_MPS_64!"
475
+#endif
476
#if !defined(STM32F1xx) && !defined(STM32F2xx) || defined(USB)
477
g_hpcd.Init.lpm_enable = DISABLE;
478
g_hpcd.Init.battery_charging_enable = DISABLE;
0 commit comments