File tree 3 files changed +13
-0
lines changed
libraries/SrcWrapper/src/stm32
3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 65
65
#define CAN1 CAN
66
66
#endif
67
67
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
+
68
74
/**
69
75
* Libc porting layers
70
76
*/
Original file line number Diff line number Diff line change @@ -67,6 +67,9 @@ extern "C" {
67
67
#define USB_WKUP_IRQHandler USB_FS_WKUP_IRQHandler
68
68
#endif
69
69
#endif
70
+ #elif defined(STM32G0xx )
71
+ #define USB_IRQn USB_UCPD1_2_IRQn
72
+ #define USB_IRQHandler USB_UCPD1_2_IRQHandler
70
73
#elif defined(STM32L5xx )
71
74
#define USB_IRQn USB_FS_IRQn
72
75
#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)
32
32
/* Disable the internal Pull-Up in Dead Battery pins of UCPD peripheral */
33
33
HAL_PWREx_DisableUCPDDeadBattery ();
34
34
#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 */
35
39
36
40
/* Init DWT if present */
37
41
#ifdef DWT_BASE
You can’t perform that action at this time.
0 commit comments