summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/storage.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/storage.c
parent056cb288d9a3d5aa35b3cf549f88688b9ba60163 (diff)
downloadmicropython-32b3549cce7a965d92a81db02c7adc973f08d74c.tar.gz
micropython-32b3549cce7a965d92a81db02c7adc973f08d74c.zip
stmhal: Add symbolic #defines for interrupt levels in irq.h.
Diffstat (limited to 'stmhal/storage.c')
-rw-r--r--stmhal/storage.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/stmhal/storage.c b/stmhal/storage.c
index 64e810e8f7..c1a6d9c85a 100644
--- a/stmhal/storage.c
+++ b/stmhal/storage.c
@@ -33,6 +33,7 @@
#include "led.h"
#include "flash.h"
#include "storage.h"
+#include "irq.h"
#if defined(STM32F405xx) || defined(STM32F407xx)
@@ -138,7 +139,7 @@ void storage_init(void) {
// Enable the flash IRQ, which is used to also call our storage IRQ handler
// It needs to go at a higher priority than all those components that rely on
// the flash storage (eg higher than USB MSC).
- HAL_NVIC_SetPriority(FLASH_IRQn, 1, 1);
+ HAL_NVIC_SetPriority(FLASH_IRQn, IRQ_PRI_FLASH, IRQ_SUBPRI_FLASH);
HAL_NVIC_EnableIRQ(FLASH_IRQn);
}