File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed
libraries/SrcWrapper/src/stm32 Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 6565 #define CAN1 CAN
6666#endif
6767
68+ /* STM32G0xx defined USB_DRD_FS */
69+ #if !defined(USB ) && defined(USB_DRD_FS )
70+ #define USB USB_DRD_FS
71+ #define PinMap_USB PinMap_USB_DRD_FS
72+ #endif
73+
6874/**
6975 * Libc porting layers
7076 */
Original file line number Diff line number Diff line change @@ -67,6 +67,9 @@ extern "C" {
6767#define USB_WKUP_IRQHandler USB_FS_WKUP_IRQHandler
6868#endif
6969#endif
70+ #elif defined(STM32G0xx )
71+ #define USB_IRQn USB_UCPD1_2_IRQn
72+ #define USB_IRQHandler USB_UCPD1_2_IRQHandler
7073#elif defined(STM32L5xx )
7174#define USB_IRQn USB_FS_IRQn
7275#define USB_IRQHandler USB_FS_IRQHandler
Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ void hw_config_init(void)
3232 /* Disable the internal Pull-Up in Dead Battery pins of UCPD peripheral */
3333 HAL_PWREx_DisableUCPDDeadBattery ();
3434#endif
35+ #if defined (SYSCFG_CFGR1_UCPD1_STROBE ) || defined (SYSCFG_CFGR1_UCPD2_STROBE )
36+ /* Disable the internal Pull-Up in Dead Battery pins of UCPD peripheral */
37+ HAL_SYSCFG_StrobeDBattpinsConfig (SYSCFG_CFGR1_UCPD1_STROBE | SYSCFG_CFGR1_UCPD2_STROBE );
38+ #endif /* SYSCFG_CFGR1_UCPD1_STROBE || SYSCFG_CFGR1_UCPD2_STROBE */
3539
3640 /* Init DWT if present */
3741#ifdef DWT_BASE
You can’t perform that action at this time.
0 commit comments