File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 28
28
#else
29
29
/* Private typedef -----------------------------------------------------------*/
30
30
/* Private define ------------------------------------------------------------*/
31
+ #if !defined(USBD_VBUS_DETECTION_ENABLE )
32
+ #define VBUS_SENSING DISABLE
33
+ #else
34
+ #define VBUS_SENSING ENABLE
35
+ #endif
31
36
32
37
/* Private macro -------------------------------------------------------------*/
33
38
/* Private variables ---------------------------------------------------------*/
@@ -479,14 +484,14 @@ USBD_StatusTypeDef USBD_LL_Init(USBD_HandleTypeDef *pdev)
479
484
g_hpcd .Init .phy_itface = PCD_PHY_ULPI ;
480
485
#endif
481
486
g_hpcd .Init .speed = PCD_SPEED_HIGH ;
482
- g_hpcd .Init .vbus_sensing_enable = ENABLE ;
487
+ g_hpcd .Init .vbus_sensing_enable = VBUS_SENSING ;
483
488
g_hpcd .Init .use_external_vbus = DISABLE ;
484
489
#else /* USE_USB_FS */
485
490
#ifdef USB_OTG_FS
486
491
g_hpcd .Instance = USB_OTG_FS ;
487
492
g_hpcd .Init .use_dedicated_ep1 = DISABLE ;
488
493
g_hpcd .Init .dma_enable = DISABLE ;
489
- g_hpcd .Init .vbus_sensing_enable = DISABLE ;
494
+ g_hpcd .Init .vbus_sensing_enable = VBUS_SENSING ;
490
495
g_hpcd .Init .use_external_vbus = DISABLE ;
491
496
#else
492
497
g_hpcd .Instance = USB ;
You can’t perform that action at this time.
0 commit comments