From 32b3549cce7a965d92a81db02c7adc973f08d74c Mon Sep 17 00:00:00 2001 From: Dave Curtis Date: Sat, 31 Oct 2015 10:44:20 -0700 Subject: stmhal: Add symbolic #defines for interrupt levels in irq.h. --- stmhal/storage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'stmhal/storage.c') 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); } -- cgit v1.2.3