MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / USBVRG_Configuration

Function USBVRG_Configuration

bsp/ht32/libraries/usbd_library/src/usb_port.c:56–68  ·  view source on GitHub ↗

/ * @brief Configure USB Voltage * @retval None ************************************************************************************************************/

Source from the content-addressed store, hash-verified

54 * @retval None
55 ************************************************************************************************************/
56static void USBVRG_Configuration(void)
57{
58 CKCU_PeripClockConfig_TypeDef CKCUClock = {{ 0 }};
59 CKCUClock.Bit.BKP = 1;
60 CKCU_PeripClockConfig(CKCUClock, ENABLE);
61
62 PWRCU_SetVREG(PWRCU_VREG_3V3);
63
64 /* !!! NOTICE !!!
65 USB LDO should be enabled (PWRCU_VREG_ENABLE) if the MCU VDD > 3.6 V.
66 */
67 PWRCU_VREGConfig(PWRCU_VREG_BYPASS);
68}
69#endif
70
71#define REMOTE_WAKEUP (0)

Callers 1

USB_ConfigurationFunction · 0.70

Calls 3

PWRCU_SetVREGFunction · 0.85
PWRCU_VREGConfigFunction · 0.85
CKCU_PeripClockConfigFunction · 0.50

Tested by

no test coverage detected