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

@@ -34,6 +34,8 @@
#include "storage.h"
#include "irq.h"
#if MICROPY_HW_ENABLE_STORAGE
#define FLASH_PART1_START_BLOCK (0x100)
#if defined(MICROPY_HW_BDEV2_IOCTL)
@@ -284,3 +286,5 @@ void pyb_flash_init_vfs(fs_user_mount_t *vfs) {
vfs->u.ioctl[0] = (mp_obj_t)&pyb_flash_ioctl_obj;
vfs->u.ioctl[1] = (mp_obj_t)&pyb_flash_obj;
}
#endif