summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/extint.c
diff options
context:
space:
mode:
Diffstat (limited to 'stmhal/extint.c')
-rw-r--r--stmhal/extint.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/stmhal/extint.c b/stmhal/extint.c
index 1fcf587dbb..57116dc374 100644
--- a/stmhal/extint.c
+++ b/stmhal/extint.c
@@ -34,6 +34,7 @@
#include "py/mphal.h"
#include "pin.h"
#include "extint.h"
+#include "irq.h"
/// \moduleref pyb
/// \class ExtInt - configure I/O pins to interrupt on external events
@@ -178,7 +179,7 @@ uint extint_register(mp_obj_t pin_obj, uint32_t mode, uint32_t pull, mp_obj_t ca
// Calling HAL_GPIO_Init does an implicit extint_enable
/* Enable and set NVIC Interrupt to the lowest priority */
- HAL_NVIC_SetPriority(nvic_irq_channel[v_line], 0x0F, 0x0F);
+ HAL_NVIC_SetPriority(nvic_irq_channel[v_line], IRQ_PRI_EXTINT, IRQ_SUBPRI_EXTINT);
HAL_NVIC_EnableIRQ(nvic_irq_channel[v_line]);
}
return v_line;