diff options
Diffstat (limited to 'stmhal/storage.c')
-rw-r--r-- | stmhal/storage.c | 3 |
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); } |