|
|
@@ -205,7 +205,6 @@ static inline void reg16_clear_bits(__IO uint16_t *reg, uint16_t mask) {
|
|
|
|
|
|
void dcd_init (uint8_t rhport)
|
|
|
{
|
|
|
- (void)rhport;
|
|
|
/* Clocks should already be enabled */
|
|
|
/* Use __HAL_RCC_USB_CLK_ENABLE(); to enable the clocks before calling this function */
|
|
|
|
|
|
@@ -244,7 +243,8 @@ void dcd_init (uint8_t rhport)
|
|
|
USB->CNTR |= USB_CNTR_RESETM | (USE_SOF ? USB_CNTR_SOFM : 0) | USB_CNTR_ESOFM | USB_CNTR_CTRM | USB_CNTR_SUSPM | USB_CNTR_WKUPM;
|
|
|
dcd_handle_bus_reset();
|
|
|
|
|
|
- // Data-line pull-up is left disconnected.
|
|
|
+ // Enable pull-up if supported
|
|
|
+ if ( dcd_connect ) dcd_connect(rhport);
|
|
|
}
|
|
|
|
|
|
// Define only on MCU with internal pull-up. BSP can define on MCU without internal PU.
|