You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-firmware/micropython/trezorhal/flash.c

12 lines
355 B

#include STM32_HAL_H
int flash_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, 2, 0);
HAL_NVIC_EnableIRQ(FLASH_IRQn);
return 0;
}