File tree 3 files changed +9
-4
lines changed
3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 92
92
#if !defined(USB ) && defined(USB_DRD_FS )
93
93
#define USB USB_DRD_FS
94
94
#define PinMap_USB PinMap_USB_DRD_FS
95
- #if defined(STM32U5xx )
95
+ #if defined(STM32H5xx ) || defined( STM32U5xx )
96
96
#define USB_BASE USB_DRD_BASE
97
- #define __HAL_RCC_USB_CLK_ENABLE __HAL_RCC_USB_FS_CLK_ENABLE
98
- #define __HAL_RCC_USB_CLK_DISABLE __HAL_RCC_USB_FS_CLK_DISABLE
97
+ #if !defined(__HAL_RCC_USB_CLK_ENABLE )
98
+ #define __HAL_RCC_USB_CLK_ENABLE __HAL_RCC_USB_FS_CLK_ENABLE
99
+ #define __HAL_RCC_USB_CLK_DISABLE __HAL_RCC_USB_FS_CLK_DISABLE
100
+ #endif
99
101
#endif
100
102
#endif
101
103
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd)
58
58
digitalWriteFast (digitalPinToPinName (PIN_UCPD_TCPP ), LOW );
59
59
#endif
60
60
61
- #if defined(PWR_CR2_USV ) || defined(PWR_SVMCR_USV )
61
+ #if defined(PWR_CR2_USV ) || defined(PWR_SVMCR_USV ) || defined( PWR_USBSCR_USB33SV )
62
62
/* Enable VDDUSB on Pwrctrl CR2 register*/
63
63
HAL_PWREx_EnableVddUSB ();
64
64
#endif
Original file line number Diff line number Diff line change @@ -74,6 +74,9 @@ 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(STM32H5xx )
78
+ #define USB_IRQn USB_DRD_FS_IRQn
79
+ #define USB_IRQHandler USB_DRD_FS_IRQHandler
77
80
#elif defined(STM32U5xx ) && !defined(USB_DRD_FS )
78
81
#define USB_IRQn OTG_FS_IRQn
79
82
#define USB_IRQHandler OTG_FS_IRQHandler
You can’t perform that action at this time.
0 commit comments