summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/pendsv.c
diff options
context:
space:
mode:
authorDave Curtis <davecurtis@sonic.net>2015-10-31 10:44:20 -0700
committerDamien George <damien.p.george@gmail.com>2015-11-01 23:23:39 +0000
commit32b3549cce7a965d92a81db02c7adc973f08d74c (patch)
tree8159317d2091e30cf33093dacdbfae76c8d374fc /stmhal/pendsv.c
parent056cb288d9a3d5aa35b3cf549f88688b9ba60163 (diff)
downloadmicropython-32b3549cce7a965d92a81db02c7adc973f08d74c.tar.gz
micropython-32b3549cce7a965d92a81db02c7adc973f08d74c.zip
stmhal: Add symbolic #defines for interrupt levels in irq.h.
Diffstat (limited to 'stmhal/pendsv.c')
-rw-r--r--stmhal/pendsv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/stmhal/pendsv.c b/stmhal/pendsv.c
index f374e06fdf..fb66a3dad4 100644
--- a/stmhal/pendsv.c
+++ b/stmhal/pendsv.c
@@ -30,6 +30,7 @@
#include "py/mpstate.h"
#include "py/runtime.h"
#include "pendsv.h"
+#include "irq.h"
// This variable is used to save the exception object between a ctrl-C and the
// PENDSV call that actually raises the exception. It must be non-static
@@ -40,7 +41,7 @@ void *pendsv_object;
void pendsv_init(void) {
// set PendSV interrupt at lowest priority
- HAL_NVIC_SetPriority(PendSV_IRQn, 0xf, 0xf);
+ HAL_NVIC_SetPriority(PendSV_IRQn, IRQ_PRI_PENDSV, IRQ_SUBPRI_PENDSV);
}
// Call this function to raise a pending exception during an interrupt.