diff options
Diffstat (limited to 'stmhal/usbd_conf.c')
-rw-r--r-- | stmhal/usbd_conf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/stmhal/usbd_conf.c b/stmhal/usbd_conf.c index 600c17a41..009a85f62 100644 --- a/stmhal/usbd_conf.c +++ b/stmhal/usbd_conf.c @@ -32,6 +32,8 @@ /* Includes ------------------------------------------------------------------*/
#include STM32_HAL_H
#include "usbd_core.h"
+#include "py/obj.h"
+#include "irq.h"
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
@@ -88,7 +90,7 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd) __USB_OTG_FS_CLK_ENABLE();
/* Set USBFS Interrupt priority */
- HAL_NVIC_SetPriority(OTG_FS_IRQn, 6, 0);
+ HAL_NVIC_SetPriority(OTG_FS_IRQn, IRQ_PRI_OTG_FS, IRQ_SUBPRI_OTG_FS);
/* Enable USBFS Interrupt */
HAL_NVIC_EnableIRQ(OTG_FS_IRQn);
@@ -154,7 +156,7 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd) __USB_OTG_HS_ULPI_CLK_ENABLE();
/* Set USBHS Interrupt to the lowest priority */
- HAL_NVIC_SetPriority(OTG_HS_IRQn, 6, 0);
+ HAL_NVIC_SetPriority(OTG_HS_IRQn, IRQ_PRI_OTG_HS, IRQ_SUBPRI_OTG_HS);
/* Enable USBHS Interrupt */
HAL_NVIC_EnableIRQ(OTG_HS_IRQn);
|