Skip to content

Commit cedc5d7

Browse files
committed
stop otg irqs
1 parent 67161f0 commit cedc5d7

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

cores/arduino/stm32/usb_host/usbh_conf.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,14 @@ void HAL_HCD_MspDeInit(HCD_HandleTypeDef *hhcd)
149149
if (hhcd->Instance == USB_OTG_FS) {
150150
/* Disable USB FS Clock */
151151
__HAL_RCC_USB_OTG_FS_CLK_DISABLE();
152+
HAL_NVIC_DisableIRQ(OTG_FS_IRQn);
152153
}
153154
#endif
154155
#if defined (USB_OTG_HS)
155156
if (hhcd->Instance == USB_OTG_HS) {
156157
/* Disable USB HS Clocks */
157158
__HAL_RCC_USB_OTG_HS_CLK_DISABLE();
159+
HAL_NVIC_DisableIRQ(OTG_HS_IRQn);
158160
}
159161
#endif /* USB_OTG_HS */
160162
}
@@ -289,11 +291,8 @@ USBH_StatusTypeDef USBH_LL_DeInit(USBH_HandleTypeDef *phost)
289291
{
290292
HAL_StatusTypeDef hal_status = HAL_OK;
291293
USBH_StatusTypeDef usb_status = USBH_OK;
292-
293294
hal_status = HAL_HCD_DeInit(phost->pData);
294-
295295
usb_status = USBH_Get_USB_Status(hal_status);
296-
297296
return usb_status;
298297
}
299298

@@ -320,11 +319,8 @@ USBH_StatusTypeDef USBH_LL_Stop(USBH_HandleTypeDef *phost)
320319
{
321320
HAL_StatusTypeDef hal_status = HAL_OK;
322321
USBH_StatusTypeDef usb_status = USBH_OK;
323-
324322
hal_status = HAL_HCD_Stop(phost->pData);
325-
326323
usb_status = USBH_Get_USB_Status(hal_status);
327-
328324
return usb_status;
329325
}
330326

@@ -366,11 +362,8 @@ USBH_StatusTypeDef USBH_LL_ResetPort(USBH_HandleTypeDef *phost)
366362
{
367363
HAL_StatusTypeDef hal_status = HAL_OK;
368364
USBH_StatusTypeDef usb_status = USBH_OK;
369-
370365
hal_status = HAL_HCD_ResetPort(phost->pData);
371-
372366
usb_status = USBH_Get_USB_Status(hal_status);
373-
374367
return usb_status;
375368
}
376369

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy