diff options
author | Dave Curtis <davecurtis@sonic.net> | 2015-10-31 10:44:20 -0700 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-11-01 23:23:39 +0000 |
commit | 32b3549cce7a965d92a81db02c7adc973f08d74c (patch) | |
tree | 8159317d2091e30cf33093dacdbfae76c8d374fc /stmhal/extint.c | |
parent | 056cb288d9a3d5aa35b3cf549f88688b9ba60163 (diff) | |
download | micropython-32b3549cce7a965d92a81db02c7adc973f08d74c.tar.gz micropython-32b3549cce7a965d92a81db02c7adc973f08d74c.zip |
stmhal: Add symbolic #defines for interrupt levels in irq.h.
Diffstat (limited to 'stmhal/extint.c')
-rw-r--r-- | stmhal/extint.c | 3 |
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; |