@@ -99,12 +99,12 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd)
9999 __HAL_USB_WAKEUP_EXTI_ENABLE_RISING_EDGE ();
100100#endif
101101 __HAL_USB_WAKEUP_EXTI_ENABLE_IT ();
102- #if defined(STM32F1xx ) || defined( STM32F3xx )
102+ #if defined(USB_WKUP_IRQn )
103103 /* USB Wakeup Interrupt */
104- HAL_NVIC_EnableIRQ (USBWakeUp_IRQn );
104+ HAL_NVIC_EnableIRQ (USB_WKUP_IRQn );
105105
106106 /* Enable USB Wake-up interrupt */
107- HAL_NVIC_SetPriority (USBWakeUp_IRQn , 0 , 0 );
107+ HAL_NVIC_SetPriority (USB_WKUP_IRQn , 0 , 0 );
108108#endif
109109 }
110110 }
@@ -368,8 +368,6 @@ void HAL_PCD_DisconnectCallback(PCD_HandleTypeDef *hpcd)
368368 USBD_LL_DevDisconnected (hpcd -> pData );
369369}
370370
371-
372-
373371/**
374372 * @brief This function handles USB-On-The-Go FS/HS global interrupt request.
375373 * @param None
@@ -399,16 +397,18 @@ void USB_H_IRQHandler(void)
399397#endif /* USB_H_IRQn */
400398
401399/**
402- * @brief This function handles USB OTG FS Wakeup IRQ Handler.
400+ * @brief This function handles USB Wakeup IRQ Handler.
403401 * @param None
404402 * @retval None
405403 */
406404#ifdef USE_USB_HS
407405 void OTG_HS_WKUP_IRQHandler (void )
408406#elif defined(USB_OTG_FS )
409407 void OTG_FS_WKUP_IRQHandler (void )
408+ #elif defined(USB_WKUP_IRQHandler )
409+ void USB_WKUP_IRQHandler (void )
410410#else
411- void USBWakeUp_IRQHandler (void )
411+ void USBWakeUp_IRQHandler_dummy (void )
412412#endif
413413{
414414 if ((& g_hpcd )-> Init .low_power_enable ) {
0 commit comments