1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 07:28:10 +00:00

core: fix interrupt usage in usbd_conf

This commit is contained in:
Pavol Rusnak 2019-12-18 16:30:57 +00:00
parent 0064fda203
commit 8572a5a942
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -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);