core: fix interrupt usage in usbd_conf

(cherry picked from commit 8572a5a942)
release/2020-01
Pavol Rusnak 5 years ago
parent 38859784e1
commit ffafe2cc3e
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

@ -54,12 +54,7 @@
#include STM32_HAL_H
#include "usbd_core.h"
#include "usb.h"
#define IRQ_PRI_OTG_FS 6
#define IRQ_SUBPRI_OTG_FS 0
#define IRQ_PRI_OTG_HS 6
#define IRQ_SUBPRI_OTG_HS 0
#include "irq.h"
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
@ -122,7 +117,7 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd)
__HAL_RCC_USB_OTG_FS_CLK_ENABLE();
/* Set USBFS Interrupt priority */
HAL_NVIC_SetPriority(OTG_FS_IRQn, IRQ_PRI_OTG_FS, IRQ_SUBPRI_OTG_FS);
NVIC_SetPriority(OTG_FS_IRQn, IRQ_PRI_OTG_FS);
/* Enable USBFS Interrupt */
HAL_NVIC_EnableIRQ(OTG_FS_IRQn);
@ -231,7 +226,7 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd)
#endif // !USE_USB_HS_IN_FS
/* Set USBHS Interrupt to the lowest priority */
HAL_NVIC_SetPriority(OTG_HS_IRQn, IRQ_PRI_OTG_HS, IRQ_SUBPRI_OTG_HS);
NVIC_SetPriority(OTG_HS_IRQn, IRQ_PRI_OTG_HS);
/* Enable USBHS Interrupt */
HAL_NVIC_EnableIRQ(OTG_HS_IRQn);

Loading…
Cancel
Save