stm32: Allow to have no storage support if there are no block devices.

If no block devices are defined by a board then storage support will be
disabled.  This means there is no filesystem provided by either the
internal flash or external SPI flash.  But the VFS system can still be
enabled and filesystems provided on external devices like an SD card.
This commit is contained in:
Damien George
2018-05-28 10:57:27 +10:00
parent aa4a7a8732
commit f497723802
6 changed files with 31 additions and 1 deletions

View File

@@ -310,9 +310,11 @@ void SysTick_Handler(void) {
// be generalised in the future then a dispatch table can be used as
// follows: ((void(*)(void))(systick_dispatch[uwTick & 0xf]))();
#if MICROPY_HW_ENABLE_STORAGE
if (STORAGE_IDLE_TICK(uwTick)) {
NVIC->STIR = FLASH_IRQn;
}
#endif
if (DMA_IDLE_ENABLED() && DMA_IDLE_TICK(uwTick)) {
dma_idle_handler(uwTick);
@@ -459,8 +461,10 @@ void FLASH_IRQHandler(void) {
HAL_FLASH_IRQHandler();
}
*/
#if MICROPY_HW_ENABLE_STORAGE
// This call the storage IRQ handler, to check if the flash cache needs flushing
storage_irq_handler();
#endif
IRQ_EXIT(FLASH_IRQn);
}