File tree 3 files changed +9
-2
lines changed
3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 86
86
#endif
87
87
#endif
88
88
89
- /* STM32G0xx defined USB_DRD_FS */
89
+ /* STM32G0xx and some STM32U5xx defined USB_DRD_FS */
90
90
#if !defined(USB ) && defined(USB_DRD_FS )
91
91
#define USB USB_DRD_FS
92
92
#define PinMap_USB PinMap_USB_DRD_FS
93
+ #if defined(STM32U5xx )
94
+ #define USB_BASE USB_DRD_BASE
95
+ #define __HAL_RCC_USB_CLK_ENABLE __HAL_RCC_USB_FS_CLK_ENABLE
96
+ #define __HAL_RCC_USB_CLK_DISABLE __HAL_RCC_USB_FS_CLK_DISABLE
97
+ #endif
93
98
#endif
94
99
95
100
/**
Original file line number Diff line number Diff line change @@ -105,7 +105,9 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd)
105
105
#ifdef __HAL_USB_WAKEUP_EXTI_ENABLE_RISING_EDGE
106
106
__HAL_USB_WAKEUP_EXTI_ENABLE_RISING_EDGE ();
107
107
#endif
108
+ #ifdef __HAL_USB_WAKEUP_EXTI_ENABLE_IT
108
109
__HAL_USB_WAKEUP_EXTI_ENABLE_IT ();
110
+ #endif
109
111
#if defined(USB_WKUP_IRQn )
110
112
/* USB Wakeup Interrupt */
111
113
HAL_NVIC_EnableIRQ (USB_WKUP_IRQn );
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ extern "C" {
74
74
#elif defined(STM32G0xx )
75
75
#define USB_IRQn USB_UCPD1_2_IRQn
76
76
#define USB_IRQHandler USB_UCPD1_2_IRQHandler
77
- #elif defined(STM32U5xx )
77
+ #elif defined(STM32U5xx ) && !defined( USB_DRD_FS )
78
78
#define USB_IRQn OTG_FS_IRQn
79
79
#define USB_IRQHandler OTG_FS_IRQHandler
80
80
#elif defined(STM32L5xx )
You can’t perform that action at this time.
0 commit comments