mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-16 05:42:56 +00:00
check for PWR_USBSCR_USB33DEN before enabling USB VDD
This commit is contained in:
parent
4b993708c9
commit
f2859287df
@ -115,10 +115,6 @@ static inline void SystemClock_Config(void) {
|
|||||||
__HAL_RCC_USB_CLK_ENABLE();
|
__HAL_RCC_USB_CLK_ENABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void board_enable_vdd_usb(void) {
|
|
||||||
// USB in STM32H503RB does not require enabling VDD
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -122,10 +122,6 @@ static inline void SystemClock_Config(void) {
|
|||||||
__HAL_RCC_USB_CLK_ENABLE();
|
__HAL_RCC_USB_CLK_ENABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void board_enable_vdd_usb(void) {
|
|
||||||
/* Enable VDDUSB to power on USB peripheral */
|
|
||||||
HAL_PWREx_EnableVddUSB();
|
|
||||||
}
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -108,11 +108,6 @@ static inline void SystemClock_Config(void) {
|
|||||||
__HAL_RCC_USB_CLK_ENABLE();
|
__HAL_RCC_USB_CLK_ENABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void board_enable_vdd_usb(void) {
|
|
||||||
/* Enable VDDUSB to power on USB peripheral */
|
|
||||||
HAL_PWREx_EnableVddUSB();
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -145,7 +145,9 @@ void board_init(void) {
|
|||||||
__HAL_RCC_USB_CLK_ENABLE();
|
__HAL_RCC_USB_CLK_ENABLE();
|
||||||
|
|
||||||
/* Enable VDDUSB */
|
/* Enable VDDUSB */
|
||||||
board_enable_vdd_usb();
|
#if defined (PWR_USBSCR_USB33DEN)
|
||||||
|
HAL_PWREx_EnableVddUSB();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
|
Loading…
x
Reference in New Issue
Block a user